The proposed fix is clear cache on NoAllowedOriginError exception. ** Patch added: "fix clear cache on exception" https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1824341/+attachment/5254915/+files/uu_origin.patch
** Description changed: unattended-upgrades remove packages that shouldn't when there is a NoAllowedOrigin exception. Version: unattended-upgrades=1.1ubuntu1.18.04.10 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: $ 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 + debug: marked_pkg: cliente-ldap: install=False, upgrade=False, delete=True 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 + File "/usr/bin/unattended-upgrade", line 777, 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 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: samba-common + 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: samba-common 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 python-dnspython for removal + marking librados2 for removal + marking ldap-auth-client for removal + marking ldap-auth-config for removal + marking python-tdb for removal + marking libhx28 for removal + marking libcephfs2 for removal + marking nscd for removal + marking smbclient for removal + marking cliente-ldap for removal + marking libnss-db for removal marking samba-vfs-modules for removal + marking samba-dsdb-modules for removal + marking libpam-mount for removal + marking libpam-ldap for removal + marking nss-updatedb for removal + marking python-samba for removal + marking auth-client-config for removal + marking python-ldb for removal + marking libnss-ldap 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 samba for removal + marking libibverbs1 for removal 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 + marking libpam-ccreds for removal 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 + Packages that are kept back: samba-common-bin tdb-tools InstCount=0 DelCount=0 BrokenCount=0 - Log of what should happen: $ 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() + 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 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-dsdb-modules', 'samba-libs', 'samba-common', 'samba-vfs-modules', 'libsmbclient', 'smbclient', 'samba-common-bin'] Preconfiguring packages ... - /usr/bin/dpkg --status-fd 9 --no-triggers --unpack --auto-deconfigure --recursive /tmp/apt-dpkg-install-ZHXRWe - /usr/bin/dpkg --status-fd 9 --configure --pending + /usr/bin/dpkg --status-fd 9 --no-triggers --unpack --auto-deconfigure --recursive /tmp/apt-dpkg-install-ZHXRWe + /usr/bin/dpkg --status-fd 9 --configure --pending left to upgrade set() All upgrades installed InstCount=0 DelCount=0 BrokenCount=0 -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to unattended-upgrades in Ubuntu. https://bugs.launchpad.net/bugs/1824341 Title: NoAllowedOrigin cause package removal Status in unattended-upgrades package in Ubuntu: New Bug description: unattended-upgrades remove packages that shouldn't when there is a NoAllowedOrigin exception. Version: unattended-upgrades=1.1ubuntu1.18.04.10 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: $ 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=False, delete=True Traceback (most recent call last): File "/usr/bin/unattended-upgrade", line 259, in call_adjusted self.allowed_origins) File "/usr/bin/unattended-upgrade", line 777, 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 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: samba-common 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: samba-common marking ibverbs-providers for removal marking python-dnspython for removal marking librados2 for removal marking ldap-auth-client for removal marking ldap-auth-config for removal marking python-tdb for removal marking libhx28 for removal marking libcephfs2 for removal marking nscd for removal marking smbclient for removal marking cliente-ldap for removal marking libnss-db for removal marking samba-vfs-modules for removal marking samba-dsdb-modules for removal marking libpam-mount for removal marking libpam-ldap for removal marking nss-updatedb for removal marking python-samba for removal marking auth-client-config for removal marking python-ldb for removal marking libnss-ldap for removal marking python-crypto for removal marking samba for removal marking libibverbs1 for removal marking attr for removal marking libpam-ccreds for removal Packages that were successfully auto-removed: Packages that are kept back: samba-common-bin tdb-tools InstCount=0 DelCount=0 BrokenCount=0 Log of what should happen: $ 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 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-dsdb-modules', 'samba-libs', 'samba-common', 'samba-vfs-modules', 'libsmbclient', 'smbclient', 'samba-common-bin'] Preconfiguring packages ... /usr/bin/dpkg --status-fd 9 --no-triggers --unpack --auto-deconfigure --recursive /tmp/apt-dpkg-install-ZHXRWe /usr/bin/dpkg --status-fd 9 --configure --pending left to upgrade set() All upgrades installed InstCount=0 DelCount=0 BrokenCount=0 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1824341/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp