diff --git a/rel-eng/packages/subscription-manager b/rel-eng/packages/subscription-manager index 3d3b701..77a1238 100644 --- a/rel-eng/packages/subscription-manager +++ b/rel-eng/packages/subscription-manager @@ -1 +1 @@ -1.15.9-5 ./ +1.15.9-6 ./ diff --git a/src/subscription_manager/entcertlib.py b/src/subscription_manager/entcertlib.py index 6ecf74c..48b37fc 100644 --- a/src/subscription_manager/entcertlib.py +++ b/src/subscription_manager/entcertlib.py @@ -273,10 +273,6 @@ class EntCertUpdateAction(object): rogue_count) % rogue_count self.ent_dir.refresh() - def delete_by_serial(self, serial): - for ent in self.entitlement_dir.list(): - if str(ent.serial == selection['serial']): - ent.delete() class EntitlementCertBundlesInstaller(object): """Install a list of entitlement cert bundles. diff --git a/src/subscription_manager/gui/mysubstab.py b/src/subscription_manager/gui/mysubstab.py index bdc2622..4eb3e2c 100644 --- a/src/subscription_manager/gui/mysubstab.py +++ b/src/subscription_manager/gui/mysubstab.py @@ -25,6 +25,7 @@ from subscription_manager.ga import GdkPixbuf as ga_GdkPixbuf from subscription_manager.async import AsyncBind from subscription_manager.cert_sorter import EntitlementCertStackingGroupSorter +from subscription_manager.entcertlib import EntCertDeleteAction from subscription_manager import injection as inj from subscription_manager.gui import messageWindow, progress @@ -150,8 +151,9 @@ class MySubscriptionsTab(widgets.SubscriptionManagerTab): self.async_bind.unbind(serial, selection, self._unsubscribe_callback, self._handle_unbind_exception) else: # unregistered, just delete the certs directly - self.backend.entcertlib.delete_by_serial(serial) - self.backend.cs.force_cert_check() + action = EntCertDeleteAction(self.entitlement_dir) + action.perform([serial]) + self.update_subscriptions() def unsubscribe_button_clicked(self, widget): selection = widgets.SelectionWrapper(self.top_view.get_selection(), self.store) diff --git a/src/subscription_manager/managercli.py b/src/subscription_manager/managercli.py index ba1c4d9..1b50b67 100644 --- a/src/subscription_manager/managercli.py +++ b/src/subscription_manager/managercli.py @@ -534,8 +534,8 @@ class UserPassCommand(CliCommand): @property def username(self): if not self._username: - print _("Registering to: %s%s:%s") % \ - (cfg.get("server", "hostname"), cfg.get("server", "prefix"), cfg.get("server", "port")) + print _("Registering to: %s:%s%s") % \ + (cfg.get("server", "hostname"), cfg.get("server", "port"), cfg.get("server", "prefix")) (self._username, self._password) = self._get_username_and_password( self.options.username, self.options.password) return self._username diff --git a/src/subscription_manager/plugin/ostree/action_invoker.py b/src/subscription_manager/plugin/ostree/action_invoker.py index f604f2f..2889b09 100644 --- a/src/subscription_manager/plugin/ostree/action_invoker.py +++ b/src/subscription_manager/plugin/ostree/action_invoker.py @@ -72,19 +72,14 @@ class OstreeContentUpdateActionCommand(object): # populate config, handle exceptions self.load_config(ostree_repo_config) - report = OstreeContentUpdateActionReport() - # return the composed set of EntitledContents entitled_contents = find_content(self.ent_source, content_type=OSTREE_CONTENT_TYPE) # update repo configs - updates = self.update_config(ostree_repo_config, + report = self.update_config(ostree_repo_config, contents=entitled_contents) - report.orig_remotes = list(updates.orig.remotes) - report.remote_updates = list(updates.new.remotes) - # reload the new config, so we have fresh remotes, etc self.load_config(ostree_repo_config) @@ -98,15 +93,27 @@ class OstreeContentUpdateActionCommand(object): def update_config(self, ostree_config, contents): """Update the remotes configured in a OstreeConfig.""" + report = OstreeContentUpdateActionReport() + updates_builder = \ model.OstreeConfigUpdatesBuilder(ostree_config, contents=contents) updates = updates_builder.build() + for remote in updates.orig.remotes: + if remote in updates.new.remotes: + report.remote_updates.append(remote) + else: + report.remote_deleted.append(remote) + + for remote in updates.new.remotes: + if remote not in updates.orig.remotes: + report.remote_added.append(remote) + updates.apply() updates.save() - return updates + return report def load_config(self, ostree_config): try: @@ -147,7 +154,7 @@ class OstreeContentUpdateActionReport(certlib.ActionReport): s.append(_("Updates:")) s.append(self._format_remotes(self.remote_updates)) s.append(_("Added:")) - s.append(self._format_remotes(self.remote_updates)) + s.append(self._format_remotes(self.remote_added)) s.append(_("Deleted:")) - s.append(self._format_remotes(self.orig_remotes)) + s.append(self._format_remotes(self.remote_deleted)) return '\n'.join(s) diff --git a/subscription-manager.spec b/subscription-manager.spec index c45672a..80bcf70 100644 --- a/subscription-manager.spec +++ b/subscription-manager.spec @@ -49,7 +49,7 @@ Name: subscription-manager Version: 1.15.9 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Tools and libraries for subscription and repository management Group: System Environment/Base License: GPLv2 @@ -123,8 +123,6 @@ platform. Summary: A plugin for handling OSTree content. Group: System Environment/Base -# ostree package also includes the gobject info for pygobject -Requires: ostree Requires: pygobject3-base # plugin needs a slightly newer version of python-iniparse for 'tidy' Requires: python-iniparse >= 0.4 @@ -544,6 +542,16 @@ fi %endif %changelog +* Fri Aug 14 2015 Chris Rog 1.15.9-6 +- 1141128: Subscriptions need refresh after imported cert removed + (wpoteat@redhat.com) +- 1185958: Remove ostree plugins req on ostree (alikins@redhat.com) +- 1150150: Ostree update report should log updates in proper section + (wpoteat@redhat.com) +- 1251610: Port and prefix were reversed in connection URL statement + (wpoteat@redhat.com) +- 1141128: Clean up and correct for style (wpoteat@redhat.com) + * Wed Aug 12 2015 Chris Rog 1.15.9-5 - 1141128: Imported certificate in detatched scenario not getting deleted (wpoteat@redhat.com)