summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-09-30 00:55:42 +0200
committerHolger Levsen <holger@layer-acht.org>2014-09-30 00:55:42 +0200
commit7fb3bf4cbca9634539b34726f8510d06f1c748a7 (patch)
tree0a387b4bbb61084d3f7ee27b70ff5602f323288b
parentd87ab94f0d71058c3d98356764323e124e07706a (diff)
downloadjenkins.debian.net-7fb3bf4cbca9634539b34726f8510d06f1c748a7.tar.xz
reproducible: fix logic
-rwxr-xr-xbin/reproducible_build.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 9cb477ed..b1d8f421 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -56,6 +56,7 @@ EOF
grep deb-src /etc/apt/sources.list | grep sid
sudo apt-get update
+set +x
# if $1 is an integer, build $1 random packages
if [[ $1 =~ ^-?[0-9]+$ ]] ; then
TMPFILE=$(mktemp)
@@ -79,7 +80,7 @@ if [[ $1 =~ ^-?[0-9]+$ ]] ; then
AMOUNT=$REAL_AMOUNT
for PKG in $PACKAGES ; do
RESULT=$(sqlite3 ${PACKAGES_DB} "SELECT name FROM job_sources WHERE ( name = '${PKG}' AND job = 'random' )")
- if [ "$RESULT" != "" ] ; then
+ if [ "$RESULT" = "" ] ; then
sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO job_sources VALUES ('$PKG','random')"
fi
done
@@ -108,12 +109,11 @@ else
JOB=$(echo $JOB_NAME|cut -d "_" -f3)
for PKG in $PACKAGES ; do
RESULT=$(sqlite3 ${PACKAGES_DB} "SELECT name FROM job_sources WHERE ( name = '${PKG}' AND job = '$JOB' )")
- if [ "$RESULT" != "" ] ; then
+ if [ "$RESULT" = "" ] ; then
sqlite3 -init $INIT ${PACKAGES_DB} "REPLACE INTO job_sources VALUES ('$PKG','$JOB')"
fi
done
fi
-set +x
echo
echo "=============================================================="
echo "The following source packages will be build: ${PACKAGES}"