summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2014-08-28 15:48:09 -0700
committerBrian Dolbec <dolsen@gentoo.org>2014-08-28 15:51:45 -0700
commitd956bd5e5dae18172e0398bbd112fe43785d8041 (patch)
tree4165742f4a7aece860e258a43b9e90d0c06f5e18
parentupdater.py: Adds repos.conf module plug-in (diff)
downloadlayman-d956bd5e5dae18172e0398bbd112fe43785d8041.tar.gz
layman-d956bd5e5dae18172e0398bbd112fe43785d8041.tar.bz2
layman-d956bd5e5dae18172e0398bbd112fe43785d8041.zip
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.
-rwxr-xr-xlayman/api.py2
-rw-r--r--layman/db.py5
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: