[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 2 commits: reproducible Debian: refactor

Holger Levsen gitlab at salsa.debian.org
Thu May 2 15:49:47 BST 2019



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
8196e114 by Holger Levsen at 2019-05-02T14:29:41Z
reproducible Debian: refactor

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
c7d6f107 by Holger Levsen at 2019-05-02T14:47:11Z
reproducible Debian: deal with the rare case of 3 .buildinfo files with the same name

also deal with the - so far - hypothetical cases of 4 .buildinfo files
with the same name.

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


2 changed files:

- bin/reproducible_pool_buildinfos.sh
- bin/rsync2buildinfos.debian.net


Changes:

=====================================
bin/reproducible_pool_buildinfos.sh
=====================================
@@ -74,7 +74,6 @@ do_day(){
 			echo "on no $MONTHPATH/$DAY/$FILE does not exist, exiting."
 			exit 1
 		elif [ -e $FULLTARGET ] ; then
-
 			if [ ! -e "$FULLTARGET.0" ] ; then
 				ln -s $MONTHPATH/$DAY/$FILE $FULLTARGET.0
 				echo "$MONTHPATH/$DAY/$FILE linked from $FULLTARGET.0"
@@ -82,13 +81,22 @@ do_day(){
 			elif [ "$(readlink -f $FULLTARGET.0)" = "$MONTHPATH/$DAY/$FILE" ] ; then
 				# also ignoring this
 				:
+		else
+			# so far we found three such cases...
+			if [ ! -e "$FULLTARGET.1" ] ; then
+				ln -s $MONTHPATH/$DAY/$FILE $FULLTARGET.1
+				echo "$MONTHPATH/$DAY/$FILE linked from $FULLTARGET.1"
+				let COUNTER+=1
+			elif [ "$(readlink -f $FULLTARGET.1)" = "$MONTHPATH/$DAY/$FILE" ] ; then
+				# also ignoring this
+				:
 			else
-				echo "oh no $FULLTARGET.0 also exists and thus we don't know what to do, thus ignoring." >> $PROBLEMS
+				# so far, no such case has been found
+				echo "oh no $FULLTARGET.1 also exists and thus we don't know what to do, thus ignoring." >> $PROBLEMS
 				echo "$MONTHPATH/$DAY/$FILE is the source of the problem" >> $PROBLEMS
 				ls -l $FULLTARGET >> $PROBLEMS
 				ls -l $FULLTARGET.0 >> $PROBLEMS
 				echo >> $PROBLEMS
-				#exit 1
 			fi
 		fi
 	done
@@ -123,6 +131,9 @@ fi
 
 if [ -s $PROBLEMS ] ; then
 	echo problems stored in $PROBLEMS
+	cat $PROBLEMS
+	cat $PROBLEMS >> $BASEPATH/buildinfo-problems
+	exit 1
 else
 	rm $PROBLEMS
 fi


=====================================
bin/rsync2buildinfos.debian.net
=====================================
@@ -16,20 +16,26 @@
 YEAR="$(date -u +%Y)"
 MONTH="$(date -u +%m)"
 DAY="$(date -u +%d)"
-cd /srv/ftp-master.debian.org/buildinfo/
+TARGETHOST="profitbricks-build7-amd64.debian.net"
+TARGETDIR="/var/lib/jenkins/userContent/reproducible/debian/ftp-master.debian.org/buildinfo"
+SOURCEDIR="/srv/ftp-master.debian.org/buildinfo/"
 
 rsync_day(){
-	rsync -e ssh -av $YEAR/$MONTH/$DAY jenkins at profitbricks-build7-amd64.debian.net:/var/lib/jenkins/userContent/reproducible/debian/ftp-master.debian.org/buildinfo/$YEAR/$MONTH/
+	rsync -e ssh -av $YEAR/$MONTH/$DAY jenkins@$TARGETHOST:$TARGETDIR/$YEAR/$MONTH/
 }
 
 rsync_month(){
-	rsync -e ssh -av $YEAR/$MONTH jenkins at profitbricks-build7-amd64.debian.net:/var/lib/jenkins/userContent/reproducible/debian/ftp-master.debian.org/buildinfo/$YEAR/
+	rsync -e ssh -av $YEAR/$MONTH jenkins@$TARGETHOST:$TARGETDIR/$YEAR/
 }
 
 rsync_year(){
-	rsync -e ssh -av $YEAR jenkins at profitbricks-build7-amd64.debian.net:/var/lib/jenkins/userContent/reproducible/debian/ftp-master.debian.org/buildinfo/
+	rsync -e ssh -av $YEAR jenkins@$TARGETHOST:$TARGETDIR/
 }
 
+#
+# main
+#
+cd $SOURCEDIR
 if [ -n "$1" ] ; then
 	for i in $(seq 2016 $YEAR) ; do
 		rsync_year



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/compare/5e3f7d34138466b7324cbddb609ad65535391c50...c7d6f1070eda784a03e272b3d760380899326fc4

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/compare/5e3f7d34138466b7324cbddb609ad65535391c50...c7d6f1070eda784a03e272b3d760380899326fc4
You're receiving this email because of your account on salsa.debian.org.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20190502/73b69fe2/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list