[Bug 1442775] Re: apt-get --ignore-missing doesn't ignore missing packages
Julian Andres Klode
1442775 at bugs.launchpad.net
Thu Jan 31 09:33:53 UTC 2019
A non-existing package is not a missing package. There is a clear list
what constitutes a missing package (not retrievable or failed integrity
checks).
I do not think there is anything we should be changing here, not failing
on non-existing packages, even on removal, is bad, as it can lead to
packages remaining installed because you mistyped. Better safe then
sorry.
Eventually (and already in aptitude), this will be possible with
patterns, by using ?and(?installed,?exact-name(PKGNAME)). Or
~i~<something>PKGNAME.
Also, apt-get does not belong in a Makefile.
** Changed in: apt (Ubuntu)
Status: Confirmed => Opinion
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1442775
Title:
apt-get --ignore-missing doesn't ignore missing packages
Status in apt package in Ubuntu:
Opinion
Bug description:
The man page for apt-get states:
-m, --ignore-missing, --fix-missing
Ignore missing packages; if packages cannot be retrieved or fail the integrity check after retrieval (corrupted package files), hold back those packages and handle the
result. Use of this option together with -f may produce an error in some situations. If a package is selected for installation (particularly if it is mentioned on the
command line) and it could not be downloaded then it will be silently held back. Configuration Item: APT::Get::Fix-Missing.
However, when removing or purging packages, it does /not/ actually
ignore missing packages:
build at ub14test:~/p4/zimbra/main/ThirdParty/openldap$ sudo apt-get purge -y --ignore-missing zimbra-openssl-lib
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package zimbra-openssl-lib
build at ub14test:~/p4/zimbra/main/ThirdParty/openldap$ echo $?
100
This causes some pain when using apt-get in a Makefile and wanting to
ensure custom packages have been removed.
dpkg handles this correctly:
build at ub14test:~/p4/zimbra/main/ThirdParty/openldap$ sudo dpkg --purge zimbra-openssl-lib
dpkg: warning: ignoring request to remove zimbra-openssl-lib which isn't installed
build at ub14test:~/p4/zimbra/main/ThirdParty/openldap$ echo $?
0
however you then lose dependency tracking.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1442775/+subscriptions
More information about the foundations-bugs
mailing list