Friday, June 30, 2017

apt - dpkg: --dry-run does not check dependency?

The following practice indicates that "dpkg --dry-run" does not perform dependency checking, or at least I don't know how to do it. If I want to make sure dependency is clear before installing package, what should I do? Thanks a lot for the help.



$ sudo dpkg -i --dry-run bsdgames_2.17-21_amd64.deb 
(Reading database ... 120870 files and directories currently installed.)
Preparing to replace bsdgames 2.17-21 (using bsdgames_2.17-21_amd64.deb) ...

$ echo $?
0


$ sudo dpkg -i bsdgames_2.17-21_amd64.deb
(Reading database ... 120870 files and directories currently installed.)
Preparing to replace bsdgames 2.17-21 (using bsdgames_2.17-21_amd64.deb) ...
Unpacking replacement bsdgames ...
dpkg: dependency problems prevent configuration of bsdgames:
bsdgames depends on wamerican | wordlist; however:
Package wamerican is not installed.
Package wordlist is not installed.
dpkg: error processing bsdgames (--install):

dependency problems - leaving unconfigured
Processing triggers for man-db ...
Errors were encountered while processing:
bsdgames




I don't want dpkg to install dependencies for me. I only want some command to check dependency of the package. If the command returns 0, that means the current system has all the depending packages. This is all I need.

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...