1 |
commit: beb0b8ffa83e9d754909823a49e160b1873fdd74 |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 24 15:19:30 2015 +0000 |
4 |
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 24 15:23:10 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=beb0b8ff |
7 |
|
8 |
repoman/checks/ebuilds/fetches.py: Remove the incorrectly cached digests |
9 |
|
10 |
The digests were incorrectly being cached. |
11 |
At this point in the operation the digests must be loaded each time since they are for a |
12 |
different pkg. |
13 |
|
14 |
pym/repoman/checks/ebuilds/fetches.py | 26 +++++++++++--------------- |
15 |
1 file changed, 11 insertions(+), 15 deletions(-) |
16 |
|
17 |
diff --git a/pym/repoman/checks/ebuilds/fetches.py b/pym/repoman/checks/ebuilds/fetches.py |
18 |
index 53ed64f..0b9c321 100644 |
19 |
--- a/pym/repoman/checks/ebuilds/fetches.py |
20 |
+++ b/pym/repoman/checks/ebuilds/fetches.py |
21 |
@@ -29,7 +29,6 @@ class FetchChecks(object): |
22 |
self.repo_settings = repo_settings |
23 |
self.repoman_settings = repoman_settings |
24 |
self.vcs_settings = vcs_settings |
25 |
- self._digests = None |
26 |
|
27 |
def check(self, xpkg, checkdir, checkdir_relative, mychanged, mynew): |
28 |
'''Checks the ebuild sources and files for errors |
29 |
@@ -38,7 +37,7 @@ class FetchChecks(object): |
30 |
@param checkdir: string, directory path |
31 |
@param checkdir_relative: repolevel determined path |
32 |
''' |
33 |
- self.checkdir = checkdir |
34 |
+ _digests = self.digests(checkdir) |
35 |
fetchlist_dict = portage.FetchlistDict( |
36 |
checkdir, self.repoman_settings, self.portdb) |
37 |
myfiles_all = [] |
38 |
@@ -64,11 +63,11 @@ class FetchChecks(object): |
39 |
# produce a valid error elsewhere, such as "SRC_URI.syntax" |
40 |
# or "ebuild.sytax". |
41 |
myfiles_all = set(myfiles_all) |
42 |
- for entry in self.digests: |
43 |
+ for entry in _digests: |
44 |
if entry not in myfiles_all: |
45 |
self.qatracker.add_error("digest.unused", checkdir + "::" + entry) |
46 |
for entry in myfiles_all: |
47 |
- if entry not in self.digests: |
48 |
+ if entry not in _digests: |
49 |
self.qatracker.add_error("digest.missing", checkdir + "::" + entry) |
50 |
del myfiles_all |
51 |
|
52 |
@@ -125,14 +124,11 @@ class FetchChecks(object): |
53 |
"file.name", |
54 |
"%s/files/%s: char '%s'" % (checkdir, y, y[index])) |
55 |
|
56 |
- @property |
57 |
- def digests(self): |
58 |
- '''Property function, returns the saved digests or |
59 |
- loads them for the test''' |
60 |
- if not self._digests: |
61 |
- mf = self.repoman_settings.repositories.get_repo_for_location( |
62 |
- os.path.dirname(os.path.dirname(self.checkdir))) |
63 |
- mf = mf.load_manifest(self.checkdir, self.repoman_settings["DISTDIR"]) |
64 |
- self._digests = mf.getTypeDigests("DIST") |
65 |
- del mf |
66 |
- return self._digests |
67 |
+ def digests(self, checkdir): |
68 |
+ '''Returns the freshly loaded digests''' |
69 |
+ mf = self.repoman_settings.repositories.get_repo_for_location( |
70 |
+ os.path.dirname(os.path.dirname(checkdir))) |
71 |
+ mf = mf.load_manifest(checkdir, self.repoman_settings["DISTDIR"]) |
72 |
+ _digests = mf.getTypeDigests("DIST") |
73 |
+ del mf |
74 |
+ return _digests |