dom0-updates: launch console update in terminal emulator as "GUI"

GUI updaters and Packagekit are confused by networkless dom0 and often
report that:
 - cannot check for updates (because of no network connection)
 - no updates are available, even if they are

The latter happen mostly because PackageKit does not load dnf.conf, so
try to use /etc/yum.repos.d (network repositories) instead of
/etc/yum.real.repos.d (local cache, downloaded by qubes-dom0-update).
Currently PackageKit does not support configuring it, the path is
hardcoded.

Until both of above issues get fixed, prefer console updater.

Fixes QubesOS/qubes-issues#1378
This commit is contained in:
Marek Marczykowski-Górecki 2018-01-12 04:54:07 +01:00
parent 8689170368
commit b07706fd7a
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -113,10 +113,10 @@ if [ "$GUI" == "1" -a -n "$PKGS" ]; then
fi fi
if [ "$GUI" == "1" ]; then if [ "$GUI" == "1" ]; then
apps="yumex apper gpk-update-viewer" apps="xterm konsole yumex apper gpk-update-viewer"
if [ -n "$KDE_FULL_SESSION" ]; then if [ -n "$KDE_FULL_SESSION" ]; then
apps="apper yumex gpk-update-viewer" apps="konsole xterm apper yumex gpk-update-viewer"
fi fi
guiapp= guiapp=
@ -125,6 +125,8 @@ if [ "$GUI" == "1" ]; then
guiapp=$app guiapp=$app
case $guiapp in case $guiapp in
apper) guiapp="apper --updates --nofork" ;; apper) guiapp="apper --updates --nofork" ;;
xterm) guiapp="xterm -e sudo dnf update" ;;
konsole) guiapp="konsole --hold -e sudo dnf update" ;;
*) guiapp=$app ;; *) guiapp=$app ;;
esac esac
break; break;