dom0-updates: use GUI tool appropriate to current DE (#824)
This commit is contained in:
parent
d63c27f79a
commit
8627ef9a80
@ -64,6 +64,35 @@ if [ "$GUI" == "1" -a -n "$PKGS" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$GUI" == "1" ]; then
|
||||||
|
apps="yumex apper gpk-update-viewer"
|
||||||
|
|
||||||
|
if [ -n "$KDE_FULL_SESSION" ]; then
|
||||||
|
apps="apper yumex gpk-update-viewer"
|
||||||
|
fi
|
||||||
|
|
||||||
|
guiapp=
|
||||||
|
for app in $apps; do
|
||||||
|
if type $app &>/dev/null; then
|
||||||
|
guiapp=$app
|
||||||
|
break;
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$guiapp" ]; then
|
||||||
|
message1="You don't have installed any supported yum frontend."
|
||||||
|
message2="Install (using qubes-dom0-update) one of: $apps"
|
||||||
|
|
||||||
|
if [ "$KDE_FULL_SESSION" ]; then
|
||||||
|
kdialog --sorry "$message1<br/>$message2"
|
||||||
|
else
|
||||||
|
zenity --error --text "$message1\n$message2"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$GUI" != "1" ]; then
|
if [ "$GUI" != "1" ]; then
|
||||||
QVMRUN_OPTS=--nogui
|
QVMRUN_OPTS=--nogui
|
||||||
fi
|
fi
|
||||||
@ -111,7 +140,7 @@ if [ "x$PKGS" != "x" ]; then
|
|||||||
elif [ -f /var/lib/qubes/updates/repodata/repomd.xml ]; then
|
elif [ -f /var/lib/qubes/updates/repodata/repomd.xml ]; then
|
||||||
# Above file exists only when at least one package was downloaded
|
# Above file exists only when at least one package was downloaded
|
||||||
if [ "$GUI" == "1" ]; then
|
if [ "$GUI" == "1" ]; then
|
||||||
gpk-update-viewer
|
$guiapp
|
||||||
else
|
else
|
||||||
yum check-update
|
yum check-update
|
||||||
if [ $? -eq 100 ]; then
|
if [ $? -eq 100 ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user