You are not logged in.

#1 2013-05-06 13:22:07

onny
Member
From: Europe
Registered: 2010-08-07
Posts: 46
Website

pkgcheck - Check your PKGBUILDs for upstream releases

Hey,
I wrote a small Python script which checks my PKGBUILD repository (usually several directories, one for every package containing the PKGBUILD) for upstream releases.
One could use it like this:
b667f1ddc63a8aed11173826ea04992d3c90e614.jpg
It parses the PKGBUILDs and compares their versions with the one in the AUR and the upstream version. To determine the upstream version, it uses two techniques:
- Add additional attribute to the PKGBUILD which provides instructions on how to fetch the upstream version number, e.g.:

_watch=('http://live-installer-autoupdate.s3.amazonaws.com/latest_version.js','([\d.]*\d+)')

As you can see, it fetches the webpage and applies an regex on it to return a version number as string.
- Given only an url or an url in the _watch attribute without regex, it checksums the page and compares the checksums on the next scan. To do this, pkgcheck stores a session file in ~/.local/share/pkgcheck.session with the following format:

[devolo-dlan-cockpit] 
md5 = 56d7df8e89b55055b7285346d02304ed
lastchecked = 1367842691.058724

[ttyrpld]
lastchecked = 1367843163.295527
md5 = 05f1f56a869444bfe9c18e146120230a

Without any additional argument (just a dir/file), pkgcheck should only return package stats for outdated entries in a tabular format. If you supply -a, pkgcheck lists all scanned packages, even up-to-date ones.

Please check it out at https://github.com/onny/pkgcheck and forgive me the bad quality of the code. It should be more a demonstration on how useful such a tool can be.
My inspiration for this tool was pkgbuild-watch (https://bbs.archlinux.org/viewtopic.php?pid=1116279) which, at least for me, was not really intuitive to use.

Dependencies:

yaourt -S parched-git python3-aur python-requests python-xdg

Best regards,
onny

Last edited by onny (2013-05-06 13:28:55)

Offline

#2 2013-05-06 15:15:16

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: pkgcheck - Check your PKGBUILDs for upstream releases

Offline

#3 2013-05-06 15:59:25

onny
Member
From: Europe
Registered: 2010-08-07
Posts: 46
Website

Re: pkgcheck - Check your PKGBUILDs for upstream releases

Interesting but different approach. Thank you for noticing, I'll consider to add this method in the next versions of pkgcheck.

Offline

Board footer

Powered by FluxBB