Unattended-upgrades not working on Ubuntu (Debian)

I want to use “unattended-upgrades” in Ubuntu 20.04 to keep my client automatically up-to-date. According to “apt policy” this means I need to include the origin of the package, i.e. “https://minio.owncloud.services/clients/build-linux/${DRONE_BUILD_NUMBER}/repo/” into the list of Allowed-Origins in “/etc/apt/apt.conf.d/50unattended-upgrades”. Since the string includes a colon, whereas unattended-upgrades parser uses it to separate package origin from archive, I escaped the additional colon(s), ending up in an entry like this with an empty archive string:

Unattended-Upgrade::Allowed-Origins {

Subsequently my problem is now that obviously ${DRONE_BUILD_NUMBER} causes a Python key error like this:

sudo unattended-upgrades --dry-run -v
  File "/usr/lib/python3.8/string.py", line 119, in convert
    return str(mapping[named])

How can I fix this or maybe even better can the origin string be adjusted to allow for simple copy & paste from “apt policy”?


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.