The following commit has been merged in the master branch:
commit 5bbc18af9d7c962cba4177e6c03216039d6ebdb3
Author: Guillem Jover <[email protected]>
Date: Sun Apr 7 02:27:27 2013 +0200
dpkg: Do not call modstatdb_note() unnecessarily on remove or purge
Move the modstatdb_note() inside the !f_pending conditional where
the want status is being changed, there's no point in always calling
this function afterwards if there's been no status change at all.
diff --git a/debian/changelog b/debian/changelog
index f90109d..91b6446 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -59,6 +59,7 @@ dpkg (1.17.0) UNRELEASED; urgency=low
* Execute maintainer scripts in a new execution context, based on the
current one and the specific maintainer script filename, and if it's
not different to the current one, use "dpkg_script_t" as a fallback.
+ * Do not unnecessarily create a dpkg update log record on remove or purge.
-- Guillem Jover <[email protected]> Fri, 03 Aug 2012 13:21:00 +0200
diff --git a/src/remove.c b/src/remove.c
index 95ea98f..6ae39ad 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -3,7 +3,7 @@
* remove.c - functionality for removing packages
*
* Copyright © 1995 Ian Jackson <[email protected]>
- * Copyright © 2007-2012 Guillem Jover <[email protected]>
+ * Copyright © 2007-2013 Guillem Jover <[email protected]>
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -114,8 +114,10 @@ void deferred_remove(struct pkginfo *pkg) {
pkg_set_want(pkg, want_purge);
else
pkg_set_want(pkg, want_deinstall);
+
+ if (!f_noact)
+ modstatdb_note(pkg);
}
- if (!f_noact) modstatdb_note(pkg);
debug(dbg_general, "checking dependencies for remove '%s'",
pkg_name(pkg, pnaw_always));
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]