summaryrefslogtreecommitdiffstats
path: root/files/core-functions.sh
diff options
context:
space:
mode:
authorDave Woodfall <dave@tty1.uk>2018-12-30 09:29:42 +0000
committerRobby Workman <rworkman@slackware.com>2018-12-30 04:18:24 -0600
commita14cc9c88821f9ff9016bb477bce50d02ee9cbf8 (patch)
tree0058d95370240d21f1169497b29e6e9077a1bac9 /files/core-functions.sh
parentfdba68e52972bc36249c3ce75f8432fe905b10dc (diff)
downloadslackpkg-a14cc9c88821f9ff9016bb477bce50d02ee9cbf8.tar.xz
Fix support for blacklisting entire package sets
Blacklisted sets now need a trailing / (eg. kde/) Anything with a trailing slash is excluded from having \s added to it. Then the slash is removed so the set is picked up by the old functionality. Signed-off-by: Robby Workman <rworkman@slackware.com>
Diffstat (limited to 'files/core-functions.sh')
-rw-r--r--files/core-functions.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/files/core-functions.sh b/files/core-functions.sh
index d8756d3..76aebc0 100644
--- a/files/core-functions.sh
+++ b/files/core-functions.sh
@@ -476,7 +476,12 @@ slackpkg - version $VERSION\n\
in slackpkg's manpage. You can use partial package names (such as xorg
instead of xorg-server, xorg-docs, etc), or even Slackware series
(such as "n","ap","xap",etc) when searching for packages.
-"
+\nWhen blacklisting packages you can use extended regex on package names
+(such as xorg-.* instead of xorg-server, xorg-docs, etc), and a trailing
+slash for package series ("n/", "ap/", "xap/", etc).
+
+Note that special characters in blacklisted package names, such as '+', need
+escaping: gcc-g\\+\\+"
cleanup
}
@@ -585,7 +590,10 @@ function makelist() {
INPUTLIST=$@
grep -vE "(^#|^[[:blank:]]*$)" ${CONF}/blacklist | \
- sed -E "s,^, ,;s,$, ,;s,^\s(extra|pasture|patches|slackware(|64)|testing|txz)\s,\1," \
+ sed -E "s,^, ,
+ s,$, ,
+ s,^\s(extra|pasture|patches|slackware(|64)|testing|txz|.*/)\s$,\1,
+ s,/$,," \
> ${TMPDIR}/blacklist
if echo $CMD | grep -q install ; then