r3952 - in jhalfs/branches/new_features/common: . libs

pierre at higgs.linuxfromscratch.org pierre at higgs.linuxfromscratch.org
Sun Apr 2 01:46:55 PDT 2017


Author: pierre
Date: Sun Apr  2 01:46:55 2017
New Revision: 3952

Log:
Merge trunk r3949 "Fix issues in clfs"

Modified:
   jhalfs/branches/new_features/common/libs/func_book_parser
   jhalfs/branches/new_features/common/urls.xsl

Modified: jhalfs/branches/new_features/common/libs/func_book_parser
==============================================================================
--- jhalfs/branches/new_features/common/libs/func_book_parser	Sun Apr  2 01:42:47 2017	(r3951)
+++ jhalfs/branches/new_features/common/libs/func_book_parser	Sun Apr  2 01:46:55 2017	(r3952)
@@ -8,9 +8,18 @@
   cd $JHALFSDIR
 
   if [ -z $WORKING_COPY ] ; then
-# Check for Subversion instead of just letting the script hit 'svn' and fail.
-    test `type -p svn` || eval "echo \"This feature requires Subversion.\"
-    exit 1"
+# Check for Subversion or git instead of just letting the script fail.
+    case $PROGNAME in
+      lfs | hlfs)
+        test `type -p svn` || eval "echo \"This feature requires Subversion.\"
+        exit 1"
+      ;;
+      clfs*)
+        test `type -p git` || eval "echo \"This feature requires Git.\"
+        exit 1"
+      ;;
+    esac
+
     echo -n "Downloading the $PROGNAME document, $LFSVRS version... "
 
     case $PROGNAME in
@@ -31,17 +40,22 @@
         echo $TREE
         git clone $GIT ${PROGNAME}-$LFSVRS >>$LOGDIR/$LOG 2>&1
         if [ ! $TREE == "development" ]; then
-           cd ${PROGNAME}-$LFSVRS
+           pushd ${PROGNAME}-$LFSVRS > /dev/null
            echo "Checking out $LFSVRS at $PWD in $TREE"
            git checkout ${TREE} >>$LOGDIR/$LOG 2>&1
+           popd > /dev/null
         fi
     else
       cd ${PROGNAME}-$LFSVRS
       case $PROGNAME in
-        clfs*)  git pull >>$LOGDIR/$LOG 2>&1
-                if [ ! $TREE == "development" ]; then
-                   git checkout ${TREE} >>$LOGDIR/$LOG 2>&1
-                fi
+        clfs*)
+          # If the repo is in "detached head" state, git pull fails, so get
+          # back first to master:
+          git checkout master >>$LOGDIR/$LOG 2>&1
+          git pull >>$LOGDIR/$LOG 2>&1
+              if [ ! $TREE == "development" ]; then
+                 git checkout ${TREE} >>$LOGDIR/$LOG 2>&1
+              fi
         ;;
         lfs | hlfs) svn up >>$LOGDIR/$LOG 2>&1 ;;
         *) ;;
@@ -49,7 +63,7 @@
     fi
     echo -ne "done\n"
 
-  else
+  else # Working copy
     echo -ne "Using $BOOK as book's sources ...\n"
   fi
 }

Modified: jhalfs/branches/new_features/common/urls.xsl
==============================================================================
--- jhalfs/branches/new_features/common/urls.xsl	Sun Apr  2 01:42:47 2017	(r3951)
+++ jhalfs/branches/new_features/common/urls.xsl	Sun Apr  2 01:46:55 2017	(r3952)
@@ -105,6 +105,9 @@
         <xsl:when test="contains($dirname, 'udev')">
           <xsl:text>udev/</xsl:text>
         </xsl:when>
+        <xsl:when test="contains($dirname, 'iputils')">
+          <xsl:text>iputils/</xsl:text>
+        </xsl:when>
         <xsl:otherwise>
           <xsl:value-of select="$dirname"/>
           <xsl:text>/</xsl:text>


More information about the alfs-log mailing list