diff options
author | Dave Woodfall <dave@tty1.uk> | 2021-02-13 16:34:49 -0600 |
---|---|---|
committer | Robby Workman <rworkman@slackware.com> | 2021-02-13 16:34:49 -0600 |
commit | 4b07c4226cc4e905c517b1a5a9cc1c0d0812e7bc (patch) | |
tree | 16e9bf10467e0a52f5bff13a3158cc9c7655b7b6 | |
parent | d8e4736aa4594707dbd2bf2d9dac387041ae9f91 (diff) | |
download | slackpkg-4b07c4226cc4e905c517b1a5a9cc1c0d0812e7bc.tar.xz |
Convert ${ROOT}/${CONF} -> ${CONF} and tweak blacklists
Signed-off-by: Robby Workman <rworkman@slackware.com>
-rw-r--r-- | files/core-functions.sh | 16 |
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 |