The following commit has been merged in the master branch:
commit 72dc0d1660addb3d18cf5ed3309ca034c1306c4a
Author: Andreas Tille <[email protected]>
Date: Thu Feb 13 17:25:53 2014 +0100
Deal with cases when there are more than one dir for a given package
diff --git a/misc/machine_readable/fetch-machine-readable
b/misc/machine_readable/fetch-machine-readable
index c27b493..0276607 100755
--- a/misc/machine_readable/fetch-machine-readable
+++ b/misc/machine_readable/fetch-machine-readable
@@ -83,7 +83,12 @@ svn_checkout_machine_readable () {
for file in control copyright upstream upstream/metadata ; do
srcfile=${file#upstream/}
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`
+ 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
+ fi
if [ "" != "$getfile" ] ; then
svn export svn://localhost/$1/$getfile >/dev/null 2>/dev/null
if [ -e $srcfile ] ; then
@@ -95,7 +100,7 @@ svn_checkout_machine_readable () {
if ! `echo $vcslocation | grep -q trunk` ; then
if [ "$destfile" != "upstream" ] ; then
echo "Package $pkg is lacking trunk directory in vcslocation
${vcslocation}. Try to find file $file anyway." >> $ERRLOG
- getfile=`grep -e "$vcslocation/debian/$file$" $TMPLIST
2>/dev/null`
+ getfile=`grep -e "$vcslocation/debian/$file$" $TMPLIST
2>/dev/null` || true
if [ "" != "$getfile" ] ; then
svn export svn://localhost/$1/$getfile >/dev/null
2>/dev/null
if [ -e $srcfile ] ; then
--
Static and dynamic websites for Debian Pure Blends
_______________________________________________
Blends-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/blends-commit