r3032 - in jhalfs/branches/experimental: . BLFS BLFS/libs

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Mon Aug 21 14:57:53 PDT 2006


Author: manuel
Date: 2006-08-21 15:57:52 -0600 (Mon, 21 Aug 2006)
New Revision: 3032

Modified:
   jhalfs/branches/experimental/BLFS/gen-makefile.sh
   jhalfs/branches/experimental/BLFS/gen_config.sh
   jhalfs/branches/experimental/BLFS/libs/func_dependencies
   jhalfs/branches/experimental/blfs
Log:
Making use off installed version from packages database.
Not full tested yet.

Modified: jhalfs/branches/experimental/BLFS/gen-makefile.sh
===================================================================
--- jhalfs/branches/experimental/BLFS/gen-makefile.sh	2006-08-21 21:09:16 UTC (rev 3031)
+++ jhalfs/branches/experimental/BLFS/gen-makefile.sh	2006-08-21 21:57:52 UTC (rev 3032)
@@ -4,15 +4,11 @@
 #
 set -e
 
-# Uncomment this when reasy to be used
-#source ../configuration
-
 # TEMPORARY VARIABLES.. development use only
 declare MKFILE=Makefile
 declare PREV_PACKAGE=""
 declare BUILD_SCRIPTS=scripts
-# Remove this when we can use configuration
-declare TRACKING_DIR=/var/lib/jhalfs/BLFS
+declare TRACKING_DIR=tracking-dir
 
 HEADER="# This file is automatically generated by jhalfs
 # YOU MAY NEED TO EDIT THIS FILE MANUALLY

Modified: jhalfs/branches/experimental/BLFS/gen_config.sh
===================================================================
--- jhalfs/branches/experimental/BLFS/gen_config.sh	2006-08-21 21:09:16 UTC (rev 3031)
+++ jhalfs/branches/experimental/BLFS/gen_config.sh	2006-08-21 21:57:52 UTC (rev 3032)
@@ -6,12 +6,11 @@
 export outFile=aConfig.in	# file for reading and writing to.
 export inFile=packages		# file for reading and writing to.
 
-declare TRACKING_DIR=tracking-dir
-
 declare PKG_NAME
 declare PKG_XML_FILE
 declare PKG_DIR
 declare PKG_VER
+declare INST_VER
 declare SAVE_IFS=${IFS}
 declare -a DIR_TREE
 declare PREV_DIR1="none"
@@ -42,15 +41,18 @@
   PKG_XML_FILE=$(basename $2)
   PKG_DIR=$(dirname $2)
   PKG_VER=$3
+  INST_VER=$4
     # These are the META packages.
   if [ $PKG_DIR = "." ]; then
     SET_COMMENT=y
       # Do not include previously installed packages....
-    if [ -e $TRACKING_DIR/${PKG_NAME}-${PKG_VER} ]; then continue; fi
+    if [ -n "${PKG_VER}" ] && [ "x${PKG_VER}" = "x${INST_VER}" ]; then
+      continue
+    fi
 
     META_PKG=$(echo ${PKG_NAME} | tr [a-z] [A-Z])
     echo -e "config CONFIG_$META_PKG" >> $outFile
-    echo -e "\tbool \"$META_PKG $PKG_VER\"" >> $outFile
+    echo -e "\tbool \"$META_PKG $PKG_VER $INST_VER\"" >> $outFile
     echo -e "\tdefault n" >> $outFile
 
     echo -e "menu \"$(echo ${PKG_NAME} | tr [a-z] [A-Z]) components\"" >> $outFile
@@ -59,11 +61,15 @@
        while [ 0 ]; do
          read || break 1
          PKG_NAME=${REPLY}
-         PKG_VER=$(grep "^$PKG_NAME[[:space:]]" $inFile | cut -f3)
+         PKG_VER=$(grep "^${PKG_NAME}[[:space:]]" $inFile | cut -f3)
+         INST_VER=$(grep "^${PKG_NAME}[[:space:]]" $inFile | cut -f4)
+         if [ -n "${PKG_VER}" ] && [ "x${PKG_VER}" = "x${INST_VER}" ]; then
+           continue
+         fi
 (
 cat << EOF
 	config	DEP_${META_PKG}_${PKG_NAME}
-		bool	"$PKG_NAME ${PKG_VER}"
+		bool	"$PKG_NAME ${PKG_VER} ${INST_VER}"
 		default	y
 
 EOF
@@ -83,7 +89,9 @@
 
     # IF this package name-version exists in the tracking dir
     # do not add this package to the list of installable pkgs.
-  if [ -e $TRACKING_DIR/${PKG_NAME}-${PKG_VER} ]; then continue; fi
+  if [ -n "${PKG_VER}" ] && [ "x${PKG_VER}" = "x${INST_VER}" ]; then
+    continue
+  fi
 
   IFS="/"
   DIR_TREE=(${PKG_DIR})
@@ -122,7 +130,7 @@
 (
 cat << EOF
 	config CONFIG_$PKG_NAME
-		bool "$PKG_NAME ${PKG_VER}"
+		bool "$PKG_NAME ${PKG_VER} ${INST_VER}"
 		default n
 EOF
 ) >> $outFile
@@ -235,11 +243,6 @@
 	help
 		Select if sudo will be used (you want build as a normal user)
 		        otherwise sudo is not needed (you want build as root)
-
-config	TRACKING_DIR
-	string
-	default	$TRACKING_DIR
-
 EOF
 ) >> $outFile
 echo "done"

Modified: jhalfs/branches/experimental/BLFS/libs/func_dependencies
===================================================================
--- jhalfs/branches/experimental/BLFS/libs/func_dependencies	2006-08-21 21:09:16 UTC (rev 3031)
+++ jhalfs/branches/experimental/BLFS/libs/func_dependencies	2006-08-21 21:57:52 UTC (rev 3032)
@@ -136,7 +136,6 @@
                        $KBR5
                        $GHOSTSCRIPT
                        $MAILSERVER
-                       $TRACKING_DIR
                 file:  depure.txt
                        $TARGET-index.xml.tmp
                        $PKG.dep
@@ -154,9 +153,7 @@
   local PKG=$1
   local saveIFS=$IFS
   local DEP_LV=$DEP_LEVEL
-  local line line2 DEP pkg_ver
-  # Remove this when we can use configuration file
-  local TRACKING_DIR=/var/lib/jhalfs/BLFS
+  local line line2 DEP pkg_ver inst_ver
 
   #------------------
   #  If a premade xinclude file exists, use it. If not, create one
@@ -182,7 +179,9 @@
   for DEP in `cat dependencies/$PKG.dep`; do
     # If DEP has been previouly installed, skip it
     pkg_ver=$(grep "^${DEP}[[:space:]]" ../packages | cut -f3)
-    [ -e $TRACKING_DIR/${DEP}-$pkg_ver ] && continue
+    inst_ver=$(grep "^${DEP}[[:space:]]" ../packages | cut -f4)
+    [ -n "${pkg_ver}" ] && [ "x${pkg_ver}" = "x${inst_ver}" ] && continue
+
     # Special packages (a lot of hacks)
     case $DEP in
 

Modified: jhalfs/branches/experimental/blfs
===================================================================
--- jhalfs/branches/experimental/blfs	2006-08-21 21:09:16 UTC (rev 3031)
+++ jhalfs/branches/experimental/blfs	2006-08-21 21:57:52 UTC (rev 3032)
@@ -126,9 +126,9 @@
 
 # Set some harcoded envars to their proper values
 sed -i 's,blfs-xml,'$BLFS_XML',' update_book.sh libs/book.xsl
-sed -i 's,tracking-dir,'$TRACKING_DIR',' update_book.sh gen_config.sh
+sed -i 's,tracking-dir,'$TRACKING_DIR',' update_book.sh gen-makefile.sh
 
-# Fetch book sources and create packages and GNOME/KDE dependencies files
+# Fetch book sources and create packages and meta-packages dependencies files
 if [[ -d $BLFS_XML ]] ; then
   ./update_book.sh
 else




More information about the alfs-log mailing list