From cb565379020ed5ea789d2f6efc23c0b16b696eb8 Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Tue, 19 Nov 2013 14:07:33 +0100 Subject: [PATCH] Version 20131119.2 - 19/Nov/2013 - Added ALLOW32BIT flag to allow to install 32bit packages on a 64bit system --- ChangeLog.txt | 3 +++ src/ChangeLog.txt | 3 +++ src/slackpkgplus.sh | 10 ++++++++-- src/slackpkgplus.x86_64.sample | 7 +++++++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 0c58836..2cc1f51 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,6 @@ +Version 20131119.2 - 19/Nov/2013 + - Added ALLOW32BIT flag to allow to install 32bit packages on a 64bit system + Version 20131119.1 - 19/Nov/2013 - 'slackpkg update' also update the install.log - 'makeinstlog.sh -t' TRY to detect the repository from which the package diff --git a/src/ChangeLog.txt b/src/ChangeLog.txt index 0c58836..2cc1f51 100644 --- a/src/ChangeLog.txt +++ b/src/ChangeLog.txt @@ -1,3 +1,6 @@ +Version 20131119.2 - 19/Nov/2013 + - Added ALLOW32BIT flag to allow to install 32bit packages on a 64bit system + Version 20131119.1 - 19/Nov/2013 - 'slackpkg update' also update the install.log - 'makeinstlog.sh -t' TRY to detect the repository from which the package diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index 1ba7027..c4f944b 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -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 ALLOW32BIT WGETOPTS SLACKPKGPLUS VERBOSE USEBL 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} @@ -238,7 +240,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 diff --git a/src/slackpkgplus.x86_64.sample b/src/slackpkgplus.x86_64.sample index 641a917..a8bc042 100644 --- a/src/slackpkgplus.x86_64.sample +++ b/src/slackpkgplus.x86_64.sample @@ -7,6 +7,13 @@ SLACKPKGPLUS=on # set to '2' to show always show the download bar VERBOSE=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' #WGETOPTS="--timeout=5 --tries=1"