r3842 - in jhalfs/trunk/BLFS: libs xsl

pierre at higgs.linuxfromscratch.org pierre at higgs.linuxfromscratch.org
Mon Nov 23 06:22:48 PST 2015


Author: pierre
Date: Mon Nov 23 06:22:48 2015
New Revision: 3842

Log:
Print external dependencies when printing the dependency tree

Modified:
   jhalfs/trunk/BLFS/libs/func_dependencies
   jhalfs/trunk/BLFS/xsl/dependencies.xsl

Modified: jhalfs/trunk/BLFS/libs/func_dependencies
==============================================================================
--- jhalfs/trunk/BLFS/libs/func_dependencies	Mon Nov 23 06:14:23 2015	(r3841)
+++ jhalfs/trunk/BLFS/libs/func_dependencies	Mon Nov 23 06:22:48 2015	(r3842)
@@ -71,7 +71,7 @@
                        MAIL_SERVER contains the name of the MTA we want to use.
                 files: ../xsl/dependencies.xsl: stylesheet for creating the
                                                .dep files
-                       ../packages.xml:         Files containing packages id
+                       ../packages.xml:         File containing packages id
                                                 and dependencies
     returns:    0 if the tree has been successfully created
                 1 if we are backing up to the parent of a circular dep
@@ -111,6 +111,7 @@
     1) priostring=required ;;
     2) priostring=recommended ;;
     3) priostring=optional ;;
+    4) priostring=external ;;
 esac
 # start of DepFile
 echo -en "\nNode: $depth${spaceSTR:0:$depth}${RED}$DepFile${OFF} $priostring"
@@ -120,6 +121,7 @@
     1) dpriostring=required ;;
     2) dpriostring=recommended ;;
     3) dpriostring=optional ;;
+    4) dpriostring=external ;;
 esac
 # count entries in file
   (( count++ ))
@@ -160,7 +162,14 @@
     continue # this dependency has already been seen, and the associated
              # subtree computed. We are done
   fi # Has this entry already been seen?
-# So, this entry has not already been seen. Let's build the corresponding
+# So, this entry has not already been seen.
+# If this is an external dep, just display it and go to next dep:
+  if [ "$prio_of_dep" -eq 4 ]; then
+    echo "${rootlink[*]} $count" > ${id_of_dep}.dep
+    echo -en "\nLeaf: $(($depth+1))${spaceSTR:0:$(($depth+1))}${CYAN}${id_of_dep}${OFF} $dpriostring"
+    continue
+  fi
+# Otherwise, let's build the corresponding
 # subtree. Since decisions about circular deps can lead us to start again
 # dependencies, we restart until the flag is false.
   flag=true

Modified: jhalfs/trunk/BLFS/xsl/dependencies.xsl
==============================================================================
--- jhalfs/trunk/BLFS/xsl/dependencies.xsl	Mon Nov 23 06:14:23 2015	(r3841)
+++ jhalfs/trunk/BLFS/xsl/dependencies.xsl	Mon Nov 23 06:22:48 2015	(r3842)
@@ -83,7 +83,14 @@
       <xsl:with-param name="priority" select="1"/>
     </xsl:apply-templates>
     <xsl:if test="number($install_it)">
-      <xsl:value-of select="$priority"/>
+      <xsl:choose>
+        <xsl:when test="@type='link'">
+          <xsl:text>4</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$priority"/>
+        </xsl:otherwise>
+      </xsl:choose>
       <xsl:text> </xsl:text>
       <xsl:value-of select="$depname"/>
       <xsl:text>&#xA;</xsl:text>


More information about the alfs-log mailing list