From e5c3f3ccd98e926b91693d961db4d338fd144301 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 20 Jul 2016 18:09:46 +0200 Subject: clean up default-stanzas from extended_states on write MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The existing cleanup was happening only for packages which had a status change (install -> uninstalled) which is the most frequent but no the only case – you can e.g. set autobits explicitly with apt-mark. This would leave stanzas in the states file declaring a package to be manually installed – which is the default value for a package not listed at all, so we can just as well drop it from the file. --- test/integration/framework | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/integration/framework') diff --git a/test/integration/framework b/test/integration/framework index 792ba79d9..17de023aa 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -2001,3 +2001,11 @@ aptautotest_aptget_purge() { testaptautotestnodpkgwarning "$@"; } aptautotest_apt_install() { testaptautotestnodpkgwarning "$@"; } aptautotest_apt_remove() { testaptautotestnodpkgwarning "$@"; } aptautotest_apt_purge() { testaptautotestnodpkgwarning "$@"; } + +testaptmarknodefaultsections() { + testfailure grep '^Auto-Installed: 0$' "${TMPWORKINGDIRECTORY}/rootdir/var/lib/apt/extended_states" +} +aptautotest_aptmark_auto() { testaptmarknodefaultsections "$@"; } +aptautotest_aptmark_manual() { testaptmarknodefaultsections "$@"; } +aptautotest_aptget_markauto() { testaptmarknodefaultsections "$@"; } +aptautotest_aptget_markmanual() { testaptmarknodefaultsections "$@"; } -- cgit v1.2.3