Patchwork [natty,lucid] UBUNTU: [Config] getabis enhancements

login
register
mail settings
Submitter Stefan Bader
Date July 18, 2012, 12:35 a.m.
Message ID <1342571713-10852-3-git-send-email-stefan.bader@canonical.com>
Download mbox | patch
Permalink /patch/171579/
State New
Headers show

Comments

Stefan Bader - July 18, 2012, 12:35 a.m.
- Allow to define DEBIAN to be run standalone
- Limit the amount of time wget waits for connections
- Print architecture of downloaded packages

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
 debian/scripts/misc/getabis |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
Tim Gardner - July 18, 2012, 5:57 p.m.

Patch

diff --git a/debian/scripts/misc/getabis b/debian/scripts/misc/getabis
index 2a1fc55..e89d042 100755
--- a/debian/scripts/misc/getabis
+++ b/debian/scripts/misc/getabis
@@ -1,12 +1,14 @@ 
 #!/bin/bash
 
-. debian/debian.env
-
 if [ "$#" != "2" ]; then
 	echo "Usage: $0 <release> <revision>" 1>&2
 	exit 1
 fi
 
+if [ "$DEBIAN" = "" ]; then
+	. debian/debian.env
+fi
+
 ver=$1
 revision=$2
 abi=$(echo $revision | awk -F. '{print $1}')
@@ -14,7 +16,7 @@  abi=$(echo $revision | awk -F. '{print $1}')
 verabi=$ver-$abi
 verfull=$ver-$revision
 
-WGET="wget --quiet -c"
+WGET="wget --tries=1 --timeout=10 --quiet -c"
 
 abidir="`pwd`/$DEBIAN/abi/$verfull"
 tmpdir="`pwd`/abi-tmp-$verfull"
@@ -33,7 +35,7 @@  getall() {
 			echo "Exists: $sub"
 			continue
 		fi
-		echo -n "Fetching $sub..."
+		echo -n "Fetching $sub($arch)..."
 		filename=linux-image-${verabi}-${sub}_${verfull}_${arch}.deb
 		cd $tmpdir
 		for r in "${repo_list[@]}"