From 19d0732fe03467cb5c20f2759d3895e706d546d4 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sat, 5 Dec 2020 21:00:36 +0100 Subject: Add package blacklist per variant This was needed when new ibus based imput-methods were added to testing 'vtown' and all scim packages needed to be blacklisted. Also, fixed a syntax issue in the package installation function. --- make_slackware_live.sh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/make_slackware_live.sh b/make_slackware_live.sh index 7e10bfc..ff6c76d 100755 --- a/make_slackware_live.sh +++ b/make_slackware_live.sh @@ -209,6 +209,9 @@ SEQ_DLACK="tagfile:a,ap,d,e,f,k,l,n,t,tcl,x,xap pkglist:dlackware,slackextra,sys # - each will become a squashfs module: SEQ_STUDW="tagfile:a,ap,d,e,f,k,kde,l,n,t,tcl,x,xap,xfce,y pkglist:slackextra,slackpkgplus,studioware" +# Package blacklists for variants: +BLACKLIST_PLASMA5="scim scim-tables scim-pinyin scim-m17n scim-hangul scim-anthy scim-input-pad" + # -- START: Used verbatim in upslak.sh -- # # List of kernel modules required for a live medium to boot properly; # Lots of HID modules added to support keyboard input for LUKS password entry: @@ -384,7 +387,7 @@ function install_pkgs() { if [ "$3" = "local" -a -d ${LIVE_TOOLDIR}/local${DIRSUFFIX}/$1 ]; then echo "-- Installing local packages from subdir 'local${DIRSUFFIX}/$1'." #installpkg --terse --root "$2" "${LIVE_TOOLDIR}/local${DIRSUFFIX}/$1/*.t?z" - ROOT="$2" upgradepkg --install-new --reinstall "${LIVE_TOOLDIR}/local${DIRSUFFIX}/$1/*.t?z" + ROOT="$2" upgradepkg --install-new --reinstall "${LIVE_TOOLDIR}"/local${DIRSUFFIX}/"$1"/*.t?z else # Load package list and (optional) custom repo info: if [ "$3" = "tagfile" ]; then @@ -442,9 +445,19 @@ function install_pkgs() { # REP equal to PKG. # - If PKG is empty then this is a request to remove the package. REP=$(echo $PKGPAT |cut -d% -f1) + # Skip installation on detecting a blacklisted package: + for BLST in ${BLACKLIST} BLNONE; do + if [ "$PKG" == "$BLST" ]; then + # Found a blacklisted package. + break + fi + done + # Now decide what to do: if [ -z "${PKG}" ]; then # Package removal: ROOT="$2" removepkg "${REP}" + elif [ "${PKG}" == "${BLST}" ]; then + echo "-- Not installing blacklisted package '$PKG'." else # Package install/upgrade: # Look in ./patches ; then ./${DISTRO}$DIRSUFFIX ; then ./extra @@ -1237,6 +1250,11 @@ else RSYNCREP=" " fi +# Determine possible blacklist to use: +if [ -z "${BLACKLIST}" ]; then + eval BLACKLIST=\$BLACKLIST_${LIVEDE} +fi + # Create output directory for image file: mkdir -p "${OUTPUT}" if [ $? -ne 0 ]; then -- cgit v1.2.3