Ignore:
Timestamp:
12/16/2021 12:57:01 PM (3 years ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
ablfs-more, legacy, trunk
Children:
dd9ca56
Parents:
b8e5cad
Message:

Fix the logic for -pass1 packages in gen_pkg_book

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BLFS/gen_pkg_book.sh

    rb8e5cad r7ae9774  
    208208LIST=
    209209while read p; do
    210     p=${p%-pass1}
    211     versions=$(xsltproc --stringparam package "$p" $GetVersion $PackFile)
     210    if [ "$p" != "${p%-pass1}" ]; then
     211# If the pass2 is installed, no need for pass1. We get its
     212# installed version from TRACKFILE; We could use PackFile, but
     213# the test would be slightly more complicated.
     214echo Treating $p
     215        pass2_v=$(xsltproc --stringparam package "${p%-pass1}" \
     216                  $GetVersion $TRACKFILE | head -n1)
     217echo Found pass2_v=$pass2_v
     218        if [ -n "$pass2_v" ]; then continue; fi
     219# We need to get the installed version from TRACKFILE
     220        inst_v=$(xsltproc --stringparam package "$p" $GetVersion $TRACKFILE | \
     221                 head -n1)
     222        if [ -z "$inst_v" ]; then inst_v=0; fi
     223echo Found inst_v=$inst_v
     224# The available version is taken from PackFile
     225        avail_v=$(xsltproc --stringparam package "${p%-pass1}" \
     226                  $GetVersion $PackFile | head -n1)
     227echo Found avail_v=$avail_v
     228        versions="$avail_v
     229$inst_v"
     230        echo which gives versions=$versions
     231    else
     232        versions=$(xsltproc --stringparam package "$p" $GetVersion $PackFile)
     233    fi
    212234    if [ "$versions" != "$(sort -V <<<$versions)" ]; then
    213235        LIST="$LIST $p"
Note: See TracChangeset for help on using the changeset viewer.