[jhalfs] 03/04: [BLFS] Ticket #1730: clean the dependency list
| Newsgroups | gmane.linux.lfs.automated |
|---|---|
| Message-ID | <[email protected]> |
This is an automated email from the git hooks/post-receive script. git pushed a commit to branch trunk in repository jhalfs. commit a690d42f8897a8cdae5b56396e685c26839899f5 Author: Pierre Labastie <[email protected]> AuthorDate: Sun Dec 12 18:39:03 2021 +0100 [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... --- BLFS/gen_pkg_book.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/BLFS/gen_pkg_book.sh b/BLFS/gen_pkg_book.sh index 7acbbb6..1adbad9 100755 --- a/BLFS/gen_pkg_book.sh +++ b/BLFS/gen_pkg_book.sh @@ -22,6 +22,7 @@ declare LibDir="${TOPDIR}/libs" declare PackFile="${TOPDIR}/packages.xml" declare BookXml="${TOPDIR}/book.xml" declare MakeBook="${TOPDIR}/xsl/make_book.xsl" +declare GetVersion="${TOPDIR}/xsl/get_version.xsl" declare MakeScripts="${TOPDIR}/xsl/scripts.xsl" declare BookHtml="${TOPDIR}/book-html" declare BLFS_XML="${TOPDIR}/blfs-xml" @@ -192,12 +193,24 @@ echo 1 >> root.tree cat root.dep >> root.tree generate_dependency_tree root.tree 1 echo -e "\n${SD_BORDER}" +echo Generating the ordered full dependency list +FULL_LIST="$(tree_browse root.tree)" +set -e +popd > /dev/null +#echo "$FULL_LIST" #echo -e \\n provisional end... #exit echo Generating the ordered package list -LIST="$(tree_browse root.tree)" -set -e -popd > /dev/null +LIST= +while read p; do + versions=$(xsltproc --stringparam package "$p" $GetVersion $PackFile) + if [ "$versions" != "$(sort -V <<<$versions)" ]; then + LIST="$LIST $p" + fi +done <<<$FULL_LIST +#echo \""$LIST"\" +#echo -e \\n provisional end... +#exit rm -f ${BookXml} echo Making XML book xsltproc --stringparam list "$LIST" \ -- To stop receiving notification emails like this one, please contact the administrator of this repository. -- http://lists.linuxfromscratch.org/sympa/info/alfs-discuss Unsubscribe: See the above information page