From d956bd5e5dae18172e0398bbd112fe43785d8041 Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Thu, 28 Aug 2014 15:48:09 -0700 Subject: Fix bug 521348, results from operations were not tracked correctly Overlay.update() returned a single boolean, while the repo_conf.update() returned a list. Those results were not added to the overlay result. Also the warnings are printed after the successes, so re-word the update warning message so it is not confusing. --- layman/api.py | 2 +- layman/db.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/layman/api.py b/layman/api.py index b62e8f5..60bcbe0 100755 --- a/layman/api.py +++ b/layman/api.py @@ -429,7 +429,7 @@ class LaymanAPI(object): '\n'\ 'as correct location%(plural)s.\n'\ '\n'\ - 'Repo: "%(repo_name)s" will be updated...' %\ + 'Repo: "%(repo_name)s" was automatically updated...' %\ ({ 'repo_name':odb.name, 'current_src':current_src, diff --git a/layman/db.py b/layman/db.py index 57f12e2..b874fe8 100644 --- a/layman/db.py +++ b/layman/db.py @@ -288,15 +288,16 @@ class DB(DbBase): def update(self, overlay, available_srcs): ''' Updates the overlay source via the available source(s). - + @params overlay: layman.overlay.Overlay object. @params available_srcs: set of available source URLs. ''' source, result = self.overlays[overlay.name].update(self.config['storage'], available_srcs) + result = [result] self.overlays[overlay.name].sources = source - self.repo_conf.update(self.overlays[overlay.name]) + result.extend(self.repo_conf.update(self.overlays[overlay.name])) self.write(self.path) if False in result: -- cgit v1.2.3-65-gdbad