Re: test for package dependencies without installing
->>In response to your message<<-
--received from Jimmy Johnson--
>
> Paul Yeatman wrote:
> > 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.
> >
<...snip...>
> >
> > 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!
>
>
>
> Sounds like you may want to use # apt-get -u install, here's an example:
>
> # apt-get -u install lilo
> Reading Package Lists... Done
> Building Dependency Tree... Done
> The following extra packages will be installed:
> cron debconf exim libident libopenldap-runtime libopenldap1 libpcre2
> logrotate mailx
> The following packages will be REMOVED:
> debconf-tiny
> The following NEW packages will be installed:
> cron debconf exim libident libopenldap-runtime libopenldap1 libpcre2
> logrotate mailx
> The following packages will be upgraded
> lilo
> 1 packages upgraded, 9 newly installed, 1 to remove and 31 not upgraded.
> Need to get 225kB/1179kB of archives. After unpacking 2659kB will be used.
> Do you want to continue? [Y/n]
Thanks for the suggestion. It's not as script-friendly as I'd like but
the real problem is that this is using the package manager. I want to
perform the test on an arbitrary debian package file that may or may
not be found on the mirrors.
Thanks!
Paul
Reply to: