From 17627cdf3caa79cd6b672740e83a32610954dc96 Mon Sep 17 00:00:00 2001 From: ttasket Date: Thu, 16 Jun 2016 07:59:28 -0400 Subject: [PATCH] Support in-place template reinstalls - for testing This doesn't yet prevent appvms from starting with invalid template during the reinstall, and doesn't deal with the Netvm setting problem. For issue #2061 --- dom0-updates/qubes-dom0-update | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dom0-updates/qubes-dom0-update b/dom0-updates/qubes-dom0-update index 57607ff..bbc72fb 100755 --- a/dom0-updates/qubes-dom0-update +++ b/dom0-updates/qubes-dom0-update @@ -63,9 +63,11 @@ done # Prevent template upgrade - this would override user changes - # but do allow explicit template reinstalls -if [ "$YUM_ACTION" == "reinstall" ] ; then +if [ "$YUM_ACTION" == "reinstall" ] && [[ "$PKGS" == *"qubes-template-"* ]]; then TEMPLATE_EXCLUDE_OPTS="" -else TEMPLATE_EXCLUDE_OPTS="--exclude=`rpm -qa --qf '%{NAME},' qubes-template-\*`" + echo "WARNING: Reinstalling a template will erase files in /home and /rw !" +else + TEMPLATE_EXCLUDE_OPTS="--exclude=`rpm -qa --qf '%{NAME},' qubes-template-\*`" fi YUM_OPTS="$TEMPLATE_EXCLUDE_OPTS $YUM_OPTS" ALL_OPTS="$TEMPLATE_EXCLUDE_OPTS $ALL_OPTS"