#512305 Doesn't ignore removed but installed packages on reinstall

Package:
apt
Source:
apt
Description:
commandline package manager
Submitter:
Jörg Sommer
Date:
2015-08-14 18:51:12 UTC
Severity:
wishlist
#512305#5
Date:
2009-01-19 14:18:53 UTC
From:
To:
Hi,

given this status file:

Package: pkg1
Status: install ok installed
Priority: optional
Section: perl
Installed-Size: 80
Maintainer: bla
Architecture: powerpc
Version: 1
Description: empty

Package: pkg2
Status: install ok config-files
Priority: optional
Section: perl
Installed-Size: 80
Maintainer: bla
Architecture: powerpc
Version: 1
Description: empty

Package: java-common
Status: install ok installed
Priority: optional
Section: misc
Installed-Size: 348
Maintainer: Debian Java Mailing List <debian-java@lists.debian.org>
Architecture: all
Version: 0.30
Suggests: equivs
Description: Base of all Java packages

apt-get behaves differently on reinstalling.

% LCC apt-get -o Dir::State::status=/tmp/status -o Dir::Cache=/tmp --reinstall --quiet=2 --print-uris --ignore-missing install java-common pkg1
'ftp://ftp.de.debian.org/debian/pool/main/j/java-common/java-common_0.30_all.deb' java-common_0.30_all.deb 77022 SHA256:600554190a9c05d2f2b93b803eb146627208edb6acf8030f0cde3cb10a9e2bc0
% LCC apt-get -o Dir::State::status=/tmp/status -o Dir::Cache=/tmp --reinstall --quiet=2 --print-uris --ignore-missing install java-common pkg2
E: Package pkg2 has no installation candidate
% echo $?
100

In the first case it ignores the package it hasn't an installation
candidate for, but in the second it fails. I've expected it would ignore
in the second case, too. The option --ignore-missing doesn't change
anything.

How is it possible to make apt-get ignores non‐available not fully
installed packages?

Bye, Jörg.

#512305#10
Date:
2009-01-19 15:29:54 UTC
From:
To:
Jörg Sommer wrote:
Hello Jörg,
No, first package has the installation candidate itself - it's installed
version. Yes, there is other question why it hasn't failed to reinstall it, it
would be good to see 'apt-cache policy pkg1' to make sure there was no other
installation candidates.
Package pkg2 has really no installation candidates, so package pkg2 really
can't be reinstalled. I believe this behavior is right.
'--ignore-missing' has other meaning: it ignores the (versions of) packages
that cannot be retrieved due to some reason, but available in Packages.
At least now - probably, no way. You may want to try aptitude here, it has
less strict rules in some places.