[prev in list] [next in list] [prev in thread] [next in thread]
List: openembedded-issues
Subject: [Bug 4137] New: ipkg: pre/post control files not removed ( remove_obsolete_maintainer_scripts)
From: bugzilla-daemon () treke ! net (bugzilla-daemon at treke ! net)
Date: 2008-03-30 16:22:02
Message-ID: bug-4137-13 () http ! bugs ! openembedded ! net/
[Download RAW message or body]
http://bugs.openembedded.net/show_bug.cgi?id=4137
Summary: ipkg: pre/post control files not removed
(remove_obsolete_maintainer_scripts)
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 postinst
task, which is no longer there in the new version, the postinst script is not
removed after the update.
So this postinst script will be executed after each consecutive update of the
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
ipkg_install.c:
[code]
static int remove_obsolete_maintainer_scripts(ipkg_conf_t *conf, pkg_t *pkg,
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,
pkg->name);
err = glob(globpattern, 0, NULL, &globbuf);
free(globpattern);
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 from
old_pkg %s\n",
globbuf.gl_pathv[i], old_pkg->name);
if (!conf->noaction)
unlink(globbuf.gl_pathv[i]);
}
globfree(&globbuf);
}
return err;
}
[/code]
I suppose this code had some undesired sideeffects, and has been if 0'ed ever
since.
--
Configure bugmail: http://bugs.openembedded.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic