Blame SOURCES/subscription-manager-1.15.9-6-to-subscription-manager-1.15.9-7.patch

d88f46
diff --git a/rel-eng/packages/subscription-manager b/rel-eng/packages/subscription-manager
d88f46
index 77a1238..6f399f3 100644
d88f46
--- a/rel-eng/packages/subscription-manager
d88f46
+++ b/rel-eng/packages/subscription-manager
d88f46
@@ -1 +1 @@
d88f46
-1.15.9-6 ./
d88f46
+1.15.9-7 ./
d88f46
diff --git a/src/initial-setup/com_redhat_subscription_manager/ks/rhsm_ks.py b/src/initial-setup/com_redhat_subscription_manager/ks/rhsm_ks.py
d88f46
index ba3a232..2de10f3 100644
d88f46
--- a/src/initial-setup/com_redhat_subscription_manager/ks/rhsm_ks.py
d88f46
+++ b/src/initial-setup/com_redhat_subscription_manager/ks/rhsm_ks.py
d88f46
@@ -34,9 +34,11 @@ __all__ = ["RHSMAddonData"]
d88f46
 class RHSMAddonData(AddonData):
d88f46
     log = logging.getLogger(__name__)
d88f46
 
d88f46
-    def setup(self, storage, ksdata, instclass):
d88f46
-        super(RHSMAddonData, self).__init__(storage, ksdata, instclass)
d88f46
+    def setup(self, storage, ksdata, instClass):
d88f46
+        super(RHSMAddonData, self).setup(storage, ksdata, instClass)
d88f46
 
d88f46
         self.log.debug("storage %s", storage)
d88f46
         self.log.debug("ksdata %s", ksdata)
d88f46
-        self.log.debug("instclass %s", instclass)
d88f46
+        self.log.debug("instClass %s", instClass)
d88f46
+
d88f46
+    # NOTE: no execute() or handle_line() yet
d88f46
diff --git a/src/plugins/search-disabled-repos.py b/src/plugins/search-disabled-repos.py
d88f46
index 8742ae6..7ab1deb 100644
d88f46
--- a/src/plugins/search-disabled-repos.py
d88f46
+++ b/src/plugins/search-disabled-repos.py
d88f46
@@ -19,9 +19,14 @@
d88f46
 import logging
d88f46
 import os
d88f46
 import fnmatch
d88f46
+import sys
d88f46
+
d88f46
+sys.path.append('/usr/share/rhsm')
d88f46
+from subscription_manager import api
d88f46
 
d88f46
 from yum.plugins import TYPE_CORE, TYPE_INTERACTIVE
d88f46
 from yum.constants import TS_INSTALL_STATES
d88f46
+from yum import Errors
d88f46
 
d88f46
 requires_api_version = '2.7'
d88f46
 plugin_type = (TYPE_CORE, TYPE_INTERACTIVE)
d88f46
@@ -57,8 +62,12 @@ def postresolve_hook(conduit):
d88f46
         old_enabled_repos = set((repo.id for repo in repo_storage.listEnabled()))
d88f46
         for repo in disabled_repos:
d88f46
             repo.enable()
d88f46
-            conduit.info(logging.DEBUG, 'Repo temporarily enabled: %s' % repo.id)
d88f46
-        repo_storage.populateSack()
d88f46
+            try:
d88f46
+                repo_storage.populateSack(which=repo.id)
d88f46
+                conduit.info(logging.DEBUG, 'Repo temporarily enabled: %s' % repo.id)
d88f46
+            except Errors.RepoError:
d88f46
+                repo.disable()
d88f46
+                conduit.info(logging.DEBUG, 'Failed to temporarily enable repo: %s' % repo.id)
d88f46
         conduit.getTsInfo().changed = True
d88f46
 
d88f46
 
d88f46
@@ -71,9 +80,15 @@ def postverifytrans_hook(conduit):
d88f46
 
d88f46
     if prompt_permanently_enable_repos(conduit, helpful_new_repos):
d88f46
         for repo in helpful_new_repos:
d88f46
-            # FIXME: replace with API calls
d88f46
-            os.system('subscription-manager repos --enable=%s' % repo)
d88f46
-            conduit.info(logging.DEBUG, 'Repo permanently enabled: %s' % repo)
d88f46
+            try:
d88f46
+                enabled = api.enable_yum_repositories(repo)
d88f46
+            except Exception:
d88f46
+                enabled = 0
d88f46
+
d88f46
+            if enabled:
d88f46
+                conduit.info(logging.DEBUG, 'Repo permanently enabled: %s' % repo)
d88f46
+            else:
d88f46
+                conduit.info(logging.DEBUG, 'Failed to permanently enable repo: %s' % repo)
d88f46
 
d88f46
 
d88f46
 def is_repo_important(repo, ignored_repos):
d88f46
diff --git a/src/subscription_manager/gui/widgets.py b/src/subscription_manager/gui/widgets.py
d88f46
index e50b7ae..57d400d 100644
d88f46
--- a/src/subscription_manager/gui/widgets.py
d88f46
+++ b/src/subscription_manager/gui/widgets.py
d88f46
@@ -876,6 +876,9 @@ class QuantitySelectionColumn(ga_Gtk.TreeViewColumn):
d88f46
                                                       text=self.quantity_store_idx)
d88f46
         self.set_cell_data_func(self.quantity_renderer, self._update_cell_based_on_data)
d88f46
 
d88f46
+        self.set_max_width(100)
d88f46
+        self.set_min_width(100)
d88f46
+
d88f46
     def _setup_editor(self, cellrenderer, editable, path):
d88f46
         # Only allow numeric characters.
d88f46
         editable.set_property("numeric", True)
d88f46
diff --git a/subscription-manager.spec b/subscription-manager.spec
d88f46
index 80bcf70..1d4b9a4 100644
d88f46
--- a/subscription-manager.spec
d88f46
+++ b/subscription-manager.spec
d88f46
@@ -49,7 +49,7 @@
d88f46
 
d88f46
 Name: subscription-manager
d88f46
 Version: 1.15.9
d88f46
-Release: 6%{?dist}
d88f46
+Release: 7%{?dist}
d88f46
 Summary: Tools and libraries for subscription and repository management
d88f46
 Group:   System Environment/Base
d88f46
 License: GPLv2
d88f46
@@ -542,6 +542,14 @@ fi
d88f46
 %endif
d88f46
 
d88f46
 %changelog
d88f46
+* Wed Aug 19 2015 Chris Rog <crog@redhat.com> 1.15.9-7
d88f46
+- search-disabled-repos: ignore failed temporarily enabled repos
d88f46
+  (vmukhame@redhat.com)
d88f46
+- search-disabled-repos: replace CLI with API calls for enabling repos
d88f46
+  permanently (vmukhame@redhat.com)
d88f46
+- 1253275: Fix initial-setup ks mode (alikins@redhat.com)
d88f46
+- 1246429: Stop spinbutton from blocking quantity (alikins@redhat.com)
d88f46
+
d88f46
 * Fri Aug 14 2015 Chris Rog <crog@redhat.com> 1.15.9-6
d88f46
 - 1141128: Subscriptions need refresh after imported cert removed
d88f46
   (wpoteat@redhat.com)