I know I can disallow a particular package in Debian by appending /etc/apt/preferences
with:
Package: *x11*
Pin: release
Pin-Priority: -1
But how can I do that for a virtual package like httpd
? I'd like to disallow installation of all packages that provide this virtual httpd
but the one selected by me. Is there a (simple) way to do this?
The reason: recently, an automatic apt-get dist-upgrade
removed nginx
and installed lighttpd
instead, because some other package (phppgadmin
AFAIR) depended on httpd
and something nginx
started depending on in that update was not installable. I'd really like the whole upgrade to fail in this case, rather than put the http service down. Also: is it possible to make a package "uninstallable"? That would be a good solution, too.