+2007-09-18 Guillem Jover <guillem@debian.org>
+
+ * src/remove.c (deferred_remove): Remove duplicate nested conditional,
+ and move its contents to the outer one.
+
2007-09-14 Brian M. Carlson <sandals@crustytoothpaste.ath.cx>
* src/remove.c (deferred_remove): Store the previous package status
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 ... */
}