Yedidyah Bar David has uploaded a new change for review.

Change subject: packaging: setup: Check update for Setup before product
......................................................................

packaging: setup: Check update for Setup before product

Check if there is an update for the setup package before checking if
there is an update for the product packages.

Change-Id: I30c800041ea0f02a9bc33392f5a246e0906467b2
Signed-off-by: Yedidyah Bar David <d...@redhat.com>
---
M packaging/setup/plugins/ovirt-engine-setup/distro-rpm/packages.py
1 file changed, 15 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/92/19892/1

diff --git a/packaging/setup/plugins/ovirt-engine-setup/distro-rpm/packages.py 
b/packaging/setup/plugins/ovirt-engine-setup/distro-rpm/packages.py
index dd3e42c..215e807 100644
--- a/packaging/setup/plugins/ovirt-engine-setup/distro-rpm/packages.py
+++ b/packaging/setup/plugins/ovirt-engine-setup/distro-rpm/packages.py
@@ -312,6 +312,21 @@
         upgradeAvailable = None
         haveRollback = None
 
+        self.logger.info(_('Checking for an update for Setup...'))
+        if self._checkForPackagesUpdate(
+            packages=(osetupcons.Const.ENGINE_PACKAGE_SETUP_NAME,)
+        ):
+            self.logger.error(
+                _(
+                    'An update for the Setup package "{package}" was '
+                    'found. Please update that package, e.g. by running '
+                    '"yum update {package}", and then execute Setup again.'
+                ).format(
+                    package=osetupcons.Const.ENGINE_PACKAGE_SETUP_NAME,
+                )
+            )
+            raise RuntimeError(_('Please update the Setup package'))
+
         if self.environment[osetupcons.RPMDistroEnv.ENABLE_UPGRADE] is None:
             self.logger.info(_('Checking for product updates...'))
             (
@@ -339,21 +354,6 @@
                 )
 
         if self.environment[osetupcons.RPMDistroEnv.ENABLE_UPGRADE]:
-            self.logger.info(_('Checking for an update for Setup...'))
-            if self._checkForPackagesUpdate(
-                packages=(osetupcons.Const.ENGINE_PACKAGE_SETUP_NAME,)
-            ):
-                self.logger.error(
-                    _(
-                        'An update for the Setup package "{package}" was '
-                        'found. Please update that package, e.g. by running '
-                        '"yum update {package}", and then execute Setup again.'
-                    ).format(
-                        package=osetupcons.Const.ENGINE_PACKAGE_SETUP_NAME,
-                    )
-                )
-                raise RuntimeError(_('Please update the Setup package'))
-
             if upgradeAvailable is None:
                 (
                     upgradeAvailable,


-- 
To view, visit http://gerrit.ovirt.org/19892
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I30c800041ea0f02a9bc33392f5a246e0906467b2
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yedidyah Bar David <d...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to