summaryrefslogtreecommitdiffstats
path: root/files/core-functions.sh
diff options
context:
space:
mode:
authorDave Woodfall <dave@tty1.uk>2021-02-13 16:34:49 -0600
committerRobby Workman <rworkman@slackware.com>2021-02-13 16:34:49 -0600
commit4b07c4226cc4e905c517b1a5a9cc1c0d0812e7bc (patch)
tree16e9bf10467e0a52f5bff13a3158cc9c7655b7b6 /files/core-functions.sh
parentd8e4736aa4594707dbd2bf2d9dac387041ae9f91 (diff)
downloadslackpkg-4b07c4226cc4e905c517b1a5a9cc1c0d0812e7bc.tar.xz
Convert ${ROOT}/${CONF} -> ${CONF} and tweak blacklists
Signed-off-by: Robby Workman <rworkman@slackware.com>
Diffstat (limited to 'files/core-functions.sh')
-rw-r--r--files/core-functions.sh16
1 files changed, 7 insertions, 9 deletions
diff --git a/files/core-functions.sh b/files/core-functions.sh
index ea32e12..ef33f59 100644
--- a/files/core-functions.sh
+++ b/files/core-functions.sh
@@ -589,24 +589,22 @@ function listpkgname() {
function mkregex_blacklist() {
# create tmp blacklist in a more usable format
sed -E "
- /(^#|[[:blank:]]+$|^[[:blank:]]+|^$)/d
+ s,(^[[:blank:]]+|[[:blank:]]+$),,
+ /(^#|^$)/d
s,^, ,
s,$, ,
s,^\s(extra|pasture|patches|slackware(|64)|testing)\s$,\1 ,
s,^\s(tgz|txz)\s$, \1,
s,^\s([^/]+)/\s$, ./$PKGMAIN/\1 ,
- " ${ROOT}/${CONF}/blacklist > ${TMPDIR}/blacklist.tmp
+ " ${CONF}/blacklist > ${TMPDIR}/blacklist.tmp
# create second blacklist of single packages from tmp list
- cat ${ROOT}/${WORKDIR}/pkglist | grep -E -f ${TMPDIR}/blacklist.tmp |
- awk '{print $2}' | sed -E "s,^, ,; s,$, ," > ${TMPDIR}/blacklist
+ grep -E -f ${TMPDIR}/blacklist.tmp ${ROOT}/${WORKDIR}/pkglist |
+ awk '{print " "$2" "}' > ${TMPDIR}/blacklist
# remove sets from tmp blacklist, join both lists to create unique list
- sed -E "/\.\/$PKGMAIN\/[^/]+/d" ${TMPDIR}/blacklist.tmp |
+ sed -E "/\.\/$PKGMAIN\/[[:alpha:]]+/d" ${TMPDIR}/blacklist.tmp |
sort -u -o ${TMPDIR}/blacklist ${TMPDIR}/blacklist -
-
- # clean up
- rm -f ${TMPDIR}/blacklist.tmp
}
# blacklist filter
@@ -1243,7 +1241,7 @@ function sanity_check() {
if [ "$FILES" != "" ]; then
for i in $FILES ; do
- echo "${i}" | grep -qE -f ${ROOT}/${CONF}/blacklist && continue
+ echo "${i}" | grep -qE -f ${CONF}/blacklist && continue
DOUBLEFILES="$DOUBLEFILES $i"
done
unset FILES