diff options
author | Robby Workman <rworkman@slackware.com> | 2021-02-02 22:13:45 -0600 |
---|---|---|
committer | Robby Workman <rworkman@slackware.com> | 2021-02-04 19:52:21 -0600 |
commit | b0f1bdb4852f588e7b5f69c4083848ee02032241 (patch) | |
tree | f9ca9e78e0cdd13d2d656d849f76e7218dbeeaa2 /files/core-functions.sh | |
parent | a9e490297b2ad0ff8d409761852bd72c48d6c5da (diff) | |
download | slackpkg-b0f1bdb4852f588e7b5f69c4083848ee02032241.tar.xz |
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
Diffstat (limited to 'files/core-functions.sh')
-rw-r--r-- | files/core-functions.sh | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/files/core-functions.sh b/files/core-functions.sh index 8974008..dcbceae 100644 --- a/files/core-functions.sh +++ b/files/core-functions.sh @@ -425,7 +425,7 @@ function usage() { slackpkg - version $VERSION\n\ \nUsage:\n\ \tslackpkg [OPTIONS] {install|remove|search|file-search| -\t\t\t download|upgrade|reinstall|blacklist} {PATTERN|FILE} +\t\t\t download|upgrade|reinstall} {PATTERN|FILE} \tslackpkg [OPTIONS] {generate-template|install-template|remove-template} \t\t\t TEMPLATENAME \tslackpkg [OPTIONS] info PACKAGE @@ -463,9 +463,6 @@ slackpkg - version $VERSION\n\ \t\t\t\t\tthe official Slackware package set. \t\t\t\t\tRun this if you are upgrading to another \t\t\t\t\tSlackware version or using "current". -\tslackpkg blacklist\t\tBlacklist a package. Blacklisted -\t\t\t\t\tpackages cannot be upgraded, installed, -\t\t\t\t\tor reinstalled by slackpkg \tslackpkg download\t\tOnly download (do not install) a package \tslackpkg info package\t\tShow package information \t\t\t\t\t(works with only ONE package) @@ -647,12 +644,7 @@ function makelist() { done ;; blacklist) - for ARGUMENT in $(echo $INPUTLIST); do - for i in $(cat ${TMPDIR}/pkglist ${TMPDIR}/tmplist | \ - grep -w -- "${ARGUMENT}" | cut -f2 -d\ | sort -u); do - grep -qx "${i}" ${CONF}/blacklist || LIST="$LIST $i" - done - done + /bin/false ;; install|upgrade|reinstall) for ARGUMENT in $(echo $INPUTLIST); do @@ -1248,15 +1240,11 @@ better list:\n" egrep -i -- "^${i}-[^-]+-(${ARCH}|fw|noarch)-" done echo -ne "\n\ -You can (B)lacklist, (R)emove, or (I)gnore these packages.\n\ -Select your action (B/R/I): " +You can (R)emove, or (I)gnore these packages.\n\ +Select your action (R/I): " read ANSWER echo case "$ANSWER" in - B|b) - showlist "$DOUBLEFILES" blacklist - blacklist_pkg - ;; R|r) for i in $DOUBLEFILES ; do FILE=$(ls -1 $ROOT/var/log/packages/ |\ @@ -1268,7 +1256,7 @@ Select your action (B/R/I): " ;; *) echo -e "\n\ -Okay - slackpkg won't do anything now, but please, do something to fix it.\n" +Remove or blacklist the affected packages in order for slackpkg to work properly.\n" cleanup ;; esac @@ -1276,10 +1264,8 @@ Okay - slackpkg won't do anything now, but please, do something to fix it.\n" } function blacklist_pkg() { - echo $SHOWLIST | tr ' ' "\n" >> ${ROOT}/${CONF}/blacklist - - echo -e "\nPackages added to your blacklist.\n\ -If you want to remove those packages, edit ${CONF}/blacklist.\n" + echo -e "\nThis function no longer adds packages to your blacklist.\n\ +As of slackpkg 15.0, you will need to edit ${CONF}/blacklist instead.\n" } function remove_pkg() { |