From b0f1bdb4852f588e7b5f69c4083848ee02032241 Mon Sep 17 00:00:00 2001 From: Robby Workman Date: Tue, 2 Feb 2021 22:13:45 -0600 Subject: Do not allow adding blacklist packages from slackpkg exec As of slackpkg shipped with Slackware 15.0, it is no longer supported to add packages to /etc/slackpkg/blacklist using the slackpkg executable; this should only be done with an editor pointing at /etc/slackpkg/blacklist --- files/slackpkg | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'files/slackpkg') diff --git a/files/slackpkg b/files/slackpkg index a4ee4b8..49a1237 100644 --- a/files/slackpkg +++ b/files/slackpkg @@ -214,7 +214,7 @@ while [ -n "$1" ] ; do SOURCE=$(echo $1 | cut -f2 -d=) shift ;; - install|reinstall|upgrade|remove|blacklist|download) + install|reinstall|upgrade|remove|download) CMD=$1 shift if [ -n "$1" ]; then @@ -480,20 +480,8 @@ case "$CMD" in grep -e "^\([a-z]\)" $CONF/blacklist | $MORECMD cleanup fi - - makelist ${INPUTLIST} - for i in $LIST; do - BASENAME=$(cutpkg $i) - BLACKLIST="$BLACKLIST $BASENAME" - done - BLACKLIST=$(echo $BLACKLIST | tr ' ' "\n") - if [ "$BLACKLIST" = "" ]; then - echo -e "No packages match the pattern." - cleanup - else - showlist "$BLACKLIST" $CMD - fi - + + # As of 15.0, this function just runs /bin/false and exits with a comment blacklist_pkg ;; file-search) @@ -605,11 +593,11 @@ esac # # Executes the post-install. This is the default # Before runs post-install, check if the slackpkg option is -# remove, search, update, blacklist, info or clean-system. +# remove, search, update, info or clean-system. # That options don't change configurations files and, if # someone remove the kernel, i hope he knows what is doing. # -for i in check-updates remove search file-search update blacklist info \ +for i in check-updates remove search file-search update info \ clean-system download generate-template remove-template; do if [ "$CMD" = "$i" ]; then POSTINST=off -- cgit v1.2.3