Index: BLFS/gen-makefile.sh
===================================================================
--- BLFS/gen-makefile.sh	(revision cac94f6008506fdb9b2b49e9dc9718995b4447bd)
+++ BLFS/gen-makefile.sh	(revision bc409178a81d6500b65b1f7aceb8d97f07f17b05)
@@ -5,13 +5,9 @@
 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
Index: BLFS/gen_config.sh
===================================================================
--- BLFS/gen_config.sh	(revision cac94f6008506fdb9b2b49e9dc9718995b4447bd)
+++ BLFS/gen_config.sh	(revision bc409178a81d6500b65b1f7aceb8d97f07f17b05)
@@ -7,10 +7,9 @@
 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
@@ -43,13 +42,16 @@
   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
 
@@ -60,9 +62,13 @@
          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
 
@@ -84,5 +90,7 @@
     # 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="/"
@@ -123,5 +131,5 @@
 cat << EOF
 	config CONFIG_$PKG_NAME
-		bool "$PKG_NAME ${PKG_VER}"
+		bool "$PKG_NAME ${PKG_VER} ${INST_VER}"
 		default n
 EOF
@@ -236,9 +244,4 @@
 		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
Index: BLFS/libs/func_dependencies
===================================================================
--- BLFS/libs/func_dependencies	(revision cac94f6008506fdb9b2b49e9dc9718995b4447bd)
+++ BLFS/libs/func_dependencies	(revision bc409178a81d6500b65b1f7aceb8d97f07f17b05)
@@ -137,5 +137,4 @@
                        $GHOSTSCRIPT
                        $MAILSERVER
-                       $TRACKING_DIR
                 file:  depure.txt
                        $TARGET-index.xml.tmp
@@ -155,7 +154,5 @@
   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
 
   #------------------
@@ -183,5 +180,7 @@
     # 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
Index: blfs
===================================================================
--- blfs	(revision cac94f6008506fdb9b2b49e9dc9718995b4447bd)
+++ blfs	(revision bc409178a81d6500b65b1f7aceb8d97f07f17b05)
@@ -127,7 +127,7 @@
 # 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
