Commit c5bd2cdd authored by Jochen Sprickerhof's avatar Jochen Sprickerhof Committed by Holger Levsen
Browse files

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: default avatarHolger Levsen <holger@layer-acht.org>
parent e3fa9e78
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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}"
@@ -78,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