[Blends-commit] [SCM] website branch, master, updated. 7b4480521c96287607bf3627567eda902b9c0019
Andreas Tille
tille at debian.org
Fri Feb 14 08:57:45 UTC 2014
The following commit has been merged in the master branch:
commit 7b4480521c96287607bf3627567eda902b9c0019
Author: Andreas Tille <tille at debian.org>
Date: Fri Feb 14 10:02:59 2014 +0100
Cope with debian/tests/control files (actually ignore these); better error handling for files with more than one matching line in SVN
diff --git a/misc/machine_readable/fetch-machine-readable b/misc/machine_readable/fetch-machine-readable
index 0276607..09596b6 100755
--- a/misc/machine_readable/fetch-machine-readable
+++ b/misc/machine_readable/fetch-machine-readable
@@ -45,6 +45,7 @@ svn_checkout_machine_readable () {
svn list --verbose svn://localhost/$1 --recursive | \
grep -v -e '/tags/' -e '/branches/' -e '/patches/' | \
grep -e "/control$" -e "/changelog$" -e "/copyright$" -e "/upstream$" -e "/upstream/metadata$" | \
+ grep -v "tests/control" | \
sed 's/^.*[[:space:]]\([^[:space:]]\+\)/\1/' \
> $TMPLIST
# debug
@@ -85,9 +86,15 @@ svn_checkout_machine_readable () {
destfile=${file%/metadata}
getfile=`grep -e "/$pkg/trunk/debian/$file$" -e "^$pkg/trunk/debian/$file$" -e "^$pkg/debian/$file$" -e "trunk/$pkg/debian/$file$" -e "/$pkg/[a-z]\+/trunk/debian/$file$" $TMPLIST 2>/dev/null` || true
if [ `echo "$getfile" | wc -l` -gt 1 ] ; then
- echo "Two different locations for $getfile" >> $ERRLOG
- getfile=`echo $getfile | head -n 1`
- echo " --->> simply choose the first one: $getfile" >> $ERRLOG
+ # try whether the package name really matches (no idea why the above partly fails
+ getfile=`echo $getfile | grep -w "$pkg"`
+ if [ `echo "$getfile" | wc -l` -gt 1 ] ; then
+ echo "Two different locations for $getfile" >> $ERRLOG
+ getfile=`echo $getfile | head -n 1`
+ echo " --->> simply choose the first one: $getfile" >> $ERRLOG
+ else
+ echo "??? for package $getfile there was a competing name ???" >> $ERRLOG
+ fi
fi
if [ "" != "$getfile" ] ; then
svn export svn://localhost/$1/$getfile >/dev/null 2>/dev/null
@@ -142,7 +149,7 @@ git_checkout_machine_readable () {
echo "Vcs-Git: git://git.debian.org$1" > $TARGETDIR/$firstletter/${srcname}.vcs
echo "Vcs-Browser: http://git.debian.org"`echo $1 | sed 's+^/git/+/?p=+'` >> $TARGETDIR/$firstletter/${srcname}.vcs
echo "Blend: `echo $2 | sed 's?/.*??'`" >> $TARGETDIR/$firstletter/${srcname}.vcs
- for file in `git ls-tree -r HEAD debian/ 2>/dev/null | grep -e "/control$" -e "/changelog$" -e "/copyright$" -e "/upstream$" -e "/upstream/metadata$" | sed 's/^[0-9]\+[[:space:]]\+blob[[:space:]]\+[0-9a-f]\+[[:space:]]\+//'` ; do
+ for file in `git ls-tree -r HEAD debian/ 2>/dev/null | grep -e "/control$" -e "/changelog$" -e "/copyright$" -e "/upstream$" -e "/upstream/metadata$" | grep -v "tests/control" | sed 's/^[0-9]\+[[:space:]]\+blob[[:space:]]\+[0-9a-f]\+[[:space:]]\+//'` ; do
# for very strange reasons in two cases (pkg-games/pentobi.git and pkg-octave/octave.git) the line above contains strings not starting with ^debian ... enforcing this
if echo $file | grep -q ^debian ; then
destfile=${file%/metadata}
--
Static and dynamic websites for Debian Pure Blends
More information about the Blends-commit
mailing list