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.
This commit is contained in:
parent
b5d1c50492
commit
840b9ba06e
1 changed files with 15 additions and 17 deletions
|
@ -53,20 +53,6 @@ extract_commands() { #
|
|||
#----------------------------#
|
||||
|
||||
cd $JHALFSDIR
|
||||
case $PROGNAME in
|
||||
clfs*)
|
||||
VERSION=$(xmllint --noent $BOOK/BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
||||
lfs)
|
||||
if [ "$INITSYS" = "sysv" ] ; then
|
||||
VERSION=$(grep 'ENTITY version ' $BOOK/general.ent| cut -d\" -f2)
|
||||
else
|
||||
VERSION=$(grep 'ENTITY versiond' $BOOK/general.ent| cut -d\" -f2)
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
VERSION=$(xmllint --noent $BOOK/prologue/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
||||
esac
|
||||
|
||||
# Clean
|
||||
rm -rf ${PROGNAME}-commands
|
||||
|
||||
|
@ -205,8 +191,8 @@ extract_commands() { #
|
|||
chmod -R +x $JHALFSDIR/${PROGNAME}-commands
|
||||
|
||||
# Create the packages file. We need it for proper Makefile creation
|
||||
# lfs does not use this anymore, but thei is taken care in the
|
||||
# funtion body
|
||||
# lfs does not use this anymore, but this is taken care in the
|
||||
# function body
|
||||
create_package_list
|
||||
# On the other hand, lfs needs two auxiliary files
|
||||
if [ "${PROGNAME}" = lfs ]; then
|
||||
|
@ -214,9 +200,21 @@ extract_commands() { #
|
|||
create_kernfs_scripts
|
||||
fi
|
||||
|
||||
# we create the VERSION variable here. Should maybe go into its own
|
||||
# function. But at this point we can use the profiled xml to get
|
||||
# version from lfs-release in the lfs case.
|
||||
case $PROGNAME in
|
||||
clfs*)
|
||||
VERSION=$(xmllint --noent $BOOK/BOOK/prologue/$ARCH/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
||||
lfs)
|
||||
VERSION=$(grep 'echo.*lfs-release' prbook.xml | sed 's/.*echo[ ]*\([^ ]*\).*/\1/')
|
||||
;;
|
||||
*)
|
||||
VERSION=$(xmllint --noent $BOOK/prologue/bookinfo.xml 2>/dev/null | grep subtitle | sed -e 's/^.*ion //' -e 's/<\/.*//') ;;
|
||||
esac
|
||||
|
||||
# Done. Moving on...
|
||||
get_sources
|
||||
|
||||
}
|
||||
|
||||
#----------------------------#
|
||||
|
|
Reference in a new issue