Score:1

Unattended upgrades for dotnet not working

cn flag

I am trying to configre unattended-upgrades for microsoft dotnet on ubuntu 20.04.2.

I added the origin and section to allowed-origins in my unattended-upgrades config:

    Unattended-Upgrade::Allowed-Origins {
        "${distro_id}:${distro_codename}";
        "${distro_id}:${distro_codename}-security";
        "${distro_id}ESMApps:${distro_codename}-apps-security";
        "${distro_id}ESM:${distro_codename}-infra-security";
        "${distro_id}:${distro_codename}-updates";
//      "${distro_id}:${distro_codename}-proposed";
//      "${distro_id}:${distro_codename}-backports";
        "microsoft-ubuntu-focal-prod:focal";
};

... and there are some dotnet upgrades waiting as reported by apt list --upgradeable:

aspnetcore-runtime-5.0/focal 5.0.7-1 amd64 [upgradable from: 5.0.6-1]
dotnet-host/focal 5.0.7-1 amd64 [upgradable from: 5.0.6-1]
dotnet-hostfxr-5.0/focal 5.0.7-1 amd64 [upgradable from: 5.0.6-1]
dotnet-runtime-5.0/focal 5.0.7-1 amd64 [upgradable from: 5.0.6-1]
dotnet-runtime-deps-5.0/focal 5.0.7-1 amd64 [upgradable from: 5.0.6-1]

... yet when I run sudo unattended-upgrades --dry-run --debug, I get:

Checking: aspnetcore-runtime-5.0 ([<Origin component:'main' archive:'focal' origin:'microsoft-ubuntu-focal-prod focal' label:'microsoft-ubuntu-focal-prod focal' site:'packages.microsoft.com' isTrusted:True>])
adjusting candidate version: aspnetcore-runtime-5.0=5.0.6-1
Checking: dotnet-host ([<Origin component:'main' archive:'focal' origin:'microsoft-ubuntu-focal-prod focal' label:'microsoft-ubuntu-focal-prod focal' site:'packages.microsoft.com' isTrusted:True>])
adjusting candidate version: dotnet-host=5.0.6-1
Checking: dotnet-hostfxr-5.0 ([<Origin component:'main' archive:'focal' origin:'microsoft-ubuntu-focal-prod focal' label:'microsoft-ubuntu-focal-prod focal' site:'packages.microsoft.com' isTrusted:True>])
adjusting candidate version: dotnet-hostfxr-5.0=5.0.6-1
Checking: dotnet-runtime-5.0 ([<Origin component:'main' archive:'focal' origin:'microsoft-ubuntu-focal-prod focal' label:'microsoft-ubuntu-focal-prod focal' site:'packages.microsoft.com' isTrusted:True>])
adjusting candidate version: dotnet-runtime-5.0=5.0.6-1
Checking: dotnet-runtime-deps-5.0 ([<Origin component:'main' archive:'focal' origin:'microsoft-ubuntu-focal-prod focal' label:'microsoft-ubuntu-focal-prod focal' site:'packages.microsoft.com' isTrusted:True>])
adjusting candidate version: dotnet-runtime-deps-5.0=5.0.6-1
pkgs that look like they should be upgraded:
Fetched 0 B in 0s (0 B/s)
fetch.run() result: 0
Packages blacklist due to conffile prompts: []
No packages found that can be upgraded unattended and no pending auto-removals
The list of kept packages can't be calculated in dry-run mode.

Any ideas what the issue is? Why are the 5x dotnet packages not being upgraded?

thanks in advance!

Score:1
cn flag
EM0

The syntax for the "origin" includes the release codename as well, as shown in the output of unattended-upgrades --dry-run --debug:

Checking: dotnet-hostfxr-6.0 ([<Origin component:'main' archive:'bionic' origin:'microsoft-ubuntu-bionic-prod bionic' label:'microsoft-ubuntu-bionic-prod bionic' site:'packages.microsoft.com' isTrusted:True>])

(in my case it's "bionic" instead of "focal"). So instead of "microsoft-ubuntu-focal-prod:focal" in Unattended-Upgrade::Allowed-Origins you need "microsoft-ubuntu-focal-prod focal:focal"

This should make it release-independent:

"microsoft-ubuntu-${distro_codename}-prod ${distro_codename}:${distro_codename}";
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.