Package: aptitude Version: 0.6.11-1+b1 X-Debbugs-Cc: era+deb...@iki.fi I bumped into another case where a zero (success) exit code was produced when the requested action could not be taken. I'm submitting this as a separate bug report even though it has similarities with e.g. #590686 and #592818 and should hopefully be possible to fix with similar means.
The scenario has to do with installing i386 packages on an x86_64 system. I can successfully "dpkg --add-architecture i386" but the partial mirror in the test network we have at work doesn't carry any i386 packages, so they cannot be installed. dpkg --add-architecture i386 && aptitude update && aptitude install -y libc6:i386 || echo failed appears to succeed in this scenario; whereas with apt-get instead of aptitude, I get the desired and expected behavior. The output from aptitude is: jessie$ sudo aptitude install -y libc6:i386 Couldn't find any package whose name or description matched "libc6:i386" Couldn't find any package whose name or description matched "libc6:i386" No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 1 not upgraded. Need to get 0 B of archives. After unpacking 0 B will be used. jessie$ echo $? 0 Note that this also masks the error when you did dpkg --add-architecture but forgot to do apt-get update to download new package indices for the architecture you added. (Also notice the unattractive but harmless duplicated message.) /* era */ -- If this were a real .signature, it would suck less. Well, maybe not.