# HG changeset patch # User Antoine Bodin # Date 1300164441 -3600 # Node ID 5635a694843e59156a2b3d55c1e8482245b34010 # Parent 10a0f496be289ce9b47ca99a31cbf4ccd5d8f527 tazwok: ensure repository ID is up-to-date after a cook command diff -r 10a0f496be28 -r 5635a694843e TODO --- a/TODO Tue Mar 15 05:33:36 2011 +0100 +++ b/TODO Tue Mar 15 05:47:21 2011 +0100 @@ -31,11 +31,11 @@ [ ] Allow to download safe-wok using rsync [ ] Take advantage of --rootconfig of new tazpkg (after tazpkg 4.3 release only) [*] Generate the safe-wok, and optionally a tarbalized one -[รน] Rework detection of broken shared libs dependencies +[*] Rework detection of broken shared libs dependencies [ ] Check that packages are availbale before cooking [*] Check that repositories exists into tazpkg conf [*] Check that env is up to date, or upgrade, or propose upgrade if outside of chroot. [ ] Need to check priorities outside of chroot [*] Generate ID of the repository. -[ ] Ensure ID is up-dated after cook operations to avoid false-changes detection. +[*] Ensure ID is up-dated after cook operations to avoid false-changes detection. [ ] Ensure smooth tazwok update by automatically update cook environnement according new stuff diff -r 10a0f496be28 -r 5635a694843e tazwok --- a/tazwok Tue Mar 15 05:33:36 2011 +0100 +++ b/tazwok Tue Mar 15 05:47:21 2011 +0100 @@ -3547,5 +3547,19 @@ ;; esac +# If a cook command has been used, refresh ID of the repository to avoid +# useless upgrade at next cook command. +case $COMMAND in + cook*) + for repo in $PACKAGES_REPOSITORY $INCOMING_REPOSITORY \ + $( [ "$undigest" -a ! "$ref_USE_ONLINE_PKG" ] && echo $ref_PACKAGES_REPOSITORY ); do + [ -f $repo/ID ] || continue + MIRROR_path=$(grep -l "^$repo$" $LOCALSTATE/mirror $LOCALSTATE/undigest/*/mirror) + LOCALSTATE_path=${MIRROR_path%/mirror} + cp -a $repo/ID $LOCALSTATE_path + done + ;; +esac + report stop 2>/dev/null exit 0