[Git][qa/jenkins.debian.net][master] 2 commits: buildinfos.d.n: simplify logic

Holger Levsen (@holger) gitlab at salsa.debian.org
Sat Dec 14 10:00:54 GMT 2024



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


Commits:
e3fa9e78 by Jochen Sprickerhof at 2024-12-14T11:00:00+01:00
buildinfos.d.n: simplify logic

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

- - - - -
c5bd2cdd by Jochen Sprickerhof at 2024-12-14T11:00:34+01:00
buildinfos.d.n: Always prefer buildd buildinfo files

Move the -buildd.buildinfo logic to the linking phase as the non buildd
files could lie in a different date folder and thus be already linked.
The new logic instead moves the non buildd file to .old and adds a new
link.

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

- - - - -


1 changed file:

- bin/reproducible_pool_buildinfos.sh


Changes:

=====================================
bin/reproducible_pool_buildinfos.sh
=====================================
@@ -49,8 +49,6 @@ do_day(){
 	cd $DAY
 	for FILE in * ; do
 		# echo $FILE
-		# Ignore uploaded buildinfo file if one from the buildd exists
-		test "${FILE#*-buildd.buildinfo}" == "$FILE" -a -e "${FILE%.buildinfo}-buildd.buildinfo" && continue
 		PACKAGE=$(echo $FILE | cut -d '_' -f1)
 		if [ "${PACKAGE:0:3}" = "lib" ] ; then
 			POOLDIR="${PACKAGE:0:4}"
@@ -66,12 +64,7 @@ do_day(){
 			#echo " becomes $VERSION"
 		fi
 		ARCHITECTURE=$(grep ^Architecture: $FILE | cut -d ' ' -f2-|sed 's# #-#g')
-		ARCHSUFFIX=$(echo $FILE | cut -d '_' -f3)
-		if [ "${ARCHITECTURE}.buildinfo" != "$ARCHSUFFIX" ] ; then
-			ARCHSUFFIX="${ARCHITECTURE}.buildinfo"
-			#echo $FILE is really for $ARCHITECTURE
-		fi
-		FULLTARGET="$TARGETPATH/${PACKAGE}_${VERSION}_${ARCHSUFFIX}"
+		FULLTARGET="$TARGETPATH/${PACKAGE}_${VERSION}_${ARCHITECTURE}.buildinfo"
 		if [ "$(readlink -f $FULLTARGET)" = "$MONTHPATH/$DAY/$FILE" ] ; then
 				#echo "$FULLTARGET already points to $MONTHPATH/$DAY/$FILE thus ignoring this...."
 				:
@@ -83,7 +76,11 @@ do_day(){
 			echo "on no $MONTHPATH/$DAY/$FILE does not exist, exiting."
 			exit 1
 		elif [ -e $FULLTARGET ] ; then
-			if [ ! -e "$FULLTARGET.0" ] ; then
+			# prefer buildinfo file from the buildd
+			if [ "${FILE#*-buildd.buildinfo}" != "$FILE" ] ; then
+				mv $FULLTARGET $FULLTARGET.old
+				ln -s $MONTHPATH/$DAY/$FILE $FULLTARGET
+			elif [ ! -e "$FULLTARGET.0" ] ; then
 				ln -s $MONTHPATH/$DAY/$FILE $FULLTARGET.0
 				echo "$MONTHPATH/$DAY/$FILE linked from $FULLTARGET.0"
 				let COUNTER+=1



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/55adae4fd7a25c552f32984bea414cf5039afde6...c5bd2cdd5e8a2c86f3c89ef6c04a7e43ebb49784

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/55adae4fd7a25c552f32984bea414cf5039afde6...c5bd2cdd5e8a2c86f3c89ef6c04a7e43ebb49784
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/20241214/18acb070/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list