首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >当无人值守的升级报告[包搁置]时,这意味着什么?

当无人值守的升级报告[包搁置]时,这意味着什么?
EN

Unix & Linux用户
提问于 2021-05-14 15:42:34
回答 1查看 821关注 0票数 2

我正在运行一个raspberry pi (Raspbian 10 - buster),无人值守的升级安装和配置。今天,我收到了一份邮件报告,内容如下:

代码语言:javascript
复制
Unattended upgrade result: All upgrades installed

Packages with upgradable origin but kept back:
 linux-libc-dev

目标:配置unattended-upgrades,使其不会因为延迟的包而向我发送通知(每天)。它可以自行安装,也可以不发送邮件报告。对我来说,将Unattended-Upgrade::MailOnlyOnError设置为true不是一种选择,因为我希望得到成功升级的通知。

我的配置如下:

代码语言:javascript
复制
/etc/apt/apt.conf.d/50unattended-upgrades
Unattended-Upgrade::Origins-Pattern {
        "origin=Debian,codename=${distro_codename},label=Debian";
        "origin=Debian,codename=${distro_codename},label=Debian-Security";
};

Unattended-Upgrade::Package-Blacklist {

};


Unattended-Upgrade::Mail "MYMAILADDRESS";
Unattended-Upgrade::Sender "SENDERADDRESS";

Unattended-Upgrade::Remove-Unused-Dependencies "true";

Unattended-Upgrade::Automatic-Reboot "true";

编辑: apt-cache policy linux-libc-dev的输出

代码语言:javascript
复制
linux-libc-dev:
  Installed: 4.18.20-2+rpi1
  Candidate: 1:1.20210430-2
  Version table:
     1:1.20210430-2 500
        500 http://archive.raspberrypi.org/debian buster/main armhf Packages
     5.10.28-1+rpi1 -1
         -1 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf Packages
 *** 4.18.20-2+rpi1 500
        500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
        100 /var/lib/dpkg/status

apt-get -d install linux-libc-dev输出

代码语言:javascript
复制
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
  linux-libc-dev
1 upgraded, 0 newly installed, 0 to remove and 23 not upgraded.
Need to get 1.011 kB of archives.
After this operation, 54,3 kB disk space will be freed.
Get:1 http://archive.raspberrypi.org/debian buster/main armhf linux-libc-dev armhf 1:1.20210430-2 [1.011 kB]
Fetched 1.011 kB in 0s (3.006 kB/s)      
Download complete and in download only mode

到目前为止,我只找到了一些文章,解释了如何通过将包-黑名单字段中的包放在一起来防止包被更新。然而,这在我的配置中是空的。那么,为什么包不能升级呢?还有另一种我不知道的配置,它可能会导致这种情况吗?它与我配置的“起源-模式”有关吗?

谢谢您事先提出的建议!

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2021-05-15 11:59:00

我想自动升级不能正常工作,因为发布文件http://archive.raspberrypi.org/debian/dists/buster/InReleasehttp://raspbian.raspberrypi.org/raspbian/dists/buster/InRelease没有一个等于DebianDebian-security的源文件。因此,这些存储库与Unattended-Upgrade::Origins-Pattern中的设置不匹配,并且没有为自动升级源候选程序选择。他们的相关资料分别是:

代码语言:javascript
复制
Origin: Raspberry Pi Foundation
Label: Raspberry Pi Foundation
Suite: testing
Codename: buster
Date: Fri, 14 May 2021 23:17:18 UTC
Architectures: armhf arm64 i386 amd64
Components: main ui untested

这真的很奇怪:测试而不是稳定,同样,拉伸被标记为稳定而不是旧的稳定。我猜这是一个技巧,因为(根据这个论坛) archive.raspberrypi.org是为了添加比raspbian.rasberrypi.org中提供的Debian稳定版本更新的软件,所以buster的状态被“升级”到了那里的测试。这只是一个假设,并不影响答案。

以及:

代码语言:javascript
复制
Origin: Raspbian
Label: Raspbian
Suite: stable
Codename: buster
Date: Sat, 15 May 2021 04:52:10 UTC
Architectures: armhf
Components: main contrib non-free rpi firmware

您应该编辑您的/etc/apt/apt.conf.d/50unattended-upgrades,以便条目匹配特定于Raspberry存储库的值。这应该是可行的:

代码语言:javascript
复制
Unattended-Upgrade::Origins-Pattern {
        "origin=Raspbian,codename=${distro_codename},label=Raspbian";
        "origin=Raspberry Pi Foundation,codename=${distro_codename},label=Raspberry Pi Foundation";
};

检查周围没有任何其他隐藏的东西也应该被改变。

我删除了Debian存储库,因为它配置了真的不建议使用Debian存储库,特别是用于自动升级。

票数 2
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/649702

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档