有人能告诉我Chrome的Linux beta版如何使用debian包管理器进行自动版本更新吗?我需要在 Linux 上实现类似于我的应用程序的东西,这里提供的信息会有很多帮助。我目前正在查看 debian 控制包中的 postinst 脚本,我可以看到 Chrome 使用 PGP 发布/订阅模型来获取 Linux 中的自动版本更新。我只是清楚地了解它是如何运作的。任何帮助将不胜感激。
谢谢
Can some one tell me how the Chrome's Linux beta version carry out automatic version updation using debian package manager. I need to implement something similar to my application on linux and information provided here would be of lot of help. I am currently checking out the postinst script present in the debian control package and I can see Chrome uses PGP publish/subscribe model for getting automated version updates in Linux. I just clear understanding of how that works. Any help would be greatly appreciated.
Thanks
发布评论
评论(1)
他们的脚本的主要内容是:
添加存储库密钥:
将
apt-config
变量中的sources.list.d
目录的路径拼凑在一起Dir
、Dir::Etc
和Dir::Etc::sourceparts
。将
将
google-chrome.list
文件放置到位。该脚本的其余部分大部分负责管理他们维护的存储库的多个版本,允许用户禁用它而不会生你的气,并优雅地处理禁用第三方存储库的操作系统升级。该脚本也会在日常 cron 作业中复制,主要用于最后一个用例。
我建议阅读脚本,理解它,然后修改它以满足您的需求,而不是尝试重写它。
请注意,此脚本仅确保存储库已启用。实际的升级留给用户和系统的更新通知程序。
The meat of their script is in:
Adding the repository key:
Piecing together the path to the
sources.list.d
directory from theapt-config
variablesDir
,Dir::Etc
, andDir::Etc::sourceparts
.Dropping the
google-chrome.list
file into place.Most of the rest of that script takes care of the multiple versions of repositories they maintain, allowing the user to disable it without getting pissed off at you, and gracefully handling an OS upgrade that disables third-party repos. The script is also duplicated in a daily cron job, mainly for that last use case.
I would recommend reading the script, understanding it, and then modifying it to suit your needs, rather than trying to rewrite it.
Note that this script only ensures that the repository is enabled. The actual upgrades are left to the user and the system's update notifier.