Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36509 - Automatic "watcher" script
Summary: Automatic "watcher" script
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-26 02:51 UTC by Tom Payne (RETIRED)
Modified: 2005-01-11 09:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
gentoo-watch (gentoo-watch,7.02 KB, text/plain)
2003-12-26 02:51 UTC, Tom Payne (RETIRED)
Details
Example configuration file (.gentoo-watch.yaml,1.39 KB, text/plain)
2003-12-26 02:52 UTC, Tom Payne (RETIRED)
Details
Fixes the script to work with portage 2.0.51 (gentoo-watch-portage-2.0.51.patch,726 bytes, patch)
2004-08-27 05:43 UTC, Michael Kohl (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Payne (RETIRED) gentoo-dev 2003-12-26 02:51:24 UTC
Dear all Ruby bug-handlers,

I wrote the attached script to automatically scan project homepages for updated versions of packages, so as to keep the ebuilds in Gentoo as up-to-date as possible. It still seems to work, and might be useful to you, too.

To use:
copy gentoo-watch to somewhere in your path and chmod a+x
copy config file to ~/.gentoo-watch.yaml
run:
  gentoo-watch
or possibly:
  gentoo-watch --only-new
or possibly:
  gentoo-watch dev-ruby/ruby-dbi

Output is:
Package, version in portage, version found on homepage, state
state is:
* version on homepage is newer than version in portage (time to update!)
! version in portage is newer than version on homepage (has project moved?)
? could not extract version from homepage
  (space) version on homepage is equal to version in portage (do nothing ;-)

Some notes (sorry, I haven't written proper documentation):
- Needs ruby 1.8.0 (or 1.6.8 plus a few libraries)
- If run without arguments will use the config file ~/.gentoo-watch.yaml
- Config file is a list of packages to check, with optional hints to gentoo-watch when it doesn't do the right thing by default
- For most packages, gentoo-watch does the right thing
- Hints are:
  package-name: if the tarball name doesn't match the ebuild name
  extra-basename: if the tarball name is ebuild name+version+extra
  uri: where to scan
  regexp: to extract the version number from the homepage
  block: to convert a match object into a Version object
  sourceforge-project: sourceforge project name
  See the config file for examples.

If you have feedback on the script, or make improvements, please post it to this bug so all ruby devs can share.

Regards,

Tom

P.S. I've been very inactive at the moment because I'm doing a French language course in France and have _very_ limited Internet access (e.g. I can't emerge sync or repoman ci very often, but I can read email). I'll become more active when the course finishes (I hope), in early February 2004.
Comment 1 Tom Payne (RETIRED) gentoo-dev 2003-12-26 02:51:54 UTC
Created attachment 22667 [details]
gentoo-watch

The script
Comment 2 Tom Payne (RETIRED) gentoo-dev 2003-12-26 02:52:21 UTC
Created attachment 22668 [details]
Example configuration file
Comment 3 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-12-28 13:04:28 UTC
What a cool script :) I'm adding other packages to watch...
Will glad to see you active next year. Have good holydays ;)
Comment 4 Michael Kohl (RETIRED) gentoo-dev 2004-08-27 05:42:57 UTC
This script doesn't work for Portage 2.0.51_preXX (_pre20 is what I'm using). I created a little patch to fix that issue. 

It also changes the location of the config file from ~/.gentoo-watch.yaml to /etc/gentoo-watch.yaml, because I like this location better, but that's just personal taste I guess...

Thanks for the great script!
Comment 5 Michael Kohl (RETIRED) gentoo-dev 2004-08-27 05:43:51 UTC
Created attachment 38299 [details, diff]
Fixes the script to work with portage 2.0.51
Comment 6 Tom Payne (RETIRED) gentoo-dev 2005-01-11 09:33:50 UTC
Closing this bug as it's been around for a while and isnt't really a bug :-)