Ignore:
Timestamp:
12/12/2021 05:39:03 PM (3 years ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
ablfs-more, legacy, trunk
Children:
5e1d9dd
Parents:
1fc36f5
Message:

[BLFS] Ticket #1730: clean the dependency list

With the new xsl/dependencies.xsl, the full dependency list is generated.
We compare the version and installed version gotten from packages.xml
using xsl/get_version.xsl and only install if the installed version is
lower than the available version. Since the installed version returned
by get_version.xsl for a non installed package is 0, that version is
always lower than the available version and the package is installed.
Note that if a package does not exist, both versions are empty, and
they compare as equal with our method. So they are never installed...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BLFS/gen_pkg_book.sh

    r1fc36f5 ra690d42  
    2323declare BookXml="${TOPDIR}/book.xml"
    2424declare MakeBook="${TOPDIR}/xsl/make_book.xsl"
     25declare GetVersion="${TOPDIR}/xsl/get_version.xsl"
    2526declare MakeScripts="${TOPDIR}/xsl/scripts.xsl"
    2627declare BookHtml="${TOPDIR}/book-html"
     
    193194generate_dependency_tree root.tree 1
    194195echo -e "\n${SD_BORDER}"
     196echo Generating the ordered full dependency list
     197FULL_LIST="$(tree_browse root.tree)"
     198set -e
     199popd > /dev/null
     200#echo "$FULL_LIST"
    195201#echo -e \\n provisional end...
    196202#exit
    197203echo Generating the ordered package list
    198 LIST="$(tree_browse root.tree)"
    199 set -e
    200 popd > /dev/null
     204LIST=
     205while read p; do
     206    versions=$(xsltproc --stringparam package "$p" $GetVersion $PackFile)
     207    if [ "$versions" != "$(sort -V <<<$versions)" ]; then
     208        LIST="$LIST $p"
     209    fi
     210done <<<$FULL_LIST
     211#echo \""$LIST"\"
     212#echo -e \\n provisional end...
     213#exit
    201214rm -f ${BookXml}
    202215echo Making XML book
Note: See TracChangeset for help on using the changeset viewer.