Web lists-archives.com

Re: Verifying dependencins of DEB file(s)

On 2018-11-14 08:38 +0100, Tomáš Golembiovský wrote:

> I need to safely install a DEB file (or set of DEB files) without
> network connectivity and with tools normally present on small Debian
> installation. More precisely I would either like to install the package
> or leave the system in state before the attempt.
> However, it seems there is no way to roll-back installation done with
> dpkg in case of failure. Neither I found a way how to at least check
> dependencies. The --dry-run/--simulate option does not do that. In fact,
> I'm not sure what stages of the process it goes through (maybe just
> verifying package integrity).

Basically, --dry-run just simulates unpacking, and dpkg does not check
dependencies (other than Pre-Depends) during that phase.  There have
been complaints[1] about that forever, so don't expect it to be fixed
anytime soon.

> Is what I want to do possible with dpkg or other tools that are
> normally in the base system?

Not with dpkg, but apt can install local .deb files and resolve
dependencies, although this is not documented[2].

$ apt -s install ./*.deb

should give you information whether the local packages are installable.
Note the leading "./" here, it tells apt to treat the arguments as local
files rather than package names.


1. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=55364
2. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874763