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

Andreas Tille tille at debian.org
Sun Sep 6 06:27:01 UTC 2015


The following commit has been merged in the master branch:
commit 5977bd03878b04f7209d3e502ec8207d622d2314
Author: Andreas Tille <tille at debian.org>
Date:   Sun Sep 6 07:49:29 2015 +0200

    Fetch also README.Debian files

diff --git a/misc/machine_readable/fetch-machine-readable b/misc/machine_readable/fetch-machine-readable
index 407901a..e125638 100755
--- a/misc/machine_readable/fetch-machine-readable
+++ b/misc/machine_readable/fetch-machine-readable
@@ -6,6 +6,7 @@
 
 TDNAME=machine-readable
 MACHINEREADABLEARCHIVE=/srv/home/groups/blends/htdocs/${TDNAME}/${TDNAME}.tar.bz2
+READMEDEBIANARCHIVE=/srv/home/groups/blends/htdocs/${TDNAME}/README.Debian.tar.bz2
 TARGETDIR=${HOME}/$TDNAME
 mkdir -p $TARGETDIR
 
@@ -50,7 +51,7 @@ svn_checkout_machine_readable () {
   TMPLIST=`mktemp`
   svn list --verbose svn://localhost/svn/$1 --recursive | \
     grep -v -e '/tags/' -e '/branches/' -e '/patches/' | \
-    grep -e "/control$" -e "/changelog$" -e "/copyright$" -e "/upstream$" -e "/upstream/metadata$" | \
+    grep -e "/control$" -e "/changelog$" -e "/copyright$" -e "/upstream$" -e "/upstream/metadata$" -e "/README.Debian$" | \
     grep -v "tests/control" | \
     sed 's/^.*[[:space:]]\([^[:space:]]\+\)/\1/' \
     > $TMPLIST
@@ -71,7 +72,7 @@ svn_checkout_machine_readable () {
 #  set -x
   for pkgdir in `cat $PKGLIST` ; do
     pkg=`echo $pkgdir | sed -e 's?^.*/\([^/]\+\)?\1?'`
-    chlog=`grep  -e "/$pkg/[^/]\+/debian/changelog$" -e "^$pkg/trunk/debian/changelog$" -e "^$pkg/debian/changelog$" -e "/$pkg/debian/changelog$" -e "^[a-z]\+/$pkg/[a-z]\+/trunk/debian/changelog$" $TMPLIST | sort | tail -n 1 2>/dev/null`
+    chlog=`grep  -e "/$pkg/[^/]\+/debian/changelog$" -e "^$pkg/trunk/debian/changelog$" -e "^$pkg/debian/changelog$" -e "/$pkg/debian/changelog$" -e "/$pkg/debian/README.Debian$" -e "^[a-z]\+/$pkg/[a-z]\+/trunk/debian/changelog$" $TMPLIST | sort | tail -n 1 2>/dev/null`
     if [ "" != "$chlog" ] ; then
       svn export svn://localhost/svn/$1/$chlog >/dev/null
       srcname=`dpkg-parsechangelog -lchangelog 2>/dev/null | sed -n 's/^Source: //p'`
@@ -87,7 +88,7 @@ svn_checkout_machine_readable () {
           echo "Vcs-Svn: svn://anonscm.debian.org/$1/$vcslocation" > $TARGETDIR/$firstletter/${srcname}.vcs
           echo "Vcs-Browser: http://anonscm.debian.org/viewvc/$1/$vcslocation" >> $TARGETDIR/$firstletter/${srcname}.vcs
           echo "Blend: `echo $1 | sed 's?/.*??'`" >> $TARGETDIR/$firstletter/${srcname}.vcs
-          for file in control copyright upstream upstream/metadata ; do
+          for file in control copyright upstream upstream/metadata README.Debian; 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` || true
@@ -106,6 +107,9 @@ svn_checkout_machine_readable () {
               svn export svn://localhost/svn/$1/$getfile >/dev/null 2>/dev/null
               if [ -e $srcfile ] ; then
                 mv $srcfile $TARGETDIR/$firstletter/${srcname}.$destfile
+                if [ "$file" = "README.Debian" ] ; then
+                  echo "Has_README.Debian: yes" >> $TARGETDIR/$firstletter/${srcname}.vcs
+                fi
               else
                 echo "ERR 1: Can not obtain file ${file} of source ${srcname} of team $1 from ${getfile}" >> $ERRLOG
               fi
@@ -118,6 +122,9 @@ svn_checkout_machine_readable () {
                     svn export svn://localhost/svn/$1/$getfile >/dev/null 2>/dev/null
                     if [ -e $srcfile ] ; then
                       mv $srcfile $TARGETDIR/$firstletter/${srcname}.$destfile
+                      if [ "$file" = "README.Debian" ] ; then
+                        echo "Has_README.Debian: yes" >> $TARGETDIR/$firstletter/${srcname}.vcs
+                      fi
                     else
                       echo "ERR 2: Can not obtain file ${file} of source ${srcname} of team $1 from ${getfile}" >> $ERRLOG
                     fi
@@ -156,7 +163,7 @@ git_checkout_machine_readable () {
     echo "Vcs-Browser: https://anonscm.debian.org"`echo $1 | sed 's+^/git/+/cgit/+'` >> $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 "debian/control$" -e "debian/changelog$" -e "debian/copyright$" -e "debian/upstream$" -e "debian/upstream/metadata$" | \
+                 grep -e "debian/control$" -e "debian/changelog$" -e "debian/copyright$" -e "debian/upstream$" -e "debian/upstream/metadata$" -e "debian/README.Debian$" | \
                  sed 's/^[0-9]\+[[:space:]]\+blob[[:space:]]\+[0-9a-f]\+[[:space:]]\+//'` ; do
                  ## grep -v -e "debian/tests" -e "/usr/share/doc" -e "DEBIAN" -e "debian/components" -e "jquery" -e "debian/templates" | \
       # 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
@@ -164,6 +171,9 @@ git_checkout_machine_readable () {
         destfile=${file%/metadata}
         target=$TARGETDIR/$firstletter/${srcname}.`echo $destfile | sed 's?debian/??'`
         git show HEAD:$file > $target
+        if [ "$file" = "debian/README.Debian" ] ; then
+          echo "Has_README.Debian: yes" >> $TARGETDIR/$firstletter/${srcname}.vcs
+        fi
       fi
     done
   else
@@ -199,7 +209,8 @@ fi
 rm -f $MACHINEREADABLEARCHIVE
 cd $TARGETDIR
 cd ..
-tar -cjf $MACHINEREADABLEARCHIVE $TDNAME
+tar --exclude=README.Debian -cjf $MACHINEREADABLEARCHIVE $TDNAME
+tar --exclude=*.control --exclude=*.changelog --exclude=*.upstream --exclude=*.vcs --exclude=*.copyright -cjf $READMEDEBIANARCHIVE $TDNAME
 
 # Check for remaining tempfiles
 if ls -l /tmp/tmp.* 2>/dev/null | grep `whoami` > /dev/null ; then

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list