sqg: Do not skip empty deps package when using -o

Hopefully this fix #83.

Signed-off-by: Willy Sudiarto Raharjo <willysr@sbopkg.org>
This commit is contained in:
Willy Sudiarto Raharjo 2022-10-18 08:12:56 +07:00
parent 720a874d60
commit 7cbb2f36a6
2 changed files with 9 additions and 4 deletions

View File

@ -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
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"

View File

@ -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