mirror of
https://github.com/zuno/slackpkgplus
synced 2024-12-27 09:58:34 +01:00
- Added ALLOW32BIT flag to allow to install 32bit packages on a 64bit system
This commit is contained in:
parent
dc302eff2b
commit
4cd45ee7d2
3 changed files with 33 additions and 2 deletions
14
src/README
14
src/README
|
@ -325,6 +325,20 @@ configuration file.
|
|||
As workaround you can add the options WGETOPTS="--timeout=5 --tries=1"
|
||||
in slackpkgplus.conf
|
||||
|
||||
-----
|
||||
|
||||
|
||||
ALLOW32BIT
|
||||
|
||||
By default slackpkg+ deny to install 32bit packages on a 64bit system.
|
||||
|
||||
Set ALLOW32BIT=on to allow slackpkg+ to install 32bit packages on a 64bit slackware
|
||||
installation (possibly unsafe). Please, do not install both 32 and 64bit of the same
|
||||
package to avoid problems, and NEVER upgrade exitant 64bit packages with relative 32bit
|
||||
package.
|
||||
|
||||
Do not forget to install the multilibs.
|
||||
|
||||
|
||||
-----
|
||||
|
||||
|
|
|
@ -6,7 +6,8 @@ declare -A MIRRORPLUS
|
|||
declare -A NOTIFYMSG
|
||||
|
||||
if [ -e /etc/slackpkg/slackpkgplus.conf ];then
|
||||
# You can override WGETOPTS SLACKPKGPLUS VERBOSE USEBL from command-line
|
||||
# You can override WGETOPTS SLACKPKGPLUS VERBOSE USEBL ALLOW32BIT from command-line
|
||||
EXTALLOW32BIT=$ALLOW32BIT
|
||||
EXTSLACKPKGPLUS=$SLACKPKGPLUS
|
||||
EXTVERBOSE=$VERBOSE
|
||||
EXTUSEBL=$USEBL
|
||||
|
@ -14,6 +15,7 @@ if [ -e /etc/slackpkg/slackpkgplus.conf ];then
|
|||
|
||||
. /etc/slackpkg/slackpkgplus.conf
|
||||
|
||||
ALLOW32BIT=${EXTALLOW32BIT:-$ALLOW32BIT}
|
||||
SLACKPKGPLUS=${EXTSLACKPKGPLUS:-$SLACKPKGPLUS}
|
||||
VERBOSE=${EXTVERBOSE:-$VERBOSE}
|
||||
USEBL=${EXTUSEBL:-$USEBL}
|
||||
|
@ -234,7 +236,11 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
|||
X86_64=$(ls /var/log/packages/aaa_base*x86_64*|head -1 2>/dev/null)
|
||||
for PREPO in $REPOPLUS;do
|
||||
if [ ! -z "$X86_64" ];then
|
||||
egrep -e ^[a-f0-9]{32} ${TMPDIR}/CHECKSUMS.md5-$PREPO|egrep -- "-(x86_64|noarch)-" |sed -r "s# \./# ./SLACKPKGPLUS_$PREPO/#" >> ${TMPDIR}/CHECKSUMS.md5
|
||||
if [ "$ALLOW32BIT" == "on" ];then
|
||||
egrep -e ^[a-f0-9]{32} ${TMPDIR}/CHECKSUMS.md5-$PREPO|egrep -v -- "-(arm)-" |sed -r "s# \./# ./SLACKPKGPLUS_$PREPO/#" >> ${TMPDIR}/CHECKSUMS.md5
|
||||
else
|
||||
egrep -e ^[a-f0-9]{32} ${TMPDIR}/CHECKSUMS.md5-$PREPO|egrep -v -- "-(i[3456]86|arm)-" |sed -r "s# \./# ./SLACKPKGPLUS_$PREPO/#" >> ${TMPDIR}/CHECKSUMS.md5
|
||||
fi
|
||||
else
|
||||
egrep -e ^[a-f0-9]{32} ${TMPDIR}/CHECKSUMS.md5-$PREPO|egrep -v -- "-(x86_64|arm)-" |sed -r "s# \./# ./SLACKPKGPLUS_$PREPO/#" >> ${TMPDIR}/CHECKSUMS.md5
|
||||
fi
|
||||
|
@ -702,6 +708,10 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
|||
fi
|
||||
done
|
||||
|
||||
if [[ "$CMD" == "upgrade" || "$CMD" == "upgrade-all" ]] && [ "$ALLOW32BIT" == "on" ] ; then
|
||||
ARCH="\($ARCH\)\|\([i]*[3456x]86[^_]*\)"
|
||||
fi
|
||||
|
||||
if [ "$CMD" == "install" ] || [ "$CMD" == "upgrade" ] || [ "$CMD" == "reinstall" ] || [ "$CMD" == "remove" ] ; then
|
||||
|
||||
NEWINPUTLIST=""
|
||||
|
|
|
@ -12,6 +12,13 @@ VERBOSE=1
|
|||
# 'USEBL=0 slackpkg upgrade-all'
|
||||
USEBL=1
|
||||
|
||||
# By default slackpkg+ deny to install 32bit packages.
|
||||
# Set this flag to 'on' allow slackpkg+ to install 32bit packages on a 64bit slackware
|
||||
# installation (possibly unsafe). Please, do not install both 32 and 64bit of the same
|
||||
# package to avoid problems, and NEVER upgrade exitant 64bit packages with relative 32bit package.
|
||||
# Do not forget to install the multilibs.
|
||||
#ALLOW32BIT=off
|
||||
|
||||
# Add custom option to 'wget'.
|
||||
# You can solve the repository indisponibility issue by set a timeout here
|
||||
WGETOPTS="--timeout=5 --tries=1"
|
||||
|
|
Loading…
Reference in a new issue