diff --git a/common/libs/func_install_blfs b/common/libs/func_install_blfs index a591d09..0188e89 100644 --- a/common/libs/func_install_blfs +++ b/common/libs/func_install_blfs @@ -216,19 +216,30 @@ sed -i -e '/xsltproc/,+6d' \ cat >> Makefile << EOF update: @echo Updating the tracking file - @LFS_LIST=\$\$(cat $BLFS_ROOT/packages.xml | \\ - sed -n '/lfs-6/,/LFS-Release/p' | \\ - sed '//p' | \\ - sed 's///;s/<\\/name>//'); \\ - for file in \$\$LFS_LIST *-*; do \\ - xsltproc --stringparam packages ../packages.xml \\ - --stringparam package \$\${file##*z-} \\ - -o track.tmp \\ - ../xsl/bump.xsl \$(TRACKING_FILE); \\ - sed -i 's@PACKDESC@$BLFS_ROOT/packdesc.dtd@' track.tmp; \\ - xmllint --format --postvalid track.tmp > \$(TRACKING_FILE); \\ - rm track.tmp; \\ + @for pack in \$\$(grep '\([^<]*\)<.*/\1/' | \\ + sort | uniq); do \\ + VERSION=\$\$(grep -A1 "\$\$pack\([^<]*\)<.*/\1/p'); \\ + xsltproc --stringparam packages ../packages.xml \\ + --stringparam package \$\$pack \\ + --stringparam version \$\$VERSION \\ + -o track.tmp \\ + ../xsl/bump.xsl \$(TRACKING_FILE); \\ + sed -i 's@PACKDESC@$BLFS_ROOT/packdesc.dtd@' track.tmp; \\ + xmllint --format --postvalid track.tmp > \$(TRACKING_FILE); \\ + rm track.tmp; \\ + done; \\ + for file in *-*; do \\ + xsltproc --stringparam packages ../packages.xml \\ + --stringparam package \$\${file##*z-} \\ + -o track.tmp \\ + ../xsl/bump.xsl \$(TRACKING_FILE); \\ + sed -i 's@PACKDESC@$BLFS_ROOT/packdesc.dtd@' track.tmp; \\ + xmllint --format --postvalid track.tmp > \$(TRACKING_FILE); \\ + rm track.tmp; \\ done @touch \$@ @echo -e "\n\n "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK