On Tue, Sep 12, 2006 at 11:06:56AM +0200, Richard Atterer wrote: >On Mon, Sep 11, 2006 at 06:22:47PM -0500, Carl Karsten wrote: >> I am trying to figure out how to poll a web server and only run the a >> process (see below) when the .jigdo file has been updated. >> >> I can get the Last-Modified timestamp from the server, and I can parse the >> output from wget looking for "Server file no newer than local file" but I >> am hoping there is a more elegant way. > >Well - that already *is* quite elegant. :-) > >If you want to be absolutely certain that the image has changed, you need >to download the .template file and check whether the checksum of the final >.iso has changed: > >jigdo-file list-template --template foo.template | grep ^image-info > >But I'm not sure whether it's worth it; the template files are quite big >for repeated downloads. You could implement this as a second step after the >server timestamp has caused curl to download the file. Or, if the jigdos have been prepared using JTE (as I see these have, in this particular case) then you also get extra information in the jigdo file, e.g.: ShortInfo='Ubuntu 6.10 "Edgy Eft" - Alpha i386' Info='Generated on Tue, 12 Sep 2006 07:34:05 +0100' # Template Hex MD5sum 81fba738177635aeb4be0afde5014fed # Template size 1528436 bytes # Image size 650088448 bytes The Debian weekly builds on cdimage use information like this when driving mkimage to work out which ISOs need to be built. -- Steve McIntyre, Cambridge, UK. steve@einval.com "Because heaters aren't purple!" -- Catherine Pitt
Attachment:
signature.asc
Description: Digital signature