Index: common/libs/func_book_parser
===================================================================
--- common/libs/func_book_parser	(revision d928c71bca11555fad6f225e667808baba4e4947)
+++ common/libs/func_book_parser	(revision f33756b8abec04898f9242f439eae3a0a0973009)
@@ -32,11 +32,10 @@
            cd ${PROGNAME}-$LFSVRS
            echo "Checking out $LFSVRS at $PWD in $TREE"
-           git checkout -b ${TREE} ${TREE} >>$LOGDIR/$LOG 2>&1
+           git checkout ${TREE} >>$LOGDIR/$LOG 2>&1
         fi
     else
       cd ${PROGNAME}-$LFSVRS
       case $PROGNAME in
-        clfs*)  git checkout master >>$LOGDIR/$LOG 2>&1
-                git pull >>$LOGDIR/$LOG 2>&1
+        clfs*)  git pull >>$LOGDIR/$LOG 2>&1
                 if [ ! $TREE == "development" ]; then
                    git checkout ${TREE} >>$LOGDIR/$LOG 2>&1
Index: common/libs/func_wrt_Makefile
===================================================================
--- common/libs/func_wrt_Makefile	(revision d928c71bca11555fad6f225e667808baba4e4947)
+++ common/libs/func_wrt_Makefile	(revision f33756b8abec04898f9242f439eae3a0a0973009)
@@ -59,5 +59,5 @@
 
 
-#==== PACKAGES NAMES ===
+#==== PACKAGES NAMES AND VERSIONS ====
 
 #----------------------------------#
@@ -117,4 +117,39 @@
 }
 
+#----------------------------------#
+get_package_version() {            #
+#----------------------------------#
+# Those hacks may change depending on the invention of devs for tarball names.
+# Normally, we expect -digit to signal the beginning of the version field
+# but it may happen that there is no '-' (tcl, expect), that the version
+# field is ddd-d (pkg-config-lite-028-1, since sed is greedy, it finds only
+# the second dash) or that the first character of the version is not a digit
+# (iputils-s20121221)...
+  case ${1} in
+     tcl*|expect*|tzdata*|xmlts*|unzip*|lynx*)
+                           echo ${1} | sed -e 's@^[^[:digit:]]*@@' \
+                                           -e 's@\(-src\)*\.tar.*@@'
+        ;;
+     iputils*)             echo ${1} | sed -e 's@^.*-@@' \
+                                           -e 's@\.tar.*@@'
+        ;;
+     LVM*)                 echo ${1} | sed -e 's@^[^.]*\.@@' \
+                                           -e 's@\.tgz.*@@'
+        ;;
+     iproute*)             echo ${1} | sed -e 's@^[^-]*-@@' \
+                                           -e 's@\.tar.*@@'
+        ;;
+     pkg*|udev*|Singular*)
+                           echo ${1} | sed -e 's@^.*[a-z]-\([[:digit:]]\)@\1@' \
+                                           -e 's@\.tar.*@@' \
+                                           -e 's@\.zip.*@@'
+        ;;
+     *)                    echo ${1} | sed -e 's@^.*[-_]\([[:digit:]]\)@\1@' \
+                                           -e 's@\.tar.*@@' \
+                                           -e 's@\.zip.*@@'
+        ;;
+  esac
+
+}
 #=======================
 
@@ -127,4 +162,8 @@
   local i=$1
   local PREV=$2
+  local version
+  if [ "$3" != "" ]; then
+    version=-$3
+  fi
 (
 cat << EOF
@@ -133,6 +172,6 @@
 	@\$(call echo_message, Building)
 ${NO_PROGRESS}	@export BASHBIN=\$(SHELL) && \$(SHELL) progress_bar.sh \$@ \$\$PPID &
-	@echo "\$(nl_)\`date\`\$(nl_)" >logs/\$@
-	@\$(PRT_DU) >>logs/\$@
+	@echo "\$(nl_)\`date\`\$(nl_)" >logs/\$@$version
+	@\$(PRT_DU) >>logs/\$@$version
 EOF
 ) >> $MKFILE.tmp
@@ -144,4 +183,8 @@
   local i=$1
   local PREV=$2
+  local version
+  if [ "$3" != "" ]; then
+    version=-$3
+  fi
 (
 cat << EOF
@@ -150,6 +193,6 @@
 	@\$(call echo_message, Building)
 ${NO_PROGRESS}	@export BASHBIN=\$(SHELL) && \$(SHELL) progress_bar.sh \$@ \$\$PPID &
-	@echo "\$(nl_)\`date\`\$(nl_)" >logs/\$@
-	@\$(PRT_DU_CR) >>logs/\$@
+	@echo "\$(nl_)\`date\`\$(nl_)" >logs/\$@$version
+	@\$(PRT_DU_CR) >>logs/\$@$version
 EOF
 ) >> $MKFILE.tmp
@@ -212,9 +255,13 @@
 LUSER_wrt_test_log() {             # Initialize testsuite log file
 #----------------------------------#
-  local TESTLOGFILE=$1
+  local version
+  if [ "$2" != "" ]; then
+    version=-$2
+  fi
+  local TESTLOGFILE=$1$version
 (
 cat  << EOF
 	@echo "export  TEST_LOG=\$(TESTLOGDIR)/$TESTLOGFILE" >> envars && \\
-	echo "\$(nl_)\`date\`\$(nl_)" >\$(TESTLOGDIR)/\$@
+	echo "\$(nl_)\`date\`\$(nl_)" >\$(TESTLOGDIR)/$TESTLOGFILE
 EOF
 ) >> $MKFILE.tmp
@@ -224,9 +271,13 @@
 CHROOT_wrt_test_log() {            #
 #----------------------------------#
-  local TESTLOGFILE=$1
+  local version
+  if [ "$2" != "" ]; then
+    version=-$2
+  fi
+  local TESTLOGFILE=$1$version
 (
 cat  << EOF
 	@echo "export TEST_LOG=\$(crTESTLOGDIR)/$TESTLOGFILE" >> envars && \\
-	echo "\$(nl_)\`date\`\$(nl_)" >test-logs/\$@
+	echo "\$(nl_)\`date\`\$(nl_)" >\$(crTESTLOGDIR)/$TESTLOGFILE
 EOF
 ) >> $MKFILE.tmp
@@ -242,4 +293,8 @@
 #----------------------------------#
   local MOUNT_ENV
+  local version
+  if [ "$2" != "" ]; then
+    version=-$2
+  fi
   local file=$1
 
@@ -256,6 +311,6 @@
 cat << EOF
 	@export ${MOUNT_ENV}=\$(MOUNT_PT) && \\
-	${PROGNAME}-commands/`dirname $file`/\$@ >>logs/\$@ 2>&1 && \\
-	\$(PRT_DU) >>logs/\$@
+	${PROGNAME}-commands/`dirname $file`/\$@ >>logs/\$@$version 2>&1 && \\
+	\$(PRT_DU) >>logs/\$@$version
 EOF
 ) >> $MKFILE.tmp
@@ -266,10 +321,14 @@
 #----------------------------------#
   local file=$1
+  local version
+  if [ "$2" != "" ]; then
+    version=-$2
+  fi
 
 (
 cat << EOF
 	@source ~/.bashrc && \\
-	\$(CMDSDIR)/`dirname $file`/\$@ >> logs/\$@ 2>&1 && \\
-	\$(PRT_DU) >>logs/\$@
+	\$(CMDSDIR)/`dirname $file`/\$@ >> logs/\$@$version 2>&1 && \\
+	\$(PRT_DU) >>logs/\$@$version
 EOF
 ) >> $MKFILE.tmp
@@ -280,9 +339,13 @@
 #----------------------------------#
   local file=$1
+  local version
+  if [ "$2" != "" ]; then
+    version=-$2
+  fi
 (
 cat << EOF
 	@source envars && \\
-	\$(crCMDSDIR)/`dirname $file`/\$@ >>logs/\$@ 2>&1 && \\
-	\$(PRT_DU_CR) >>logs/\$@
+	\$(crCMDSDIR)/`dirname $file`/\$@ >>logs/\$@$version 2>&1 && \\
+	\$(PRT_DU_CR) >>logs/\$@$version
 EOF
 ) >> $MKFILE.tmp
