[jhalfs] 01/03: Reduce the number of parameter passed to lfs.xsl
"Git Owner" ([email protected] via alfs-discuss Mailing List) <[email protected]> Sun, 23 Feb 2025 14:44:47 +0000
| 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 4bd5951cbb00cd1d3d905c2d6a2005441ad04c4a Author: Pierre Labastie <[email protected]> AuthorDate: Sun Feb 23 15:34:40 2025 +0100 Reduce the number of parameter passed to lfs.xsl There is a limit of 32 parameters passed on the command line to xsltproc. To prevent reaching this limit, group some parameters, and remove obsolete ones: - remove UNICODE and FONTMAP - group luser:lgroup - group pkgmngt and wrap-install (nn, yn,yy) - group console parameters: font@keymap:local/log-level --- LFS/lfs.xsl | 47 ++++++++++++++++++++++++-------------------- common/libs/func_book_parser | 13 +++--------- jhalfs | 1 - 3 files changed, 29 insertions(+), 32 deletions(-) diff --git a/LFS/lfs.xsl b/LFS/lfs.xsl index 85baa8d..a2c389f 100644 --- a/LFS/lfs.xsl +++ b/LFS/lfs.xsl @@ -8,22 +8,24 @@ <!-- Parameters --> - <!-- User name of the temporary user (lfs in book) --> - <xsl:param name="luser" select="'lfs'"/> - <!-- Group name of the temporary user (lfs in book) --> - <xsl:param name="lgroup" select="'lfs'"/> - <!-- use package management ? - n = no, original behavior - y = yes, add PKG_DEST to scripts in install commands of chapter08-10 - --> - <xsl:param name="pkgmngt" select="'n'"/> + <!-- User name and group name of the temporary user + formatted as user:group (lfs:lfs in book) --> + <xsl:param name="luser-lgroup" select="'lfs:lfs'"/> + <!-- split it --> + <xsl:variable name="luser" select="substring-before($luser-lgroup, ':')"/> + <xsl:variable name="lgroup" select="substring-after($luser-lgroup, ':')"/> - <!-- Package management with "porg style" ? - n = no, same as pkgmngt description above - y = yes, wrap install commands of chapter08-10 into a bash function. - note that pkgmngt must be 'y' in this case + <!-- use package management ? + nn = no, original behavior + ny = Meaningless + yn = yes, add PKG_DEST to scripts in install commands of chapter08-10 + yy = yes, wrap install commands of chapter08-10 into a bash function + (porg style). --> - <xsl:param name="wrap-install" select='"n"'/> + <xsl:param name="pkgmngt-wrap" select="'nn'"/> + <!-- Split it --> + <xsl:variable name="pkgmngt" select="substring($pkgmngt-wrap,1,1)"/> + <xsl:variable name="wrap-install" select='substring($pkgmngt-wrap,2,1)'/> <!-- Run test suites? 0 = none @@ -73,13 +75,16 @@ <xsl:param name='nameserver1' select='"10.0.2.3"'/> <xsl:param name='nameserver2' select='"8.8.8.8"'/> - <!-- Console parameters: font, fontmap, unicode (y/n), keymap, local (y: - hardware clock set to local time/n:hardware clock set to UTC) - and log-level --> - <xsl:param name='font' select="'lat0-16'"/> - <xsl:param name='keymap' select="'us'"/> - <xsl:param name='local' select="'n'"/> - <xsl:param name='log-level' select="'4'"/> + <!-- Console parameters: font, keymap, local (y: + hardware clock set to local time/n:hardware clock set to UTC), + and log-level. + Formatted as font@keymap:local/log-level--> + <xsl:param name='console' select="'lat0-16@us:n/4'"/> + <!-- Split it --> + <xsl:variable name='font' select="substring-before($console,'@')"/> + <xsl:variable name='keymap' select="substring-before(substring-after($console,'@'),':')"/> + <xsl:variable name='local' select="substring-before(substring-after($console,':'),'/')"/> + <xsl:variable name='log-level' select="substring-after($console,'/')"/> <!-- The scripts root is needed for printing disk usage --> <xsl:param name='script-root' select="'jhalfs'"/> diff --git a/common/libs/func_book_parser b/common/libs/func_book_parser index c993386..62fd284 100644 --- a/common/libs/func_book_parser +++ b/common/libs/func_book_parser @@ -83,8 +83,7 @@ extract_commands() { # # Use the profiled book for generating the scriptlets xsltproc --nonet \ - --stringparam luser "$LUSER" \ - --stringparam lgroup "$LGROUP" \ + --stringparam luser-lgroup "$LUSER:$LGROUP"\ --stringparam testsuite "$TEST" \ --stringparam ncurses5 "$NCURSES5" \ --stringparam strip "$STRIP" \ @@ -93,8 +92,7 @@ extract_commands() { # --stringparam timezone "$TIMEZONE" \ --stringparam page "$PAGE" \ --stringparam lang "$LANG" \ - --stringparam pkgmngt "$PKGMNGT" \ - --stringparam wrap-install "$WRAP_INSTALL" \ + --stringparam pkgmngt-wrap "${PKGMNGT}${WRAP_INSTALL}" \ --stringparam hostname "$HOSTNAME" \ --stringparam interface "$INTERFACE" \ --stringparam ip "$IP_ADDR" \ @@ -104,12 +102,7 @@ extract_commands() { # --stringparam domain "$DOMAIN" \ --stringparam nameserver1 "$DNS1" \ --stringparam nameserver2 "$DNS2" \ - --stringparam font "$FONT" \ - --stringparam fontmap "$FONTMAP" \ - --stringparam unicode "$UNICODE" \ - --stringparam keymap "$KEYMAP" \ - --stringparam local "$LOCAL" \ - --stringparam log-level "$LOG_LEVEL" \ + --stringparam console "${FONT}@${KEYMAP}:${LOCAL}/$LOG_LEVEL" \ --stringparam script-root "$SCRIPT_ROOT" \ --stringparam jobs "$JOBS" \ --stringparam jobs-bp1 "$JOBSBP1" \ diff --git a/jhalfs b/jhalfs index 042a3e5..662ff9b 100755 --- a/jhalfs +++ b/jhalfs @@ -173,7 +173,6 @@ SET_HARDENED_TMP=${SET_HARDENED_TMP:=n} SET_WARNINGS=${SET_WARNINGS:=n} SET_MISC=${SET_MISC:=n} SET_BLOWFISH=${SET_BLOWFISH:=n} -UNICODE=${UNICODE:=n} LOCAL=${LOCAL:=n} ALL_CORES=${ALL_CORES:=n} REALSBU=${REALSBU:=n} -- 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