|
|
@@ -164,18 +164,15 @@ void deferred_remove(struct pkginfo *pkg) {
|
|
|
printf(_("Removing %s ...\n"),pkg->name);
|
|
|
log_action("remove", pkg);
|
|
|
if (pkg->status == stat_halfconfigured || pkg->status == stat_installed) {
|
|
|
+ static enum pkgstatus oldpkgstatus;
|
|
|
|
|
|
- if (pkg->status == stat_installed || pkg->status == stat_halfconfigured) {
|
|
|
- static enum pkgstatus oldpkgstatus;
|
|
|
-
|
|
|
- oldpkgstatus= pkg->status;
|
|
|
- pkg->status= stat_halfconfigured;
|
|
|
- modstatdb_note(pkg);
|
|
|
- push_cleanup(cu_prermremove, ~ehflag_normaltidy, 0, 0, 2,
|
|
|
- (void *)pkg, (void *)&oldpkgstatus);
|
|
|
- maintainer_script_installed(pkg, PRERMFILE, "pre-removal",
|
|
|
- "remove", NULL);
|
|
|
- }
|
|
|
+ oldpkgstatus= pkg->status;
|
|
|
+ pkg->status= stat_halfconfigured;
|
|
|
+ modstatdb_note(pkg);
|
|
|
+ push_cleanup(cu_prermremove, ~ehflag_normaltidy, 0, 0, 2,
|
|
|
+ (void *)pkg, (void *)&oldpkgstatus);
|
|
|
+ maintainer_script_installed(pkg, PRERMFILE, "pre-removal",
|
|
|
+ "remove", NULL);
|
|
|
|
|
|
pkg->status= stat_unpacked; /* Will turn into halfinstalled soon ... */
|
|
|
}
|