      # Grab the name of the target
      name=`echo ${this_script} | sed -e 's@[0-9]\{3\}-@@'`
  
-@@ -223,7 +235,9 @@
+@@ -223,7 +240,9 @@
      # and not to use chroot.
      case "${this_script}" in
        *kernfs)  wrt_run_as_root    "${this_script}" "$file" ;;

+EOF
+) >> $MKFILE.tmp
+fi
+}
+
+
+#----------------------------------#
+wrt_paco_log_blfs() {              # If the tmpfile exist, then log the current package
+#----------------------------------# and remove tempfile
+if [ $USE_PACO != 0 ] ; then
+(
+cat << EOF
+	@PACKAGE=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\
+	if [ -e $PACO_TMPFILE ]; then \\
+		paco -lp \$\$PACKAGE < $PACO_TMPFILE && \\
+		rm -f $PACO_TMPFILE; \\
+	fi;
+EOF
+) >> $MKFILE
+fi
+}
+
Index: common/paco-build-lfs.sh
===================================================================
--- common/paco-build-lfs.sh	(revision 0)

   done # end for file in chapter06/*
 }
 
@@ -304,6 +333,14 @@
                 wrt_run_as_chroot2 "$this_script" "$file"
               fi
         ;;
