diff sources/download_functions.sh @ 1552:c3b91b70cc42

Remove USE_ALT option, I have a better idea (upcoming patch).
author Rob Landley <rob@landley.net>
date Tue, 30 Oct 2012 19:55:35 -0500
parents 90e6bdb0204b
children da21ff27331e
line wrap: on
line diff
--- a/sources/download_functions.sh	Tue Oct 09 00:05:38 2012 -0500
+++ b/sources/download_functions.sh	Tue Oct 30 19:55:35 2012 -0500
@@ -57,10 +57,7 @@
 {
   mkdir -p "$SRCTREE" || dienow
 
-  # Figure out whether we're using an alternative version of a package.
-
   PACKAGE="$1"
-  is_in_list "$PACKAGE" $USE_ALT && PACKAGE=alt-"$PACKAGE"
 
   # Announce to the world that we're cracking open a new package
 
@@ -193,7 +190,6 @@
 {
   FILENAME=`echo "$URL" | sed 's .*/  '`
   [ -z "$RENAME" ] || FILENAME="$(echo "$FILENAME" | sed -r "$RENAME")"
-  ALTFILENAME=alt-"$(noversion "$FILENAME" -0)"
 
   if [ -z "$(sha1sum < /dev/null)" ]
   then
@@ -203,37 +199,13 @@
 
   echo -ne "checking $FILENAME\r"
 
-  # Update timestamps on both stable and alternative tarballs (if any)
-  # so cleanup_oldfiles doesn't delete stable when we're building alt
-  # or vice versa
+  # Update timestamp on tarball (if it exists) so cleanup_oldfiles keeps it
 
-  touch -c "$SRCDIR"/{"$FILENAME","$ALTFILENAME"} 2>/dev/null
+  touch -c "$SRCDIR"/"$FILENAME" 2>/dev/null
 
   # Give package name, minus file's version number and archive extension.
   BASENAME="$(noversion "$FILENAME")"
 
-  # If alternative version selected, try from listed location, and fall back
-  # to PREFERRED_MIRROR.  Do not try normal mirror locations for alt packages.
-
-  if is_in_list "$BASENAME" $USE_ALT
-  then
-    # If extracted source directory exists, don't download alt-tarball.
-    if [ -e "$SRCTREE/alt-$BASENAME" ]
-    then
-      echo "Using $SRCTREE/alt-$BASENAME"
-      return 0
-    fi
-
-    # Download new one as alt-packagename.tar.ext
-    FILENAME="$ALTFILENAME"
-    SHA1=
-
-    ([ ! -z "$PREFERRED_MIRROR" ] &&
-      download_from "$PREFERRED_MIRROR/$ALTFILENAME") ||
-      download_from "$ALT"
-    return $?
-  fi
-
   # If environment variable specifies a preferred mirror, try that first.
 
   if [ ! -z "$PREFERRED_MIRROR" ]