Gentoo Archives: gentoo-commits

From: Brian Dolbec <brian.dolbec@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/layman:master commit in: layman/
Date: Thu, 28 Aug 2014 22:54:07
Message-Id: 1409266305.d956bd5e5dae18172e0398bbd112fe43785d8041.dol-sen@gentoo
1 commit: d956bd5e5dae18172e0398bbd112fe43785d8041
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 28 22:48:09 2014 +0000
4 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
5 CommitDate: Thu Aug 28 22:51:45 2014 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=d956bd5e
7
8 Fix bug 521348, results from operations were not tracked correctly
9
10 Overlay.update() returned a single boolean, while the repo_conf.update() returned a list.
11 Those results were not added to the overlay result.
12 Also the warnings are printed after the successes, so re-word the update warning message so it is not confusing.
13
14 ---
15 layman/api.py | 2 +-
16 layman/db.py | 5 +++--
17 2 files changed, 4 insertions(+), 3 deletions(-)
18
19 diff --git a/layman/api.py b/layman/api.py
20 index b62e8f5..60bcbe0 100755
21 --- a/layman/api.py
22 +++ b/layman/api.py
23 @@ -429,7 +429,7 @@ class LaymanAPI(object):
24 '\n'\
25 'as correct location%(plural)s.\n'\
26 '\n'\
27 - 'Repo: "%(repo_name)s" will be updated...' %\
28 + 'Repo: "%(repo_name)s" was automatically updated...' %\
29 ({
30 'repo_name':odb.name,
31 'current_src':current_src,
32
33 diff --git a/layman/db.py b/layman/db.py
34 index 57f12e2..b874fe8 100644
35 --- a/layman/db.py
36 +++ b/layman/db.py
37 @@ -288,15 +288,16 @@ class DB(DbBase):
38 def update(self, overlay, available_srcs):
39 '''
40 Updates the overlay source via the available source(s).
41 -
42 +
43 @params overlay: layman.overlay.Overlay object.
44 @params available_srcs: set of available source URLs.
45 '''
46
47 source, result = self.overlays[overlay.name].update(self.config['storage'],
48 available_srcs)
49 + result = [result]
50 self.overlays[overlay.name].sources = source
51 - self.repo_conf.update(self.overlays[overlay.name])
52 + result.extend(self.repo_conf.update(self.overlays[overlay.name]))
53 self.write(self.path)
54
55 if False in result: