[Qa-jenkins-scm] [jenkins.debian.net] 02/02: reproducible Arch Linux: delete old pkg files after the new ones have been created
Holger Levsen
holger at layer-acht.org
Thu Dec 14 11:01:46 UTC 2017
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 7dc06c901402f743d0a9dd0c4ee6012d9e5efdd5
Author: Holger Levsen <holger at layer-acht.org>
Date: Thu Dec 14 10:58:24 2017 +0000
reproducible Arch Linux: delete old pkg files after the new ones have been created
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
bin/reproducible_build_archlinux_pkg.sh | 9 ---------
bin/reproducible_html_archlinux.sh | 15 +++++++++++++++
2 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index 4b6eb16..057d86e 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -109,15 +109,6 @@ choose_package() {
exit 1
fi
echo "$(date -u ) - building package $SRCPACKAGE from '$REPOSITORY' now..."
- # clear files from previous builds
- # FIXME: while this is an improvement over the previous situation, where these files were kept forever
- # this is still bad, as now, during this build, some files are not accessable on the web anymore.
- for file in build1.log build2.log build1.version build2.version ; do
- [ ! -f $BASE/archlinux/$REPO/$SRCPACKAGE/$file ] || rm $BASE/archlinux/$REPO/$SRCPACKAGE/$file
- done
- for file in $BASE/archlinux/$REPO/$SRCPACKAGE/*BUILDINFO.txt $BASE/archlinux/$REPO/$SRCPACKAGE/*html ; do
- rm $file || true
- done
}
first_build() {
diff --git a/bin/reproducible_html_archlinux.sh b/bin/reproducible_html_archlinux.sh
index dbe581a..0709db0 100755
--- a/bin/reproducible_html_archlinux.sh
+++ b/bin/reproducible_html_archlinux.sh
@@ -202,6 +202,21 @@ create_pkg_state_and_html() {
echo " </td>" >> $HTML_BUFFER
echo " </tr>" >> $HTML_BUFFER
mv $HTML_BUFFER $ARCHLINUX_PKG_PATH/pkg.html
+
+ # clear files from previous builds
+ for file in build1.log build2.log build1.version build2.version ; do
+ if [ -f $BASE/archlinux/$REPO/$SRCPACKAGE/$file ] && [ $BASE/archlinux/$REPO/$SRCPACKAGE/pkg.build_duration -nt $BASE/archlinux/$REPO/$SRCPACKAGE/$file ] ; then
+ rm $BASE/archlinux/$REPO/$SRCPACKAGE/$file
+ echo "$BASE/archlinux/$REPO/$SRCPACKAGE/$file older than $BASE/archlinux/$REPO/$SRCPACKAGE/pkg.build_duration, thus deleting it."
+ fi
+ done
+ for file in $BASE/archlinux/$REPO/$SRCPACKAGE/*BUILDINFO.txt $BASE/archlinux/$REPO/$SRCPACKAGE/*html ; do
+ if [ -f $file ] && [ $BASE/archlinux/$REPO/$SRCPACKAGE/pkg.build_duration -nt $file ] ; then
+ echo "$file older than $BASE/archlinux/$REPO/$SRCPACKAGE/pkg.build_duration, thus deleting it."
+ rm $file
+ fi
+ done
+
}
#
--
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