Ignore:
Timestamp:
08/10/2017 03:25:12 PM (7 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
ablfs-more, legacy, trunk
Children:
b15261a
Parents:
f733772
Message:

Improve the list of installed LFS packages:
Take package names and versions from <sect1info> tags in lfs-full.xml

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/libs/func_install_blfs

    rf733772 r6d1d77c  
    217217update:
    218218        @echo Updating the tracking file
    219         @LFS_LIST=\$\$(cat $BLFS_ROOT/packages.xml | \\
    220                 sed -n '/lfs-6/,/LFS-Release/p' | \\
    221                 sed '/<sublist/,+1d' | \\
    222                 sed -n '/<name>/p' | \\
    223                 sed 's/<name>//;s/<\\/name>//'); \\
    224         for file in \$\$LFS_LIST *-*; do \\
    225         xsltproc --stringparam packages ../packages.xml \\
    226         --stringparam package \$\${file##*z-} \\
    227         -o track.tmp \\
    228         ../xsl/bump.xsl \$(TRACKING_FILE); \\
    229         sed -i 's@PACKDESC@$BLFS_ROOT/packdesc.dtd@' track.tmp; \\
    230         xmllint --format --postvalid track.tmp > \$(TRACKING_FILE); \\
    231         rm track.tmp; \\
     219        @for pack in \$\$(grep '<productname' ../$LFS_XML/tmp/lfs-full.xml | \\
     220                sed 's/.*>\([^<]*\)<.*/\1/' | \\
     221                sort | uniq); do \\
     222            VERSION=\$\$(grep -A1 "\$\$pack</product" \\
     223                        ../$LFS_XML/tmp/lfs-full.xml | \\
     224                head -n2|  \\
     225                sed -n '2s/.*>\([^<]*\)<.*/\1/p');  \\
     226            xsltproc --stringparam packages ../packages.xml \\
     227                --stringparam package \$\$pack \\
     228                --stringparam version \$\$VERSION \\
     229                -o track.tmp \\
     230                ../xsl/bump.xsl \$(TRACKING_FILE); \\
     231            sed -i 's@PACKDESC@$BLFS_ROOT/packdesc.dtd@' track.tmp; \\
     232            xmllint --format --postvalid track.tmp > \$(TRACKING_FILE); \\
     233            rm track.tmp; \\
     234        done; \\
     235        for file in *-*; do \\
     236            xsltproc --stringparam packages ../packages.xml \\
     237                --stringparam package \$\${file##*z-} \\
     238                -o track.tmp \\
     239                ../xsl/bump.xsl \$(TRACKING_FILE); \\
     240            sed -i 's@PACKDESC@$BLFS_ROOT/packdesc.dtd@' track.tmp; \\
     241            xmllint --format --postvalid track.tmp > \$(TRACKING_FILE); \\
     242            rm track.tmp; \\
    232243        done
    233244        @touch \$@
Note: See TracChangeset for help on using the changeset viewer.