commit: d956bd5e5dae18172e0398bbd112fe43785d8041
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 28 22:48:09 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu Aug 28 22:51:45 2014 +0000
URL:
http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=d956bd5e
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: