Offline Updates in KDE neon

From Offline Updates are Coming – KDE neon Developers’ Blog:

Unlike regular updates offline updates are not applied immediately but are only download and marked for installation on the next system restart. This has the tremendous advantage that you no longer need to interrupt whatever you are doing to update the system. They also prevent the system from entering a curious state of inconsistency resulting in an increased chance of bugs and crashes just after updating. Previously you might have been angrily looked at by Firefox, had Dolphin crash on you, or even got locked out of the session because the lockscreen jumped off a cliff after you applied an update. The reason for this is that most complex pieces of software really do not fare well if essential files change out from under it. Offline updates solve this problem by simply moving the installation stage to a time when the system is in a less vulnerable state.

What is changing exactly?

Starting today if you use Discover to update your KDE neon Unstable installation, instead of immediately applying the update it will download the package and notify you that you need to restart to complete the update. Upon starting the next time the update is finally applied.
Any other package management frontend will not perform offline updates. This most notably also includes the terminal interfaces pkcon and apt-get. Application distribution systems such as flatpak and snap are equally unaffected by this because they generally are not able to break the same way as system software can.

此功能的效果是……



……
从 Plasma 5.22 开始,此功能将是可选的:
Add a configuration setting for offline updates (!111) · Merge requests · Plasma / Discover · GitLab (kde.org)

为该功能辩护的主要理由是:

There is no code in package management which can prevent this. If you update a library while something that is using it is running, then it WILL break if the new version is ABI incompatible.

也有意见认为使用ostree会更好。

From Debian FAQ:

8.2. Debian claims to be able to update a running program; how is this accomplished?

The kernel (file system) in Debian GNU/Linux systems supports replacing files even while they’re being used.

We also provide a program called start-stop-daemon which is used to start daemons at boot time or to stop daemons when the runlevel is changed (e.g., from multi-user to single-user or to halt). The same program is used by installation scripts when a new package containing a daemon is installed, to stop running daemons, and restart them as necessary.

debian-goodies软件包提供checkrestart命令检测是否存在程序需要重新启动以使用库的更新版本,该程序仅适用于Debian及其衍生分发。软件包needrestart提供类似的功能,但是可以用于其他分发。二者的算法不同,因此可能会显示不同的结果。

昨天我在测试buster 10.9 gnome时,发现了类似的情况,就是在使用 gnome software GUI来更新系统后,会提示需要重新启动系统;

重启过程中,显示的字符提示信息比以前多了两行关于update的提示,大概意思是说系统正在update一些内容。稍后截个图传上来~

第二张图看倒数第二行和倒数第三行~


这也是Offline Updates,参见
https://blogs.gnome.org/hughsie/2012/06/04/offline-os-updates-looking-forward-to-gnome-3-6/
Gnome Software 和 Plasma Discover都使用了Packagekit 的 Offline Updates 功能,将更新的安装推迟到重新启动后。

kde neon不好用,如果网络不给力,neon官方软件服务器是在国外的,会导致很多kde软件包无法下载,在公司联通100M宽带才能下软件包。但是在我的家里宽带就变成0kb/s。

主要问题是 neon 没有镜像……

~$ pkcon repo-list
Getting repositories          [=========================]         
Finished                      [=========================]         
 Enabled    /etc/apt/sources.list.d/neon.list:deb http://archive.neon.kde.org/user/ focal main Focal (main)
 Enabled    /etc/apt/sources.list.d/neon.list:deb-src http://archive.neon.kde.org/user/ focal main Focal (main) Sources
 Enabled    /etc/apt/sources.list:deb https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse Focal (main restricted universe multiverse)
 Enabled    /etc/apt/sources.list:deb https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse Focal security (main restricted universe multiverse)
 Enabled    /etc/apt/sources.list:deb https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse Focal updates (main restricted universe multiverse)

neon 这个项目的定位本身就很奇怪……它不是一个分发,也不是单纯的 apt 存储库。

这个offline update通常是GUI update发生,是不是说在使用命令行apt upgrade的情况下,不会offline update?

Office Update 是 Packgekit 提供的,apt 不会有这种行为。

看这里:https://mirrorz.org/list/kde-neon

谢了。我看了一下,很难得,这个国内镜像站终于有了kde neon的仓库同步。我找个时间试试。把neon自带的仓库文件设置成这个地址看看。


特地开了虚拟机装了最新kde neon系统user版测试了一下,发现还是不行。这个外国语大学镜像站同步过来的neon user仓库有问题。一个文件死活下载不了,看来这个国内仓库没有同步完整。从而导致无法使用neon user kde软件包仓库。

目录/user/dists/focal/main/dep11/user/dists/bionic/main/dep11/在上游http://archive.neon.kde.org/存在,但是在镜像站mirrors.bfsu.edu.cn/kde-neon不存在,这会导致仓库中的元数据无法下载。


编辑:此问题以前就被报告过……参阅
[Mirror Request] KDE neon · Issue #562 · tuna/issues · GitHub

:joy:

我这也这样,看起来只是缺一些尺寸下的图标,没有太大关系。

Index of /kde-neon/user/dists/focal/main/ | 北京外国语大学开源软件镜像站 | BFSU Open Source Mirror 相比上游 Index of /user/dists/focal/main 缺了好多啊!

镜像站似乎对neon没有太大兴趣……否则不至于到现在连一个完整的镜像都没有。
KDE neon开始于2016年6月8日。

关系大了去了。。。。。就因为这个原因 这个源就禁用了。。。相当于neon只能用ubuntu源,自己的kde仓库没了。。。那我还不如去用kubuntu每日构建版。上面KDE桌面和程序也很新。

只是部分索引文件失效,不是整个源不能用。

那就怪了,为啥这个错误出现后,apt install kalzium就安装成了ubuntu 20.04LTS里面的19.12.3版本了?而且还有依赖错误。。。。

这个源残缺不全的,算了。