dom0-updates: Fix showing package list when --check-only option was used

Fixes QubesOS/qubes-issues#1294
This commit is contained in:
Marek Marczykowski-Górecki 2015-10-10 21:20:32 +02:00
parent afb70cf040
commit 397f6fdc52
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -74,7 +74,8 @@ fi
if [ "x$PKGLIST" = "x" ]; then if [ "x$PKGLIST" = "x" ]; then
echo "Checking for dom0 updates..." >&2 echo "Checking for dom0 updates..." >&2
UPDATES=`yum $OPTS check-update -q | cut -f 1 -d ' ' | grep -v "^Obsoleting"` UPDATES_FULL=`yum $OPTS check-update -q`
UPDATES=`echo "$UPDATES_FULL" | cut -f 1 -d ' ' | grep -v "^Obsoleting"`
else else
PKGS_FROM_CMDLINE=1 PKGS_FROM_CMDLINE=1
fi fi
@ -88,7 +89,7 @@ if [ -z "$PKGLIST" -a -z "$UPDATES" ]; then
fi fi
if [ "$CHECK_ONLY" = "1" ]; then if [ "$CHECK_ONLY" = "1" ]; then
echo "Available updates: $PKGLIST" echo "Available updates: $UPDATES_FULL"
exit 100 exit 100
fi fi