开发者

How the Google Chrome Linux version handles automatic version updation

开发者 https://www.devze.com 2022-12-25 06:11 出处:网络
开发者_开发问答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 l
开发者_开发问答

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:

  1. Adding the repository key:

    apt-key add - <<KEYDATA
    blah blah blah
    KEYDATA
    
  2. Piecing together the path to the sources.list.d directory from the apt-config variables Dir, Dir::Etc, and Dir::Etc::sourceparts.

  3. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消