Use latest logic for stage1 seed on hppa

This commit is contained in:
Raúl Porcel 2013-08-14 17:52:39 +00:00
parent 5c3f1d9036
commit 07f3c9743a
3 changed files with 29 additions and 3 deletions

View file

@ -4,5 +4,5 @@ version_stamp: 2008.0
rel_type: default
profile: default/linux/hppa/13.0
snapshot: 2008.0
source_subpath: default/stage3-hppa1.1-2008.0
source_subpath: default/stage3-hppa1.1-latest
update_seed: yes

View file

@ -4,5 +4,5 @@ version_stamp: 2008.0
rel_type: default
profile: default/linux/hppa/13.0
snapshot: 2008.0
source_subpath: default/stage3-hppa2.0-2008.0
source_subpath: default/stage3-hppa2.0-latest
update_seed: yes

View file

@ -19,11 +19,37 @@ EMAIL_SUBJECT_PREPEND="[hppa-auto]"
CATALYST_CONFIG=/etc/catalyst/catalyst.conf
BUILD_SRCDIR_BASE=`grep storedir= $CATALYST_CONFIG | cut -d '=' -f2 | sed -e 's/"//g'`
give_latest_from_dates() {
sed 's,-20,~20,g' | \
sort -k +1 -n -t '~' |\
awk -F\~ \
'BEGIN{i=$1; o=$0};
{ if($1 != i && i != "") { print o; }; i=$1; o=$0; }
END { print o; };' | \
tr '~' '-'
}
pre_build() {
cd ${GITDIR}
git pull
# Symlink the latest stages3 to build from
for d in ${BUILD_SRCDIR_BASE}/builds/default ; do
pushd $d
for t in hppa1.1 hppa2.0; do
for f in $(ls stage3-${t}*bz2 | give_latest_from_dates ) ; do
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for $
ln -sf $f $of
done
done
popd
done
}
post_build() {
rsync -e 'ssh -i /root/.ssh/buildsync.key' /usr/local/catalyst/builds/default/stage3-*${DATESTAMP}*.bz2* hppa@skimmer.gentoo.org:
rsync -e 'ssh -i /root/.ssh/buildsync.key' ${BUILD_SRCDIR_BASE}/builds/default/stage3-*${DATESTAMP}*.bz2* hppa@skimmer.gentoo.org:
}