r3020 - jhalfs/branches/experimental/BLFS

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sat Aug 19 07:45:11 PDT 2006


Author: manuel
Date: 2006-08-19 08:45:07 -0600 (Sat, 19 Aug 2006)
New Revision: 3020

Modified:
   jhalfs/branches/experimental/BLFS/gen-makefile.sh
Log:
Let gen-makefile.sh to get package version from packages database.

Modified: jhalfs/branches/experimental/BLFS/gen-makefile.sh
===================================================================
--- jhalfs/branches/experimental/BLFS/gen-makefile.sh	2006-08-19 14:15:25 UTC (rev 3019)
+++ jhalfs/branches/experimental/BLFS/gen-makefile.sh	2006-08-19 14:45:07 UTC (rev 3020)
@@ -50,10 +50,18 @@
 #----------------------------------#
   local pkg_name=$1
   local pkg_ver=$2
+
+  if [[ -n "$pkg_ver" ]] ; then
 (
 cat << EOF
+	@touch \$(TRACKING_DIR)/${pkg_name#*-?-}-${pkg_ver}
+EOF
+) >> $MKFILE.tmp
+  fi
+
+(
+cat << EOF
 	@touch  \$@ && \\
-	touch \$(TRACKING_DIR)/${pkg_name#*-?-}-${pkg_ver} && \\
 	sleep .25 && \\
 	echo -e "\n\n "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
 	echo --------------------------------------------------------------------------------\$(WHITE)
@@ -67,7 +75,7 @@
 #----------------------------#
   local script_name=$1
   local pkg_ver=$2
-  
+
   echo -n "${tab_}${tab_} entry for <$script_name>"
 
   #--------------------------------------------------------------------#
@@ -103,12 +111,10 @@
 
   for package_script in scripts/* ; do
     this_script=`basename $package_script`
-    script_ver=$(xmllint --noent ../blfs-xml/book/bookinfo.xml 2>/dev/null | \
-    		grep -i " ${this_script#*-?-}-version " | \
-		cut -d "\"" -f2 )
+    pkg_ver=$(grep "^${this_script#*-?-}[[:space:]]" ../packages | cut -f3)
     if [ ! -e $TRACKING_DIR/${this_script#*-?-}-$script_ver ]; then
       pkg_list="$pkg_list ${this_script}"
-     __write_entry "${this_script}" "${script_ver}"
+     __write_entry "${this_script}" "${pkg_ver}"
       PREV_PACKAGE=${this_script}
     fi
   done




More information about the alfs-log mailing list