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