Ignore:
Timestamp:
09/16/2021 04:30:58 AM (3 years ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
ablfs-more, legacy, trunk
Children:
e22aa96
Parents:
b5d1c50
Message:

Fix wrong VERSION variable for dev book

Using version from the ENTITY version line in gneral.ent is not
good anymore, since version is in version.ent for the dev book.
But it _is_ in general.ent for releases...
Use a different approach: take the profiled .xml, and use the
version in lsb-release.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/libs/func_book_parser

    rb5d1c50 r840b9ba  
    5454
    5555  cd $JHALFSDIR
    56   case $PROGNAME in
    57     clfs*)
    58       VERSION=$(xmllint --noent $BOOK/BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //'  -e 's/<\/.*//') ;;
    59     lfs)
    60       if [ "$INITSYS" = "sysv" ] ; then
    61         VERSION=$(grep 'ENTITY version ' $BOOK/general.ent| cut -d\" -f2)
    62       else
    63         VERSION=$(grep 'ENTITY versiond' $BOOK/general.ent| cut -d\" -f2)
    64       fi
    65       ;;
    66     *)
    67       VERSION=$(xmllint --noent $BOOK/prologue/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //'  -e 's/<\/.*//')  ;;
    68   esac
    69 
    7056  # Clean
    7157  rm -rf ${PROGNAME}-commands
     
    206192
    207193  # Create the packages file. We need it for proper Makefile creation
    208   # lfs does not use this anymore, but thei is taken care in the
    209   # funtion body
     194  # lfs does not use this anymore, but this is taken care in the
     195  # function body
    210196  create_package_list
    211197  # On the other hand, lfs needs two auxiliary files
     
    215201  fi
    216202
     203  # we create the VERSION variable here. Should maybe go into its own
     204  # function. But at this point we can use the profiled xml to get
     205  # version from lfs-release in the lfs case.
     206  case $PROGNAME in
     207    clfs*)
     208      VERSION=$(xmllint --noent $BOOK/BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //'  -e 's/<\/.*//') ;;
     209    lfs)
     210      VERSION=$(grep 'echo.*lfs-release' prbook.xml | sed 's/.*echo[ ]*\([^ ]*\).*/\1/')
     211      ;;
     212    *)
     213      VERSION=$(xmllint --noent $BOOK/prologue/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //'  -e 's/<\/.*//')  ;;
     214  esac
     215
    217216  # Done. Moving on...
    218217  get_sources
    219 
    220218}
    221219
Note: See TracChangeset for help on using the changeset viewer.