mvo5 / unattended-upgrades

Automatic installation of security upgrades on apt based systems
GNU General Public License v2.0
278 stars 78 forks source link

Feature Request: ignore package #363

Open sdwru opened 3 months ago

sdwru commented 3 months ago

I am using a repository that has been configured with a high apt Pin-Priority such that any package it contains will be installed first, even if a newer version number package is available in another repository. When this high Pin-Priority repo has a lower version number of a package installed than what is available in another repository, unattended-upgrades creates the following erroneous error.

1 updates could not be installed automatically. For more details,
see /var/log/unattended-upgrades/unattended-upgrades.log

There is nothing indicating a problem in that above file, which is a secondary problem with this error. Rather, unattended-upgrades creates a /var/lib/unattended-upgrades/kept-back file listing the problem package. That package is not listed as being kept back when I do apt upgrade or apt --with-new-pkgs upgrade.

Adding that package to the /etc/apt/apt.conf.d/50unattended-upgrades file in the blacklist section does not suppress the erroneous error. I believe a new "ignore" section would be required so that I can add these packages for these situations where they incorrectly generate an erroneous error so that this error can be suppressed.

An even better solution would be for unattended-upgrades to be intelligent enough to understand that it should ignore the newer version because of the repo with the high Pin-Priority taking precedent.