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
This commit is contained in:
Pierre Labastie 2020-07-06 05:38:54 +00:00
parent 5dd7bff0ee
commit 3ac3ae199f
6 changed files with 21 additions and 11 deletions

View file

@ -368,11 +368,17 @@ fi
<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) &gt; 0 and
count(descendant::screen/userinput) &gt;
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

View file

@ -64,7 +64,7 @@ EOF
#----------------------------------#
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.

View file

@ -7,7 +7,7 @@ packInstall() {
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/') ;;

View file

@ -8,8 +8,8 @@ packInstall() {
# 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 @@ rm -fv ./usr/share/info/dir # recommended since this directory is already there
# 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 @@ pkgdesc=$PACKAGE
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,

View file

@ -108,7 +108,7 @@ wrapInstall() {
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,,}

View file

@ -9,7 +9,7 @@ packInstall() {
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