summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-11-30 19:22:29 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-11-30 19:22:29 +0100
commita02f24e046d58b723a9283211cb558605a024bdf (patch)
tree57792c3e0ad9166484f96747675f51fa5e4f7064
parent0dc05bf095ebe2908f7d9096b3914b8c988c023e (diff)
show dependencies of essential packages which are going to remove
only if they cause the remove of this essential (Closes: #601961)
-rw-r--r--cmdline/apt-get.cc4
-rw-r--r--debian/changelog4
-rw-r--r--test/integration/status-bug-601961-install-info42
-rwxr-xr-xtest/integration/test-bug-601961-install-info38
4 files changed, 86 insertions, 2 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index ca037c5c7..ca510178a 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -538,7 +538,9 @@ bool ShowEssential(ostream &out,CacheFile &Cache)
//VersionsList += string(Cache[I].CurVersion) + "\n"; ???
}
}
-
+ else
+ continue;
+
if (I->CurrentVer == 0)
continue;
diff --git a/debian/changelog b/debian/changelog
index a19df76cf..56865f713 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,10 +3,12 @@ apt (0.8.11+wheezy) unstable; urgency=low
* cmdline/apt-get.cc:
- if --print-uris is used don't setup downloader as we don't need
progress, lock nor the directories it would create otherwise
+ - show dependencies of essential packages which are going to remove
+ only if they cause the remove of this essential (Closes: #601961)
* debian/control:
- add Vcs-Browser now that loggerhead works again (Closes: #511168)
- -- David Kalnischkies <kalnischkies@gmail.com> Tue, 30 Nov 2010 19:07:07 +0100
+ -- David Kalnischkies <kalnischkies@gmail.com> Tue, 30 Nov 2010 19:16:31 +0100
apt (0.8.10) unstable; urgency=low
diff --git a/test/integration/status-bug-601961-install-info b/test/integration/status-bug-601961-install-info
new file mode 100644
index 000000000..c43cffab7
--- /dev/null
+++ b/test/integration/status-bug-601961-install-info
@@ -0,0 +1,42 @@
+Package: dpkg
+Status: install ok installed
+Essential: yes
+Priority: required
+Section: admin
+Installed-Size: 6432
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: i386
+Version: 1.15.8.5
+Description: Debian package management system
+
+Package: findutils
+Status: install ok installed
+Essential: yes
+Priority: required
+Section: utils
+Installed-Size: 1704
+Maintainer: Andreas Metzler <ametzler@debian.org>
+Architecture: i386
+Version: 4.4.2-1+b1
+Depends: dpkg (>= 1.15.4) | install-info, essentialpkg
+Description: utilities for finding files--find, xargs
+
+Package: install-info
+Status: install ok installed
+Priority: important
+Section: doc
+Installed-Size: 256
+Maintainer: Debian TeX maintainers <debian-tex-maint@lists.debian.org>
+Architecture: i386
+Version: 4.13a.dfsg.1-6
+Description: Manage installed documentation in info format
+
+Package: essentialpkg
+Status: install ok installed
+Priority: important
+Section: other
+Installed-Size: 256
+Maintainer: Joe Sixpack <joe@example.org>
+Architecture: i386
+Version: 4.13a.dfsg.1-6
+Description: ultra hypercool important package
diff --git a/test/integration/test-bug-601961-install-info b/test/integration/test-bug-601961-install-info
new file mode 100755
index 000000000..b91bf3615
--- /dev/null
+++ b/test/integration/test-bug-601961-install-info
@@ -0,0 +1,38 @@
+#!/bin/sh
+set -e
+
+local TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture "i386"
+setupaptarchive
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ findutils
+WARNING: The following essential packages will be removed.
+This should NOT be done unless you know exactly what you are doing!
+ findutils
+0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
+After this operation, 1745 kB disk space will be freed.
+E: Trivial Only specified but this is not a trivial operation.' aptget remove findutils --trivial-only
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ install-info
+0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
+After this operation, 262 kB disk space will be freed.
+E: Trivial Only specified but this is not a trivial operation.' aptget remove install-info --trivial-only
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ essentialpkg findutils
+WARNING: The following essential packages will be removed.
+This should NOT be done unless you know exactly what you are doing!
+ findutils essentialpkg (due to findutils)
+0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
+After this operation, 2007 kB disk space will be freed.
+E: Trivial Only specified but this is not a trivial operation.' aptget remove essentialpkg --trivial-only