[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: create target if it doesnt exist

Holger Levsen holger at moszumanska.debian.org
Mon May 11 09:46:37 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 1b1feadd4ab909f545a513351b6a7197baa797a3
Author: Holger Levsen <holger at layer-acht.org>
Date:   Mon May 11 11:46:17 2015 +0200

    reproducible: create target if it doesnt exist
---
 bin/reproducible_create_meta_pkg_sets.sh | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/bin/reproducible_create_meta_pkg_sets.sh b/bin/reproducible_create_meta_pkg_sets.sh
index e972d11..3ab6496 100755
--- a/bin/reproducible_create_meta_pkg_sets.sh
+++ b/bin/reproducible_create_meta_pkg_sets.sh
@@ -41,6 +41,12 @@ convert_from_deb822_into_source_packages_only() {
 		> ${TMPFILE2} < $TMPFILE
 	sort -u ${TMPFILE2} > $TMPFILE
 }
+
+update_target() {
+	mv $TMPFILE $TARGET
+	echo "$(date) - $TARGET updated."
+}
+
 update_if_similar() {
 	# this is mostly done to not accidently overwrite the lists
 	# with garbage, eg. when external services are down
@@ -59,9 +65,11 @@ update_if_similar() {
 				echo "Warning: too much difference for $TARGET, aborting. Please investigate and update manually."
 				rm $TARGET.new
 			else
-				mv $TMPFILE $TARGET
-				echo "$(date) - $TARGET updated."
+				update_target
 			fi
+		else
+			# target does not exist, create it
+			update_target
 		fi
 	else
 		echo "$(date) - $TARGET not updated, $TMPFILE is empty."

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list