Issue
I have some .deb
files which I am currently modifying to have varying dependencies in the control
file within the archive. I would like to be able to do simulated installations via:
sudo dpkg --install --simulate ./myFile.deb
The install script is meant to exercise some varying logging capabilities depending on certain combinations of dependency mismatches, etc. For example, one of my packages depends on the presence of libusb-1.0-0 > 1.0.0.16
, and I already have the latest available version installed on my test system. Is it possible to pass a flag to dpkg
so that it either:
- Thinks that
libusb
is either a different version than that which is currently installed. - Thinks that
libusb
, or any other arbitrary library/package is not already installed.
Thank you.
Solution
You could take snapshots of /var/lib/dpkg/
in the various states you wish to test, and then pass the path of those snapshots to dpkg
with the --admindir=...
flag.
Answered By - Phil Miller