Author: pierre
Date: Sun Jul 5 22:38:54 2020
New Revision: 4185
Log:
Change numberings of scriptlets:
- major number can be on 4 digits, so use it in packInstall
- minor number (for package manager) can be greater than 10
- code on 2 digits
- change various files accordingly
Modified:
jhalfs/trunk/LFS/lfs.xsl
jhalfs/trunk/common/libs/func_wrt_Makefile
jhalfs/trunk/pkgmngt/packInstall.sh.dpkg
jhalfs/trunk/pkgmngt/packInstall.sh.pacman
jhalfs/trunk/pkgmngt/packInstall.sh.porg
jhalfs/trunk/pkgmngt/packInstall.sh.template
Modified: jhalfs/trunk/LFS/lfs.xsl
==============================================================================
--- jhalfs/trunk/LFS/lfs.xsl Sun Jul 5 22:31:55 2020 (r4184)
+++ jhalfs/trunk/LFS/lfs.xsl Sun Jul 5 22:38:54 2020 (r4185)
@@ -368,11 +368,17 @@
<xsl:variable name="pi-file" select="processing-instruction('dbhtml')"/>
<xsl:variable name="pi-file-value"
select="substring-after($pi-file,'filename=')"/>
<xsl:variable name="filename"
select="substring-before(substring($pi-file-value,2),'.html')"/>
+ <xsl:variable name="pos">
+ <xsl:if test="string-length(position()) = 1">
+ <xsl:text>0</xsl:text>
+ </xsl:if>
+ <xsl:value-of select="position()"/>
+ </xsl:variable>
<!-- Creating dirs and files -->
<xsl:if test="count(descendant::screen/userinput) > 0 and
count(descendant::screen/userinput) >
count(descendant::screen[@role='nodump'])">
- <exsl:document href="{$dirname}/{$order}-{position()}-{$filename}"
+ <exsl:document href="{$dirname}/{$order}-{$pos}-{$filename}"
method="text">
<xsl:text>#!/bin/bash
set +h
Modified: jhalfs/trunk/common/libs/func_wrt_Makefile
==============================================================================
--- jhalfs/trunk/common/libs/func_wrt_Makefile Sun Jul 5 22:31:55 2020
(r4184)
+++ jhalfs/trunk/common/libs/func_wrt_Makefile Sun Jul 5 22:38:54 2020
(r4185)
@@ -64,7 +64,7 @@
#----------------------------------#
get_package_tarball_name() { #
#----------------------------------#
- local script_name=`echo ${1} | sed -e 's@^[0-9]\{1\}-@@'`
+ local script_name=`echo ${1} | sed -e 's@^[0-9]\{2\}-@@'`
# The use of 'head' is necessary to limit the return value to the FIRST
match..
# hopefully this will not cause problems.
Modified: jhalfs/trunk/pkgmngt/packInstall.sh.dpkg
==============================================================================
--- jhalfs/trunk/pkgmngt/packInstall.sh.dpkg Sun Jul 5 22:31:55 2020
(r4184)
+++ jhalfs/trunk/pkgmngt/packInstall.sh.dpkg Sun Jul 5 22:38:54 2020
(r4185)
@@ -7,7 +7,7 @@
local PCKGVRS=$(basename $PKGDIR)
local TGTPKG=$(basename $PKG_DEST)
local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3\}-//' |
- sed 's/^[0-9]\{1\}-//')
+ sed 's/^[0-9]\{2\}-//')
case $PCKGVRS in
expect*|tcl*) local VERSION=$(echo $PCKGVRS | sed 's/^[^0-9]*//') ;;
vim*|unzip*) local VERSION=$(echo $PCKGVRS | sed
's/^[^0-9]*\([0-9]\)\([0-9]\)/\1.\2/') ;;
Modified: jhalfs/trunk/pkgmngt/packInstall.sh.pacman
==============================================================================
--- jhalfs/trunk/pkgmngt/packInstall.sh.pacman Sun Jul 5 22:31:55 2020
(r4184)
+++ jhalfs/trunk/pkgmngt/packInstall.sh.pacman Sun Jul 5 22:38:54 2020
(r4185)
@@ -8,8 +8,8 @@
# A proposed implementation for versions and package names.
local PCKGVRS=$(basename $PKGDIR)
local TGTPKG=$(basename $PKG_DEST)
-local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3\}-//' |
- sed 's/^[0-9]\{1\}-//')
+local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3,4\}-//' |
+ sed 's/^[0-9]\{2\}-//')
# version is only accessible from PKGDIR name. Since the format of the
# name is not normalized, several hacks are necessary...
case $PCKGVRS in
@@ -33,7 +33,11 @@
# Right now, we have the files in the current directory. They should be moved
# to /sources/$PACKAGE/src.
mkdir -p ../$PACKAGE/src
+# We'll build as user tester. We need this directory to be owned by that user.
+chown -R tester ../$PACKAGE
mv * ../$PACKAGE/src
+chown -R tester $PKG_DEST
+chmod -R o+r ../$PACKAGE
cat > PKGBUILD <<EOF
pkgname=( '$PACKAGE' )
@@ -43,14 +47,14 @@
arch=( '$ARCH' )
package() {
-mv * \$pkgdir
+cp -a * \$pkgdir
}
EOF
# Building the binary package
-makepkg --asroot -c --skipinteg
+su tester -c"PATH=$PATH; makepkg -c --skipinteg" || true
# Installing it on LFS
-if ! pacman -U --noconfirm $ARCHIVE_NAME; then
- pacman -U --noconfirm --force $ARCHIVE_NAME
+if ! pacman -U --noconfirm /var/lib/packages/$ARCHIVE_NAME; then
+ pacman -U --noconfirm --overwrite '*' /var/lib/packages/$ARCHIVE_NAME
fi
popd # Since the $PKG_DEST directory is destroyed
# immediately after the return of the function,
Modified: jhalfs/trunk/pkgmngt/packInstall.sh.porg
==============================================================================
--- jhalfs/trunk/pkgmngt/packInstall.sh.porg Sun Jul 5 22:31:55 2020
(r4184)
+++ jhalfs/trunk/pkgmngt/packInstall.sh.porg Sun Jul 5 22:38:54 2020
(r4185)
@@ -108,7 +108,7 @@
local PCKGVRS=$(basename $PKGDIR)
local TGTPKG=$(basename $PKG_DEST)
local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3\}-//' |
- sed 's/^[0-9]\{1\}-//')
+ sed 's/^[0-9]\{2\}-//')
# Porg converts package names to lowercase anyway, so do the conversion
# ourselves
PACKAGE=${PACKAGE,,}
Modified: jhalfs/trunk/pkgmngt/packInstall.sh.template
==============================================================================
--- jhalfs/trunk/pkgmngt/packInstall.sh.template Sun Jul 5 22:31:55
2020 (r4184)
+++ jhalfs/trunk/pkgmngt/packInstall.sh.template Sun Jul 5 22:38:54
2020 (r4185)
@@ -9,7 +9,7 @@
local PCKGVRS=$(basename $PKGDIR)
local TGTPKG=$(basename $PKG_DEST)
local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3\}-//' |
- sed 's/^[0-9]\{1\}-//')
+ sed 's/^[0-9]\{2\}-//')
# version is only accessible from PKGDIR name. Since the format of the
# name is not normalized, several hacks are necessary...
case $PCKGVRS in
--
http://lists.linuxfromscratch.org/listinfo/alfs-log
Unsubscribe: See the above information page