diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-08-19 09:11:42 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-08-19 09:11:42 +0100 |
commit | 1aefad969769f1f6e23fa1359571a45603d7bd34 (patch) | |
tree | da878c507c6e6c55b50dece44904c8a78ab7518b /jenkinstool | |
parent | cbc9755e17d7b0c7b9a2dbc79b0624d8d45fb8e9 (diff) | |
download | jenkinstool-1aefad969769f1f6e23fa1359571a45603d7bd34.tar.gz |
Only update pbuilder if tarball is old
Diffstat (limited to 'jenkinstool')
-rwxr-xr-x | jenkinstool | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/jenkinstool b/jenkinstool index 1689060..3715827 100755 --- a/jenkinstool +++ b/jenkinstool @@ -75,8 +75,7 @@ then lib*) subdir=$(echo "$sourcepkg" | cut -c1-4) ;; *) subdir=$(echo "$sourcepkg" | cut -c1) ;; esac - pooldir="pool/main/$subdir" - poolurl="%(global.artifacts-url)s/debian/$pooldir" + poolurl="%(global.artifacts-url)s/debian/pool/main/$subdir/$sourcepkg" fi ''' @@ -207,7 +206,14 @@ reprepro -b "$base" export basetgz=/var/cache/pbuilder/base.tgz if [ -e "$basetgz" ] then - opts="--update --override-config" + if find $(dirname "$basetgz") -maxdepth 1 \ + -name $(basename "$basetgz") -mtime +1 + then + opts="--update --override-config" + else + echo "$basetgz is pretty new, keeping it" + exit + fi else opts="--create" fi @@ -366,7 +372,8 @@ temp="$(mktemp -d)" cd "$temp" dget -u "$poolurl/$dsc" mkdir result -sudo pbuilder --build --buildresult result --debbuildopts $binopt *.dsc +sudo pbuilder --build --buildresult result --allow-untrusted \ + --debbuildopts $binopt *.dsc dput "%(global.dput-host)s" \ "result/${sourcepkg}_${version}-1_%(host.arch)s.changes" cd "$curdir" |