From 7cbb2f36a6d8be675940a8cc364ff9878851a014 Mon Sep 17 00:00:00 2001 From: Willy Sudiarto Raharjo Date: Tue, 18 Oct 2022 08:12:56 +0700 Subject: [PATCH] sqg: Do not skip empty deps package when using -o Hopefully this fix #83. Signed-off-by: Willy Sudiarto Raharjo --- src/usr/libexec/sbopkg/sqg/functions | 7 +++++-- src/usr/libexec/sbopkg/sqg/sqg-build-queuefile | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/usr/libexec/sbopkg/sqg/functions b/src/usr/libexec/sbopkg/sqg/functions index e3708fd..772207c 100644 --- a/src/usr/libexec/sbopkg/sqg/functions +++ b/src/usr/libexec/sbopkg/sqg/functions @@ -164,6 +164,7 @@ build_queuefile () { local REPO_DIR="$1" local QUEUEDIR="$2" local PRGNAM="$3" + local CUSTOM_QUEUE="${4:-}" local OLDFILE=$QUEUEDIR/$PRGNAM.sqf local QUEUEFILE=$QUEUEDIR/$PRGNAM.sqf.tmp @@ -174,7 +175,9 @@ build_queuefile () { parse_queuefile_requires "$REPO_DIR" "$PRGNAM" "$QUEUEFILE" tac $QUEUEFILE > $CATFILE if cmp -s "$CATFILE" "$OLDFILE"; then - rm $QUEUEFILE $CATFILE + if [ -z $CUSTOM_QUEUE ]; then + rm $QUEUEFILE $CATFILE + fi else mv $CATFILE $OLDFILE rm $QUEUEFILE @@ -242,7 +245,7 @@ execute_build () { printf '%s\n' "${PKGSNEW[@]}" | \ parallel --eta --will-cite --jobs $JOBS \ /usr/libexec/sbopkg/sqg/sqg-build-queuefile \ - "$REPO_DIR" "$QUEUEDIR" {} "$VERBOSE" + "$REPO_DIR" "$QUEUEDIR" {} "$VERBOSE" $CUSTOM_QUEUE if [ ! -z $CUSTOM_QUEUE ]; then build_queuefile_custom "$QUEUEDIR" "$CUSTOM_QUEUE" "$PKGS" diff --git a/src/usr/libexec/sbopkg/sqg/sqg-build-queuefile b/src/usr/libexec/sbopkg/sqg/sqg-build-queuefile index 41afcc6..497e511 100755 --- a/src/usr/libexec/sbopkg/sqg/sqg-build-queuefile +++ b/src/usr/libexec/sbopkg/sqg/sqg-build-queuefile @@ -24,7 +24,9 @@ else echo "Processing $INFO_BASENAME." fi - if [[ ! -z $REQUIRES ]]; then + if [[ ! -z $CUSTOM_QUEUE ]]; then build_queuefile "$REPO_DIR" "$QUEUEDIR" "$PRGNAM" "$CUSTOM_QUEUE" + elif [[ ! -z $REQUIRES ]]; then + build_queuefile "$REPO_DIR" "$QUEUEDIR" "$PRGNAM" fi -fi \ No newline at end of file +fi