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>
This commit is contained in:
Dave Woodfall 2018-11-19 01:49:21 -06:00 committed by Robby Workman
parent 5cf3313ce2
commit 532b90838e
2 changed files with 13 additions and 2 deletions

View file

@ -1,6 +1,14 @@
For Next Release
---------------
- Allow blacklisting of individual packages without collateral
damage (e.g. glibc ---> glibc-*). This changes the prior behavior
of the blacklist function; previously, adding "glibc" to the
blacklist would cause glibc, glibc-profile, glibc-zoneinfo, et al
to be ignored by slackpkg. The new behavior is that *only* the
glibc package is ignored. If you want to blacklist all packages
whose names begin with glibc, you would need to add "glibc.*" to
the blacklist now. (David Woodfall)
- Add support for listing .new files without PAGER (David Woodfall)
- Remove switch.ch mirrors
- Add config option to allow *not* saving .orig configs (Darren Austin)

View file

@ -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