Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/
Date: Mon, 04 Apr 2022 19:05:02
Message-Id: 1649099077.eeaeb27707890e3f96baaf13493f95e6368f5f13.sam@gentoo
1 commit: eeaeb27707890e3f96baaf13493f95e6368f5f13
2 Author: Kenneth Raplee <kenrap <AT> kennethraplee <DOT> com>
3 AuthorDate: Sat Apr 2 01:20:36 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 4 19:04:37 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=eeaeb277
7
8 Simplify by inlining a single use method
9
10 Signed-off-by: Kenneth Raplee <kenrap <AT> kennethraplee.com>
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 lib/portage/manifest.py | 22 ++++++++++------------
14 1 file changed, 10 insertions(+), 12 deletions(-)
15
16 diff --git a/lib/portage/manifest.py b/lib/portage/manifest.py
17 index 4eb6dc18c..f0fe1fbca 100644
18 --- a/lib/portage/manifest.py
19 +++ b/lib/portage/manifest.py
20 @@ -182,11 +182,16 @@ class Manifest:
21 self.fhashdict = {t: {} for t in MANIFEST2_IDENTIFIERS}
22
23 if not from_scratch:
24 - self._read()
25 - if fetchlist_dict != None:
26 - self.fetchlist_dict = fetchlist_dict
27 - else:
28 - self.fetchlist_dict = {}
29 + # Parse Manifest file for this instance
30 + try:
31 + self._readManifest(self.getFullname(), myhashdict=self.fhashdict)
32 + except FileNotFound:
33 + pass
34 +
35 + self.fetchlist_dict = {}
36 + if fetchlist_dict:
37 + self.fetchlist_dict.update(fetchlist_dict)
38 +
39 self.distdir = distdir
40 self.thin = thin
41 if thin:
42 @@ -232,13 +237,6 @@ class Manifest:
43 else:
44 raise
45
46 - def _read(self):
47 - """Parse Manifest file for this instance"""
48 - try:
49 - self._readManifest(self.getFullname(), myhashdict=self.fhashdict)
50 - except FileNotFound:
51 - pass
52 -
53 def _parseManifestLines(self, mylines):
54 """Parse manifest lines and return a list of manifest entries."""
55 for myline in mylines: