Author: tille
Date: Fri Jun  8 11:40:00 2012
New Revision: 3403

URL: http://svn.debian.org/wsvn/blends/?sc=1&rev=3403
Log:
Try harder to detect control + copyright file if it happens that SVN layout is 
not featuring a trunk directory

Modified:
    blends/trunk/machine_readable/fetch-machine-readable

Modified: blends/trunk/machine_readable/fetch-machine-readable
URL: 
http://svn.debian.org/wsvn/blends/blends/trunk/machine_readable/fetch-machine-readable?rev=3403&op=diff
==============================================================================
--- blends/trunk/machine_readable/fetch-machine-readable (original)
+++ blends/trunk/machine_readable/fetch-machine-readable Fri Jun  8 11:40:00 
2012
@@ -73,10 +73,25 @@
         echo "Vcs-Browser: http://svn.debian.org/wsvn/$1/$vcslocation"; >> 
$TARGETDIR/$firstletter/${srcname}.vcs
         echo "Blend: `echo $1 | sed 's?/.*??'`" >> 
$TARGETDIR/$firstletter/${srcname}.vcs
         for file in control copyright upstream ; do
-          getfile=`grep -e "/$pkg/trunk/debian/$file$" -e 
"^$pkg/trunk/debian/$file$" -e "^$pkg/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`
           if [ "" != "$getfile" ] ; then
             svn export svn://localhost/$1/$getfile >/dev/null
             mv $file $TARGETDIR/$firstletter/${srcname}.$file
+          else
+            if ! `echo $vcslocation | grep -q trunk` ; then
+              if [ "$file" != "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`
+                if [ "" != "$getfile" ] ; then
+                  svn export svn://localhost/$1/$getfile >/dev/null
+                  mv $file $TARGETDIR/$firstletter/${srcname}.$file
+                else
+                  if [ "$file" != "upstream" ] ; then
+                    echo "Did not found $file for package $pkg (`grep "$pkg" 
$TMPLIST | grep "$file"`)" >> $ERRLOG
+                  fi
+               fi
+              fi
+           fi
           fi
         done
       else


_______________________________________________
Blends-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/blends-commit

Reply via email to