Description of problem:
We have a internal package cliente-ldap that depends on samba, when u-u check for upgrade samba-common it raise a NoAllowedOrigin exception, then it doesn't clear apt.cache and it removes packages that shouldn't.
Log of dry-run with the problem:
$ sudo unattended-upgrade -d --dry-run
[...]
Option --dry-run given, *not* performing real actions
Packages that will be upgraded: libsmbclient libwbclient0 python-samba samba samba-common samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules smbclient
Writing dpkg log to /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
debug: call_adjusted samba-common
debug: marked_pkg: samba: install=False, upgrade=False, delete=True
debug: marked_pkg: cliente-ldap: install=False, upgrade=True, delete=False
Traceback (most recent call last):
File "/usr/bin/unattended-upgrade", line 259, in call_adjusted
self.allowed_origins)
File "/usr/bin/unattended-upgrade", line 775, in ver_in_allowed_origin
raise NoAllowedOriginError()
NoAllowedOriginError
debug: marked_pkg: samba-common: install=False, upgrade=True, delete=False
debug: marked_pkg: smbclient: install=False, upgrade=False, delete=True
debug: marked_pkg: samba-common-bin: install=False, upgrade=False, delete=True
Exception:
marking ibverbs-providers for removal
Keeping auto-removable ibverbs-providers package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap samba-common
marking samba-common-bin for removal
Keeping auto-removable samba-common-bin package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap samba-common
marking samba-vfs-modules for removal
marking python-crypto for removal
Keeping auto-removable python-crypto package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
marking attr for removal
marking smbclient for removal
Keeping auto-removable smbclient package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
marking python-ldb for removal
Keeping auto-removable python-ldb package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
marking python-tdb for removal
Keeping auto-removable python-tdb package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
marking samba-dsdb-modules for removal
marking librados2 for removal
marking libibverbs1 for removal
marking samba for removal
Keeping auto-removable samba package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
marking python-samba for removal
Keeping auto-removable python-samba package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
marking libcephfs2 for removal
marking tdb-tools for removal
Keeping auto-removable tdb-tools package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap samba-common
marking python-dnspython for removal
Keeping auto-removable python-dnspython package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
Packages that were successfully auto-removed:
Packages that are kept back: ibverbs-providers python-crypto python-dnspython python-ldb python-samba python-tdb samba samba-common-bin smbclient tdb-tools
InstCount=0 DelCount=0 BrokenCount=0
unattended-upgrades remove packages that shouldn't when there is a NoAllowedOrigin exception.
Version: upgrades= 1.1ubuntu1. 18.04.10
unattended-
Ubuntu 18.04.2 LTS
Description of problem:
We have a internal package cliente-ldap that depends on samba, when u-u check for upgrade samba-common it raise a NoAllowedOrigin exception, then it doesn't clear apt.cache and it removes packages that shouldn't.
Log of dry-run with the problem: unattended- upgrades/ unattended- upgrades- dpkg.log unattended- upgrade" , line 259, in call_adjusted allowed_ origins) unattended- upgrade" , line 775, in ver_in_ allowed_ origin Error() Error
$ sudo unattended-upgrade -d --dry-run
[...]
Option --dry-run given, *not* performing real actions
Packages that will be upgraded: libsmbclient libwbclient0 python-samba samba samba-common samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules smbclient
Writing dpkg log to /var/log/
debug: call_adjusted samba-common
debug: marked_pkg: samba: install=False, upgrade=False, delete=True
debug: marked_pkg: cliente-ldap: install=False, upgrade=True, delete=False
Traceback (most recent call last):
File "/usr/bin/
self.
File "/usr/bin/
raise NoAllowedOrigin
NoAllowedOrigin
debug: marked_pkg: samba-common: install=False, upgrade=True, delete=False
debug: marked_pkg: smbclient: install=False, upgrade=False, delete=True
debug: marked_pkg: samba-common-bin: install=False, upgrade=False, delete=True
Exception:
marking ibverbs-providers for removal
Keeping auto-removable ibverbs-providers package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap samba-common
marking samba-common-bin for removal
Keeping auto-removable samba-common-bin package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap samba-common
marking samba-vfs-modules for removal
marking python-crypto for removal
Keeping auto-removable python-crypto package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
marking attr for removal
marking smbclient for removal
Keeping auto-removable smbclient package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
marking python-ldb for removal
Keeping auto-removable python-ldb package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
marking python-tdb for removal
Keeping auto-removable python-tdb package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
marking samba-dsdb-modules for removal
marking librados2 for removal
marking libibverbs1 for removal
marking samba for removal
Keeping auto-removable samba package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
marking python-samba for removal
Keeping auto-removable python-samba package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
marking libcephfs2 for removal
marking tdb-tools for removal
Keeping auto-removable tdb-tools package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap samba-common
marking python-dnspython for removal
Keeping auto-removable python-dnspython package(s) because it would also remove the following packages which should be kept in this step: cliente-ldap
Packages that were successfully auto-removed:
Packages that are kept back: ibverbs-providers python-crypto python-dnspython python-ldb python-samba python-tdb samba samba-common-bin smbclient tdb-tools
InstCount=0 DelCount=0 BrokenCount=0
Log of what should happen: unattended- upgrades/ unattended- upgrades- dpkg.log unattended- upgrade" , line 259, in call_adjusted allowed_ origins) unattended- upgrade" , line 775, in ver_in_ allowed_ origin Error() Error dsdb-modules' , 'samba-libs', 'samba-common', 'samba- vfs-modules' , 'libsmbclient', 'smbclient', 'samba-common-bin'] dpkg-install- ZHXRWe
$ sudo unattended-upgrade -d --dry-run
[...]
Option --dry-run given, *not* performing real actions
Packages that will be upgraded: libsmbclient libwbclient0 python-samba samba samba-common samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules smbclient
Writing dpkg log to /var/log/
debug: call_adjusted samba-common
debug: marked_pkg: samba: install=False, upgrade=False, delete=True
debug: marked_pkg: cliente-ldap: install=False, upgrade=True, delete=False
Traceback (most recent call last):
File "/usr/bin/
self.
File "/usr/bin/
raise NoAllowedOrigin
NoAllowedOrigin
debug: marked_pkg: samba-common: install=False, upgrade=True, delete=False
debug: marked_pkg: smbclient: install=False, upgrade=False, delete=True
debug: marked_pkg: samba-common-bin: install=False, upgrade=False, delete=True
debug: call_adjusted libsmbclient
debug: marked_pkg: python-samba: install=False, upgrade=True, delete=False
debug: marked_pkg: libwbclient0: install=False, upgrade=True, delete=False
debug: marked_pkg: samba: install=False, upgrade=True, delete=False
debug: marked_pkg: samba-dsdb-modules: install=False, upgrade=True, delete=False
debug: marked_pkg: samba-libs: install=False, upgrade=True, delete=False
debug: marked_pkg: samba-common: install=False, upgrade=True, delete=False
debug: marked_pkg: samba-vfs-modules: install=False, upgrade=True, delete=False
debug: marked_pkg: libsmbclient: install=False, upgrade=True, delete=False
debug: marked_pkg: smbclient: install=False, upgrade=True, delete=False
debug: marked_pkg: samba-common-bin: install=False, upgrade=True, delete=False
applying set ['python-samba', 'libwbclient0', 'samba', 'samba-
Preconfiguring packages ...
/usr/bin/dpkg --status-fd 9 --no-triggers --unpack --auto-deconfigure --recursive /tmp/apt-
/usr/bin/dpkg --status-fd 9 --configure --pending
left to upgrade set()
All upgrades installed
InstCount=0 DelCount=0 BrokenCount=0