r2713 - jhalfs/branches/experimental/BLFS

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Wed May 24 15:47:56 PDT 2006


Author: manuel
Date: 2006-05-24 16:47:56 -0600 (Wed, 24 May 2006)
New Revision: 2713

Modified:
   jhalfs/branches/experimental/BLFS/blfs-parser.sh
   jhalfs/branches/experimental/BLFS/func_dependencies
Log:
Changed circular dependencies handler to skip only the offended dependencies.
But don't look very stable yet (see comments about alsa-lib and jdk).
Not verified yet it all circular dependencies has been tracked.

Modified: jhalfs/branches/experimental/BLFS/blfs-parser.sh
===================================================================
--- jhalfs/branches/experimental/BLFS/blfs-parser.sh	2006-05-24 21:37:45 UTC (rev 2712)
+++ jhalfs/branches/experimental/BLFS/blfs-parser.sh	2006-05-24 22:47:56 UTC (rev 2713)
@@ -10,7 +10,7 @@
 declare VERBOSITY=1
 
 # Grab and name the command line options
-    optTARGET=$1 
+    optTARGET=$1
 optDEPENDENCY=$2
 
 
@@ -40,14 +40,14 @@
 validate_target() {       # ID of target package (as listed in packages file)
 #-------------------------#
 : <<inline_doc
-    function:   Validate the TARGET parameter. 
+    function:   Validate the TARGET parameter.
     input vars: $1, package/target to validate
     externals:  file: packages
     modifies:   TARGET
     returns:    nothing
     output:     nothing
     on error:   exit
-    on success: modifies TARGET 
+    on success: modifies TARGET
 inline_doc
 
   if [[ -z "$1" ]] ; then
@@ -79,7 +79,7 @@
 validate_dependency() {   # Dependencies level 1(required)/2(1 + recommended)/3(2+ optional)
 #-------------------------#
 : <<inline_doc
-    function:   Validate the dependency level requested. 
+    function:   Validate the dependency level requested.
     input vars: $1, requested dependency level
     externals:  vars: TARGET
     modifies:   vars: DEP_LEVEL
@@ -97,35 +97,10 @@
   fi
 
   case $1 in
-    1 | 2 )
+    1 | 2 | 3 )
       DEP_LEVEL=$1
       echo -e "\n\tUsing $DEP_LEVEL as dependencies level.\n"
       ;;
-      # Prevent circular dependencies when level 3
-      # cracklib-->python-->tk-->X-->linux-pam-->cracklib
-      # docbook-utils--> Optional dependencies are runtime only
-      # libxml2-->libxslt-->libxml2
-      # cyrus-sasl-->openldap-->cyrus-sasl
-      # alsa-lib-->doxygen-->graphviz-->jdk-->alsa-lib
-      # unixodbc-->qt-->unixodbc
-      # cups-->php-->sendmail-->espgs-->cups
-      # libexif-->graphviz-->php-->libexif
-      # esound-->aRts-->esound
-      # gimp-->imagemagick-->gimp
-    3 )
-      case $TARGET in
-        cracklib | docbook-utils | libxml2 | cyrus-sasl | alsa-lib | \
-        unixodbc | cups | libexif | esound | gimp )
-          DEP_LEVEL=2
-          echo -e "\n\t$TARGET have circular dependencies at level $1"
-          echo -e "\tUsing $DEP_LEVEL as dependencies level.\n"
-          ;;
-        * )
-          DEP_LEVEL=$1
-          echo -e "\n\tUsing $DEP_LEVEL as dependencies level.\n"
-          ;;
-      esac
-      ;;
     * )
       DEP_LEVEL=2
       echo -e "\n\t$1 is not a valid dependencies level."

Modified: jhalfs/branches/experimental/BLFS/func_dependencies
===================================================================
--- jhalfs/branches/experimental/BLFS/func_dependencies	2006-05-24 21:37:45 UTC (rev 2712)
+++ jhalfs/branches/experimental/BLFS/func_dependencies	2006-05-24 22:47:56 UTC (rev 2713)
@@ -17,7 +17,7 @@
                       PKGXML
 		      DEP_LEVEL
                 func: do_dependencies
-    modifies:   vars: PKGXML 
+    modifies:   vars: PKGXML
                       BLFS_XML
     returns:    nothing
     output:     files: $TARGET.dep
@@ -29,7 +29,7 @@
 
   local ENTRY_START
   local ENTRY_END
-  
+
   #---------------------
   # Create the working directory and cd into it
   mkdir $TARGET && cd $TARGET
@@ -111,14 +111,14 @@
                 file:  depure.txt
                        $TARGET-index.xml.tmp
                        $PKG.dep
-                       $PKG.inc		
+                       $PKG.inc
     modifies:   files
     returns:    nothing
     output:     file:  $PKG-xinc.tmp
                        depure.txt
                        $TARGET-index.xml.tmp
     on error:   exit
-    on success: 
+    on success:
 inline_doc
 
   set -e
@@ -147,16 +147,16 @@
     done
     return
   fi
-  
+
   #------------------
   # Start with a clean $PKG.xinc.tmp file
   > xincludes/$PKG.xinc.tmp
   for DEP in `cat dependencies/$PKG.dep`; do
     # Special packages (a lot of hacks)
     case $DEP in
-        
+
       db ) # The proper version of DB is installed in LFS
-        continue ;;        
+        continue ;;
       hal-requirements ) # ID value don't have their own XML package file
         continue ;;
       perl-* | tk-perl )  DEP=perl-modules ;;
@@ -173,13 +173,52 @@
 
     #------------------
     echo -e "\tDEP for $PKG is $DEP" >> depure.txt
+    # Prevent circular dependencies when level 3
     case $DEP in
-      # Circular dependencies at level 3
-      cracklib | docbook-utils | libxml2 | cyrus-sasl | alsa-lib | \
-      unixodbc | cups | libexif | esound | gimp )
-        [[ "$DEP_LV" = "3" ]] && DEP_LV=2
+      python )
+        # cracklib-->python-->tk-->X-->linux-pam-->cracklib
+        [[ "$PKG" = "cracklib" ]] && continue
         ;;
-      * ) DEP_LV=$DEP_LEVEL ;;
+      jadetex | perl-* | lynx | Links | w3m )
+        # Optional dependencies are runtime only
+        [[ "$PKG" = "docbook-utils" ]] && continue
+        ;;
+      libxslt )
+        # libxml2-->libxslt-->libxml2
+        [[ "$PKG" = "libxml2" ]] && continue
+        ;;
+      openldap | postgresql | $KBR5 )
+        # cyrus-sasl-->several-->cyrus-sasl
+        [[ "$PKG" = "cyrus-sasl" ]] && continue
+        ;;
+      doxygen )
+        # alsa-lib-->doxygen-->graphviz-->jdk-->alsa-lib
+        # Commented out due that it bomb "jdk 3" Why??
+        #[[ "$PKG" = "alsa-lib" ]] && continue
+        # libexif-->doxygen-->graphviz-->php-->libexif
+        [[ "$PKG" = "libexif" ]] && continue
+        ;;
+      qt )
+        # unixodbc-->qt-->unixodbc
+        [[ "$PKG" = "unixodbc" ]] && continue
+        ;;
+      espgs )
+        # sendmail-->espgs-->cups-->php-->sendmail
+        # We should to use $MAIL_SERVER, when it actually work :-/
+        [[ "$PKG" = "sendmail" ]] && continue
+        ;;
+      graphviz )
+        # libexif-->graphviz-->php-->libexif
+        [[ "$PKG" = "libexif" ]] && continue
+        ;;
+      aRts )
+        # esound-->aRts-->esound
+        [[ "$PKG" = "esound" ]] && continue
+        ;;
+      gimp )
+        # imagemagick-->gimp-->imagemagick
+        [[ "$PKG" = "imagemagick" ]] && continue
+        ;;
     esac
 
     #------------------
@@ -203,6 +242,9 @@
     # If not already created, create its dependencies list
     if [[ ! -f dependencies/$DEP.dep ]] ; then
       case $DEP in
+        alsa-lib ) ;; # Only one optional dependency and is recursive.
+                      # When placed inside the circular dependencies handler
+                      # some packages may bomb. But I don't know yet why
         # Meta-packages at dependency level (ugly *.dep files, but work for now)
         alsa ) # When dependency "alsa", use all alsa-* packages
           echo -e "alsa-oss\nalsa-firmware\nalsa-tools\nalsa-utils\n \
@@ -245,13 +287,13 @@
 	#
 	# If the recursion depth is not too great this is an acceptable methodology for a script language
 	# However, uncontrolled recursion will cause a seg-fault due to stack issues with local variables.
-	# 
+	#
         set +e
          [[ "${VERBOSITY}" > 0 ]] && echo -ne "\nrecursive call: $((++cntr)) ${spaceSTR:0:$cntr} ${RED}$DEP${OFF}"
             do_dependencies $DEP
          [[ "${VERBOSITY}" > 0 ]] && echo -ne  "\nrecursive ret:  $cntr ${spaceSTR:0:$((cntr--))} ${GREEN}$DEP${OFF}\tUsing the new xinclude file for PKG $DEP (to solve $PKG)"
         set -e
-	
+
         # Include it when done
         echo -e "\tUsing the new xinclude file for PKG $DEP (to solve $PKG)\n" >> depure.txt
         IFS=$'\x0A'




More information about the alfs-log mailing list