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
The meat of their script is in:
Adding the repository key:
apt-key add - <<KEYDATA blah blah blah KEYDATA
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.
精彩评论