test for package dependencies without installing
Hi, I'm wondering if there is a command I can run on a debian package that would test for whether all dependencies of that package are already installed on the system without actually installing the package if so. This mailing list thread http://lists.debian.org/debian-user/2006/09/msg00292.html is on the exact topic and many suggestions are thrown out but none of which I can prove true.
So, let's say I want to install texlive-base_2007.dfsg.1-2_all.deb.
$ dpkg -I texlive-base_2007.dfsg.1-2_all.deb | grep Depend
Depends: texlive-doc-base (>= 2007), texlive-base-bin (>= 2007-13), texlive-common (>= 2007)
I don't have any of these dependency packages installed
$ sudo dpkg -i texlive-base_2007.dfsg.1-2_all.deb
(Reading database ... 138033 files and directories currently installed.)
Preparing to replace texlive-base 2007.dfsg.1-2 (using texlive-base_2007.dfsg.1-2_all.deb) ...
Unpacking replacement texlive-base ...
dpkg: dependency problems prevent configuration of texlive-base:
texlive-base depends on texlive-doc-base (>= 2007); however:
Package texlive-doc-base is not installed.
texlive-base depends on texlive-base-bin (>= 2007-13); however:
Package texlive-base-bin is not installed.
texlive-base depends on texlive-common (>= 2007); however:
Package texlive-common is not installed.
dpkg: error processing texlive-base (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
texlive-base
Is there a script-friendly way to determine this before attempting to install? dpkg man page suggests that "--no-act, --dry-run, --simulate" should do this yet
$ sudo dpkg -i --no-act texlive-base_2007.dfsg.1-2_all.deb (Reading database ... 138033 files and directories currently installed.)
Preparing to replace texlive-base 2007.dfsg.1-2 (using texlive-base_2007.dfsg.1-2_all.deb) ...
$ echo $?
0
tells me nothing about lacking dependencies. The point of this is for the purpose of an install script that includes such a package. If there are dependency issues, I want to point that out right at the beginning of the install. If there are not, I want to proceed but want to perform the package install later in the game.
Thanks!
Reply to: