changeset 768:27f007ea2129

Keep unstable tarballs around even when you do a build that doesn't use 'em.
author Rob Landley <rob@landley.net>
date Tue, 30 Jun 2009 20:16:59 -0500
parents dc19e20734ca
children 5cb8f24c116a
files sources/functions.sh
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/sources/functions.sh	Tue Jun 30 03:05:04 2009 -0500
+++ b/sources/functions.sh	Tue Jun 30 20:16:59 2009 -0500
@@ -224,7 +224,6 @@
   SUM="$(sha1file "$SRCDIR/$FILENAME" 2>/dev/null)"
   if [ x"$SUM" == x"$SHA1" ] || [ -z "$SHA1" ] && [ -f "$SRCDIR/$FILENAME" ]
   then
-    touch "$SRCDIR/$FILENAME"
     if [ -z "$SHA1" ]
     then
       echo "No SHA1 for $FILENAME ($SUM)"
@@ -275,12 +274,13 @@
 
   echo -ne "checking $FILENAME\r"
 
+  # Update timestamps on both stable and unstable tarballs (if any)
+  # so cleanup_oldfiles doesn't delete them
+  touch -c "$SRCDIR"/{"$FILENAME","$ALTFILENAME"} 2>/dev/null
+
   # Is the unstable version selected?
   if unstable "$(basename "$FILENAME")"
   then
-    # Keep old version around, if present.
-    touch -c "$SRCDIR/$FILENAME" 2>/dev/null
-
     # Download new one as alt-packagename.tar.ext
     FILENAME="$ALTFILENAME" SHA1= try_download "$UNSTABLE" ||
       ([ ! -z "$PREFERRED_MIRROR" ] && SHA1= FILENAME="$ALTFILENAME" try_download "$PREFERRED_MIRROR/$ALTFILENAME")