summaryrefslogtreecommitdiffstats
path: root/files/core-functions.sh
diff options
context:
space:
mode:
authorDave Woodfall <dave@dawoodfall.net>2018-11-19 01:49:21 -0600
committerRobby Workman <rworkman@slackware.com>2018-11-22 23:28:39 -0600
commit532b90838ee3e93c799464b4a35d77593dcafeb6 (patch)
tree78df61bfaa8da31b431b961512e76d2a596b3753 /files/core-functions.sh
parent5cf3313ce289943a3fc2df242780313daf6368e0 (diff)
downloadslackpkg-532b90838ee3e93c799464b4a35d77593dcafeb6.tar.xz
Fix (hopefully) blacklisting of specific packages
In short, it seems impossible to blacklist some packages without catching other undesirable packages. As an example, blacklisting glibc will also catch glibc-zoneinfo (and the other glibc-*) packages. It would be good to have the ability to blacklist only the glibc package without it catching the others. With this change, if sysadmin wants the blacklist to be "greedy," then adding "glibc.*" to the blacklist will do that. Reported-by: Peter Hyman <pete@peterhyman.com> Signed-off-by: Robby Workman <rworkman@slackware.com>
Diffstat (limited to 'files/core-functions.sh')
-rw-r--r--files/core-functions.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/files/core-functions.sh b/files/core-functions.sh
index a976df6..d8756d3 100644
--- a/files/core-functions.sh
+++ b/files/core-functions.sh
@@ -572,7 +572,7 @@ function listpkgname() {
}
function applyblacklist() {
- grep -vEw -f ${TMPDIR}/blacklist
+ grep -vE -f ${TMPDIR}/blacklist
}
# Function to make install/reinstall/upgrade lists
@@ -584,7 +584,10 @@ function makelist() {
INPUTLIST=$@
- grep -vE "(^#|^[[:blank:]]*$)" ${CONF}/blacklist > ${TMPDIR}/blacklist
+ grep -vE "(^#|^[[:blank:]]*$)" ${CONF}/blacklist | \
+ sed -E "s,^, ,;s,$, ,;s,^\s(extra|pasture|patches|slackware(|64)|testing|txz)\s,\1," \
+ > ${TMPDIR}/blacklist
+
if echo $CMD | grep -q install ; then
ls -1 $ROOT/var/log/packages/* | awk -f /usr/libexec/slackpkg/pkglist.awk > ${TMPDIR}/tmplist
else