Improve the list of installed LFS packages:
Take package names and versions from <sect1info> tags in lfs-full.xml
This commit is contained in:
parent
f73377282f
commit
6d1d77c1e8
1 changed files with 24 additions and 13 deletions
|
@ -216,19 +216,30 @@ sed -i -e '/xsltproc/,+6d' \
|
||||||
cat >> Makefile << EOF
|
cat >> Makefile << EOF
|
||||||
update:
|
update:
|
||||||
@echo Updating the tracking file
|
@echo Updating the tracking file
|
||||||
@LFS_LIST=\$\$(cat $BLFS_ROOT/packages.xml | \\
|
@for pack in \$\$(grep '<productname' ../$LFS_XML/tmp/lfs-full.xml | \\
|
||||||
sed -n '/lfs-6/,/LFS-Release/p' | \\
|
sed 's/.*>\([^<]*\)<.*/\1/' | \\
|
||||||
sed '/<sublist/,+1d' | \\
|
sort | uniq); do \\
|
||||||
sed -n '/<name>/p' | \\
|
VERSION=\$\$(grep -A1 "\$\$pack</product" \\
|
||||||
sed 's/<name>//;s/<\\/name>//'); \\
|
../$LFS_XML/tmp/lfs-full.xml | \\
|
||||||
for file in \$\$LFS_LIST *-*; do \\
|
head -n2| \\
|
||||||
xsltproc --stringparam packages ../packages.xml \\
|
sed -n '2s/.*>\([^<]*\)<.*/\1/p'); \\
|
||||||
--stringparam package \$\${file##*z-} \\
|
xsltproc --stringparam packages ../packages.xml \\
|
||||||
-o track.tmp \\
|
--stringparam package \$\$pack \\
|
||||||
../xsl/bump.xsl \$(TRACKING_FILE); \\
|
--stringparam version \$\$VERSION \\
|
||||||
sed -i 's@PACKDESC@$BLFS_ROOT/packdesc.dtd@' track.tmp; \\
|
-o track.tmp \\
|
||||||
xmllint --format --postvalid track.tmp > \$(TRACKING_FILE); \\
|
../xsl/bump.xsl \$(TRACKING_FILE); \\
|
||||||
rm track.tmp; \\
|
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
|
done
|
||||||
@touch \$@
|
@touch \$@
|
||||||
@echo -e "\n\n "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK
|
@echo -e "\n\n "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK
|
||||||
|
|
Reference in a new issue