mirror of
https://github.com/zuno/slackpkgplus
synced 2025-01-13 20:01:04 +01:00
Added legacy blacklist system
Setting LEGACYBL=on slackpkg+ uses slackware 14.2 blacklisting system (grep -Ew applyed to the entire row in pkglist)
This commit is contained in:
parent
99316dbda4
commit
2591114496
1 changed files with 9 additions and 3 deletions
|
@ -17,6 +17,7 @@ CLOG_SEPREGEX="^[+][-]+[+][ ]*$"
|
||||||
|
|
||||||
if [ -e $CONF/slackpkgplus.conf ];then
|
if [ -e $CONF/slackpkgplus.conf ];then
|
||||||
# You can override GREYLIST WGETOPTS SLACKPKGPLUS VERBOSE USEBL ALLOW32BIT SENSITIVE_SEARCH from command-line
|
# You can override GREYLIST WGETOPTS SLACKPKGPLUS VERBOSE USEBL ALLOW32BIT SENSITIVE_SEARCH from command-line
|
||||||
|
EXTLEGACYBL=$LEGACYBL
|
||||||
EXTGREYLIST=$GREYLIST
|
EXTGREYLIST=$GREYLIST
|
||||||
EXTALLOW32BIT=$ALLOW32BIT
|
EXTALLOW32BIT=$ALLOW32BIT
|
||||||
EXTSLACKPKGPLUS=$SLACKPKGPLUS
|
EXTSLACKPKGPLUS=$SLACKPKGPLUS
|
||||||
|
@ -55,6 +56,7 @@ if [ -e $CONF/slackpkgplus.conf ];then
|
||||||
c_mask="${c_mask:-$c_gry}"
|
c_mask="${c_mask:-$c_gry}"
|
||||||
c_unin="${c_unin:-$c_blu}"
|
c_unin="${c_unin:-$c_blu}"
|
||||||
|
|
||||||
|
LEGACYBL=${EXTLEGACYBL:-$LEGACYBL}
|
||||||
GREYLIST=${EXTGREYLIST:-$GREYLIST}
|
GREYLIST=${EXTGREYLIST:-$GREYLIST}
|
||||||
ALLOW32BIT=${EXTALLOW32BIT:-$ALLOW32BIT}
|
ALLOW32BIT=${EXTALLOW32BIT:-$ALLOW32BIT}
|
||||||
SLACKPKGPLUS=${EXTSLACKPKGPLUS:-$SLACKPKGPLUS}
|
SLACKPKGPLUS=${EXTSLACKPKGPLUS:-$SLACKPKGPLUS}
|
||||||
|
@ -128,7 +130,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
##### ===== BLACKLIST FUNCTIONS === #####
|
##### ===== BLACKLIST FUNCTIONS === #####
|
||||||
|
|
||||||
# Patching makelist() original function to accept pkglist-pre
|
# Patching makelist() original function to accept pkglist-pre
|
||||||
eval "$(type makelist | sed -e $'1d;2c\\\nmakelist()\n' -e 's,cat ${WORKDIR}/pkglist > ${TMPDIR}/pkglist,cat $TMPDIR/pkglist-pre ${WORKDIR}/pkglist > ${TMPDIR}/pkglist,')"
|
eval "$(type makelist | sed -e $'1d;2c\\\nmakelist()\n' -e 's,cat ${WORKDIR}/pkglist > ${TMPDIR}/pkglist,cat $TMPDIR/pkglist-pre ${WORKDIR}/pkglist | applyblacklist > ${TMPDIR}/pkglist,')"
|
||||||
|
|
||||||
# Adds the pattern given by $(1) into the internal blacklist
|
# Adds the pattern given by $(1) into the internal blacklist
|
||||||
# ${TMPDIR}/blacklist.slackpkgplus
|
# ${TMPDIR}/blacklist.slackpkgplus
|
||||||
|
@ -147,7 +149,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
>${TMPDIR}/blacklist
|
>${TMPDIR}/blacklist
|
||||||
fi
|
fi
|
||||||
cat > ${TMPDIR}/inblacklist
|
cat > ${TMPDIR}/inblacklist
|
||||||
grep -vE -f ${TMPDIR}/blacklist -f ${TMPDIR}/blacklist.slackpkgplus ${TMPDIR}/inblacklist >${TMPDIR}/outblacklist
|
grep -vE ${BLKLOPT} -f ${TMPDIR}/blacklist -f ${TMPDIR}/blacklist.slackpkgplus ${TMPDIR}/inblacklist >${TMPDIR}/outblacklist
|
||||||
cat ${TMPDIR}/outblacklist
|
cat ${TMPDIR}/outblacklist
|
||||||
cat $TMPDIR/greylist.* >$TMPDIR/greylist
|
cat $TMPDIR/greylist.* >$TMPDIR/greylist
|
||||||
grep -qvEw -f $TMPDIR/greylist $TMPDIR/pkglist-pre >$TMPDIR/unchecklist
|
grep -qvEw -f $TMPDIR/greylist $TMPDIR/pkglist-pre >$TMPDIR/unchecklist
|
||||||
|
@ -1141,7 +1143,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
|
|
||||||
printf "%s\n" $ROOT/var/log/packages/* | awk -f /usr/libexec/slackpkg/pkglist.awk > ${TMPDIR}/tmplist
|
printf "%s\n" $ROOT/var/log/packages/* | awk -f /usr/libexec/slackpkg/pkglist.awk > ${TMPDIR}/tmplist
|
||||||
sed -i 's/^^/:/' $TMPDIR/blacklist
|
sed -i 's/^^/:/' $TMPDIR/blacklist
|
||||||
cat ${WORKDIR}/pkglist > ${TMPDIR}/pkglist
|
cat ${WORKDIR}/pkglist | applyblacklist > ${TMPDIR}/pkglist
|
||||||
|
|
||||||
touch ${TMPDIR}/waiting
|
touch ${TMPDIR}/waiting
|
||||||
echo -n "Looking for $PATTERN in package list. Please wait... "
|
echo -n "Looking for $PATTERN in package list. Please wait... "
|
||||||
|
@ -1985,6 +1987,10 @@ if [ "$SLACKPKGPLUS" = "on" ];then
|
||||||
if [ -e $TMPDIR/blacklist ];then
|
if [ -e $TMPDIR/blacklist ];then
|
||||||
sed -i 's/^/^/' $TMPDIR/blacklist
|
sed -i 's/^/^/' $TMPDIR/blacklist
|
||||||
fi
|
fi
|
||||||
|
if [ "$LEGACYBL" == "on" ];then
|
||||||
|
BLKLOPT=-w
|
||||||
|
grep -vE "(^#|^[[:blank:]]*$)" ${CONF}/blacklist > ${TMPDIR}/blacklist
|
||||||
|
fi
|
||||||
|
|
||||||
touch ${TMPDIR}/priority.filters
|
touch ${TMPDIR}/priority.filters
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue