** 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=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()
+   File "/usr/bin/unattended-upgrade", line 257, in call_adjusted
+     self.allowed_origins)
+   File "/usr/bin/unattended-upgrade", line 764, 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: 
+ 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 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
+ debug: marked_pkg: cliente-ldap: install=False, upgrade=False, delete=False
  Traceback (most recent call last):
-   File "/usr/bin/unattended-upgrade", line 259, in call_adjusted
+   File "/usr/bin/unattended-upgrade", line 257, in call_adjusted
      self.allowed_origins)
-   File "/usr/bin/unattended-upgrade", line 775, in ver_in_allowed_origin
+   File "/usr/bin/unattended-upgrade", line 764, 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

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1824341

Title:
  NoAllowedOrigin cause package removal

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1824341/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to