mirror of
https://github.com/sbopkg/sbopkg
synced 2024-11-09 19:50:25 +03:00
sbopkg: Add blacklist feature.
Fix #39. Signed-off-by: Willy Sudiarto Raharjo <willysr@sbopkg.org>
This commit is contained in:
parent
371284cd89
commit
e09556b01b
0
src/etc/sbopkg/blacklist
Normal file
0
src/etc/sbopkg/blacklist
Normal file
@ -17,6 +17,7 @@ LOGFILE=${LOGFILE:-/var/log/sbopkg/sbopkg-build-log}
|
|||||||
QUEUEDIR=${QUEUEDIR:-/var/lib/sbopkg/queues}
|
QUEUEDIR=${QUEUEDIR:-/var/lib/sbopkg/queues}
|
||||||
REPO_ROOT=${REPO_ROOT:-/var/lib/sbopkg}
|
REPO_ROOT=${REPO_ROOT:-/var/lib/sbopkg}
|
||||||
SRCDIR=${SRCDIR:-/var/cache/sbopkg}
|
SRCDIR=${SRCDIR:-/var/cache/sbopkg}
|
||||||
|
BLACKLISTFILE=${BLACKLISTFILE:-/etc/sbopkg/blacklist}
|
||||||
# sbopkg's temporary directory (where its internal temporary files are
|
# sbopkg's temporary directory (where its internal temporary files are
|
||||||
# kept and where packages are made prior to being moved to OUTPUT)
|
# kept and where packages are made prior to being moved to OUTPUT)
|
||||||
# defaults to /tmp/sbopkg.XXXXXX where 'XXXXXX' is a random string. If
|
# defaults to /tmp/sbopkg.XXXXXX where 'XXXXXX' is a random string. If
|
||||||
|
@ -136,7 +136,7 @@ EOF
|
|||||||
# Some configuration options are mandatory
|
# Some configuration options are mandatory
|
||||||
for VAR in REPO_ROOT QUEUEDIR SRCDIR REPO_NAME REPO_BRANCH \
|
for VAR in REPO_ROOT QUEUEDIR SRCDIR REPO_NAME REPO_BRANCH \
|
||||||
KEEPLOG CLEANUP LOGFILE DEBUG_UPDATES TMP OUTPUT RSYNCFLAGS \
|
KEEPLOG CLEANUP LOGFILE DEBUG_UPDATES TMP OUTPUT RSYNCFLAGS \
|
||||||
WGETFLAGS DIFF DIFFOPTS SBOPKG_REPOS_D ALLOW_MULTI; do
|
WGETFLAGS DIFF DIFFOPTS SBOPKG_REPOS_D ALLOW_MULTI BLACKLISTFILE; do
|
||||||
if [[ -z "${!VAR}" ]]; then
|
if [[ -z "${!VAR}" ]]; then
|
||||||
MISSING+="$VAR "
|
MISSING+="$VAR "
|
||||||
fi
|
fi
|
||||||
@ -735,7 +735,21 @@ check_for_updates() {
|
|||||||
UPDATELIST=$SBOPKGTMP/sbopkg_updatelist
|
UPDATELIST=$SBOPKGTMP/sbopkg_updatelist
|
||||||
rm -f $UPDATELIST $ERRORMSG
|
rm -f $UPDATELIST $ERRORMSG
|
||||||
cd /var/log/packages
|
cd /var/log/packages
|
||||||
PKGS=$(ls *$REPO_TAG 2> /dev/null)
|
|
||||||
|
# Check if blacklist file exists
|
||||||
|
if [[ -s $BLACKLISTFILE ]]; then
|
||||||
|
# Remove comments (lines starting with #) and empty lines
|
||||||
|
# If there exists content(s), we will filter that out
|
||||||
|
# Otherwise, do a normal check for update procedure
|
||||||
|
BLKFILE=$(grep -v "^#" $BLACKLISTFILE | grep -v "^$")
|
||||||
|
if [[ ! -z $BLKFILE ]]; then
|
||||||
|
PKGS=$(ls *$REPO_TAG | grep -v $BLKFILE 2> /dev/null)
|
||||||
|
else
|
||||||
|
PKGS=$(ls *$REPO_TAG 2> /dev/null)
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
PKGS=$(ls *$REPO_TAG 2> /dev/null)
|
||||||
|
fi
|
||||||
NUMPKGS=$(wc -w <<< "$PKGS")
|
NUMPKGS=$(wc -w <<< "$PKGS")
|
||||||
VERSION_FILE=$SBOPKGTMP/sbopkg-script-version
|
VERSION_FILE=$SBOPKGTMP/sbopkg-script-version
|
||||||
PROGRESSBAR_INTERRUPTED=$SBOPKGTMP/sbopkg_progressbar-interrupted
|
PROGRESSBAR_INTERRUPTED=$SBOPKGTMP/sbopkg_progressbar-interrupted
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
SBOPKG NEWS
|
SBOPKG NEWS
|
||||||
|
|
||||||
sbopkg-dev (2018-01-12 00:52:10 UTC)
|
sbopkg-dev (2018-01-14 10:17:13 UTC)
|
||||||
FEATURES
|
FEATURES
|
||||||
* sqg: Parallelize building of single and all packages by option -j.
|
* sqg: Parallelize building of single and all packages by option -j.
|
||||||
Requires GNU Parallel.
|
Requires GNU Parallel.
|
||||||
@ -17,7 +17,11 @@ sbopkg-dev (2018-01-12 00:52:10 UTC)
|
|||||||
* sqg: Added manual page for sqg.
|
* sqg: Added manual page for sqg.
|
||||||
* sbopkg: No need to do complete check for old sources if no sources available
|
* sbopkg: No need to do complete check for old sources if no sources available
|
||||||
Initial patch by Loki Harfagr
|
Initial patch by Loki Harfagr
|
||||||
* sbopkg: Added support for Slackware 15.0
|
* sbopkg: Added support for Slackware 15.0
|
||||||
|
* sbopkg: Added new option in sbopkg.conf: BLACKLISTFILE
|
||||||
|
This is used to define blacklisted package(s)
|
||||||
|
Feature Request by khronosschoty
|
||||||
|
|
||||||
|
|
||||||
MODIFICATIONS
|
MODIFICATIONS
|
||||||
* bash-completion: Complete -i and -b when git repo is used
|
* bash-completion: Complete -i and -b when git repo is used
|
||||||
|
Loading…
Reference in New Issue
Block a user