Fwd: [Bug 4137] New: ipkg: pre/post control files not removed ( remove_obsolete_maintainer_scripts)

Marcin Juszkiewicz openembedded at haerwu.biz
Thu Apr 3 10:26:49 CEST 2008

Would be nice to check does it happen in opkg too.

----------  Przekazana wiadomość  ----------

Subject: [Bug 4137] New: ipkg: pre/post control files not removed ( 
Date: Sunday 30 of March 2008
From: bugzilla-daemon at treke.net
To: openembedded-issues at lists.openembedded.org


           Summary: ipkg: pre/post control files not removed
           Product: Openembedded
           Version: Angstrom unstable
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Distributions
        AssignedTo: openembedded-issues at lists.openembedded.org
        ReportedBy: pieterg at gmx.com

When a package is replaced by a newer version, the old version has a 
task, which is no longer there in the new version, the postinst script is 
removed after the update.
So this postinst script will be executed after each consecutive update of 
package (this might actually break the functionality of the new package,
depending on the contents of the control files)

This occurs with all 0.99 versions of ipkg, up to 0.99-163-r8

I believe this code is supposed to deal with removal of control files, in

static int remove_obsolete_maintainer_scripts(ipkg_conf_t *conf, pkg_t 
pkg_t *old_pkg)
     int i;
     int err = 0;
     char *globpattern;
     glob_t globbuf;
     if (0) {
          if (!pkg->dest) {
               ipkg_message(conf, IPKG_ERROR, "%s: no dest for 
package %s\n",
__FUNCTION__, pkg->name
               return -1;
          sprintf_alloc(&globpattern, "%s/%s.*", pkg->dest->info_dir,
          err = glob(globpattern, 0, NULL, &globbuf);
          if (err) {
               return err;
          /* XXXX this should perhaps only remove the ones that are not
overwritten in new package.
          for (i = 0; i < globbuf.gl_pathc; i++) {
               ipkg_message(conf, IPKG_DEBUG, "Removing control file %s 
old_pkg %s\n",
                            globbuf.gl_pathv[i], old_pkg->name);
               if (!conf->noaction)
     return err;

I suppose this code had some undesired sideeffects, and has been if 0'ed 

Configure bugmail: http://bugs.openembedded.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Openembedded-issues mailing list
Openembedded-issues at lists.openembedded.org


JID: hrw-jabber.org
OpenEmbedded developer/consultant

  Problemy z matematyką? Zadzwoń! 0-800-[(10x)(13i)^2]-[sin(xy)/2.362x]

More information about the opkg-devel mailing list