Do Not Uninstall Flag on Apt?

Posted by Daniel C. Sobral on Ask Ubuntu See other posts from Ask Ubuntu or by Daniel C. Sobral
Published on 2012-05-21T13:30:54Z Indexed on 2012/05/30 17:00 UTC
Read the original article Hit count: 330

Filed under:
|

Does the Debian/Ubuntu package infrastructure has some way of marking packages so that they never get uninstalled, no matter the pinning of other packages?

My problem is that, sometimes, packages installed by Puppet (coming from non-standard repositories, of course) cause other packages to get uninstalled -- in particular, openssh-{server,client}.

The way this happens is that package A and B depend on different versions of package C. If A is installed and one asks to install B, then the version of C changes. The new version of C is incompatible with A, so A gets uninstalled.

The funny thing is that the process is then reversed, as, on the next run, Puppet notices that A is not installed and tries to install it.

So, basically, I want to make sure A never gets uninstalled, which would prevent B from getting installed. That would be reported as an error, making me aware of the issue.

If anyone cares, Puppet uses the following command to install packages:

/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install <package>

© Ask Ubuntu or respective owner

Related posts about apt

Related posts about package-management