[Blends-commit] [SCM] website branch, master, updated. d3757f505b347af1a780fb4c17a2f836a0879598

Andreas Tille tille at debian.org
Thu Feb 13 13:39:04 UTC 2014


The following commit has been merged in the master branch:
commit 15a5ae0717ab03b2a8d532da537a6963eae3d31e
Author: Andreas Tille <tille at debian.org>
Date:   Thu Feb 13 14:41:36 2014 +0100

    Support debian/upstream and debian/upstream/metadata (Patch from: James McCoy <jamessan at debian.org> - thanks)
    
    Date: Mon, 3 Feb 2014 21:33:48 -0500  + adapted to latest change

diff --git a/misc/machine_readable/fetch-machine-readable b/misc/machine_readable/fetch-machine-readable
index 8ac3de2..fa18f66 100755
--- a/misc/machine_readable/fetch-machine-readable
+++ b/misc/machine_readable/fetch-machine-readable
@@ -42,7 +42,7 @@ svn_checkout_machine_readable () {
   TMPLIST=`mktemp`
   svn list --verbose svn://localhost/$1 --recursive | \
     grep -v -e '/tags/' -e '/branches/' -e '/patches/' | \
-    grep -e "/control$" -e "/changelog$" -e "/copyright$" -e "/upstream$" | \
+    grep -e "/control$" -e "/changelog$" -e "/copyright$" -e "/upstream$" -e "/upstream/metadata$" | \
     sed 's/^.*[[:space:]]\([^[:space:]]\+\)/\1/' \
     > $TMPLIST
   # debug
@@ -78,31 +78,31 @@ svn_checkout_machine_readable () {
           echo "Vcs-Svn: svn://svn.debian.org/$1/$vcslocation" > $TARGETDIR/$firstletter/${srcname}.vcs
           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
+          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`
             if [ "" != "$getfile" ] ; then
               svn export svn://localhost/$1/$getfile >/dev/null 2>/dev/null
-              if [ -e $file ] ; then
-                mv $file $TARGETDIR/$firstletter/${srcname}.$file
+              if [ -e $srcfile ] ; then
+                mv $srcfile $TARGETDIR/$firstletter/${srcname}.$destfile
               else
                 echo "ERR 1: Can not obtain file ${file} of source ${srcname} of team $1 from ${getfile}" >> $ERRLOG
               fi
             else
               if ! `echo $vcslocation | grep -q trunk` ; then
-                if [ "$file" != "upstream" ] ; 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`
                   if [ "" != "$getfile" ] ; then
                     svn export svn://localhost/$1/$getfile >/dev/null 2>/dev/null
-                    if [ -e $file ] ; then
-                      mv $file $TARGETDIR/$firstletter/${srcname}.$file
+                    if [ -e $srcfile ] ; then
+                      mv $srcfile $TARGETDIR/$firstletter/${srcname}.$destfile
                     else
                       echo "ERR 2: Can not obtain file ${file} of source ${srcname} of team $1 from ${getfile}" >> $ERRLOG
                     fi
                   else
-                    if [ "$file" != "upstream" ] ; then
-                      echo "Did not found $file for package $pkg (`grep "$pkg" $TMPLIST | grep "$file"`)" >> $ERRLOG
-                    fi
+                    echo "Did not found $file for package $pkg (`grep "$pkg" $TMPLIST | grep "$file"`)" >> $ERRLOG
                   fi
                 fi
               fi
@@ -135,10 +135,11 @@ 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 HEAD debian/ 2>/dev/null | grep -e "/control$" -e "/changelog$" -e "/copyright$" -e "/upstream$" | 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$" | 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
-        target=$TARGETDIR/$firstletter/${srcname}.`echo $file | sed 's?debian/??'`
+        destfile=${file%/metadata}
+        target=$TARGETDIR/$firstletter/${srcname}.`echo $destfile | sed 's?debian/??'`
         git show HEAD:$file > $target
       fi
     done

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list