diff --git a/src/etc/sbopkg/blacklist b/src/etc/sbopkg/blacklist new file mode 100644 index 0000000..e69de29 diff --git a/src/etc/sbopkg/sbopkg.conf b/src/etc/sbopkg/sbopkg.conf index dd59a75..6044597 100644 --- a/src/etc/sbopkg/sbopkg.conf +++ b/src/etc/sbopkg/sbopkg.conf @@ -17,6 +17,7 @@ LOGFILE=${LOGFILE:-/var/log/sbopkg/sbopkg-build-log} QUEUEDIR=${QUEUEDIR:-/var/lib/sbopkg/queues} REPO_ROOT=${REPO_ROOT:-/var/lib/sbopkg} SRCDIR=${SRCDIR:-/var/cache/sbopkg} +BLACKLISTFILE=${BLACKLISTFILE:-/etc/sbopkg/blacklist} # sbopkg's temporary directory (where its internal temporary files are # kept and where packages are made prior to being moved to OUTPUT) # defaults to /tmp/sbopkg.XXXXXX where 'XXXXXX' is a random string. If diff --git a/src/usr/sbin/sbopkg b/src/usr/sbin/sbopkg index 0ff4a60..43f2144 100755 --- a/src/usr/sbin/sbopkg +++ b/src/usr/sbin/sbopkg @@ -136,7 +136,7 @@ EOF # Some configuration options are mandatory for VAR in REPO_ROOT QUEUEDIR SRCDIR REPO_NAME REPO_BRANCH \ 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 MISSING+="$VAR " fi @@ -735,7 +735,21 @@ check_for_updates() { UPDATELIST=$SBOPKGTMP/sbopkg_updatelist rm -f $UPDATELIST $ERRORMSG 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") VERSION_FILE=$SBOPKGTMP/sbopkg-script-version PROGRESSBAR_INTERRUPTED=$SBOPKGTMP/sbopkg_progressbar-interrupted diff --git a/tools/ChangeLog-latest.txt b/tools/ChangeLog-latest.txt index 22bd86f..ac79d00 100644 --- a/tools/ChangeLog-latest.txt +++ b/tools/ChangeLog-latest.txt @@ -1,6 +1,6 @@ SBOPKG NEWS -sbopkg-dev (2018-01-12 00:52:10 UTC) +sbopkg-dev (2018-01-14 10:17:13 UTC) FEATURES * sqg: Parallelize building of single and all packages by option -j. Requires GNU Parallel. @@ -17,7 +17,11 @@ sbopkg-dev (2018-01-12 00:52:10 UTC) * sqg: Added manual page for sqg. * sbopkg: No need to do complete check for old sources if no sources available 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 * bash-completion: Complete -i and -b when git repo is used