diff options
author | kris <kris@FreeBSD.org> | 2004-07-14 18:37:48 +0800 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2004-07-14 18:37:48 +0800 |
commit | e1e7363534191d67123221d2ded4f1d81017fd81 (patch) | |
tree | c4f4d61224fe062e9001f39db88c4d2cd232e4f8 /Tools | |
parent | c8d73854eff0ed000ee8a9540686094d6a43b2f6 (diff) | |
download | freebsd-ports-gnome-e1e7363534191d67123221d2ded4f1d81017fd81.tar.gz freebsd-ports-gnome-e1e7363534191d67123221d2ded4f1d81017fd81.tar.zst freebsd-ports-gnome-e1e7363534191d67123221d2ded4f1d81017fd81.zip |
Generate permanent URLs in the error reports. The directories like
i386-5-latest that are linked to from the index.html are symlinks to
dated directories (e.5.`date`), so the URLs in the error reports will
expire with the start of the next build when the symlink is repointed.
This change makes the URLs in the error reports use the realpath of
the target file, so they do not expire.
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/portbuild/scripts/processlogs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Tools/portbuild/scripts/processlogs b/Tools/portbuild/scripts/processlogs index c4397f37eeb6..95eb974b85af 100755 --- a/Tools/portbuild/scripts/processlogs +++ b/Tools/portbuild/scripts/processlogs @@ -6,6 +6,8 @@ buildlogdir=$(realpath .) if [ "$2" != "" ]; then buildlogdir="$2"; fi +baselogdir=$(basename ${buildlogdir}) + # establish which directory INDEX lives in (leave out for # backwards compatibility) indexlogdir=$(realpath .) @@ -15,6 +17,13 @@ if [ "$3" != "" ]; then indexlogdir="$3"; fi scriptdir=$(dirname $0) errorscript=$scriptdir/processonelog +# Figure out which arch we're building for +pb=/var/portbuild +rpb=$(realpath ${pb} | sed -e "s,/$,," ) + +arch=$(echo ${buildlogdir} | sed -e "s,${rpb}/,," | cut -f 1 -d /) +. ${pb}/${arch}/portbuild.conf + # create a name for the tempfile of=.index.html @@ -112,7 +121,7 @@ for i in `cat .logs | sort`; do echo "<tr>" >> $of - echo "<td><a href=\"$1\">$2</a></td>" >> $of + echo "<td><a href=\"http://${master}/errorlogs/${arch}-errorlogs/${baselogdir}/$1\">$2</a></td>" >> $of affby=$3 test $affby = "0" -o $affby = "-1" && affby=" " |