1 |
For ebuilds with stable keywords, check if the dependencies are |
2 |
satisfiable for unstable configurations, since use.stable.mask |
3 |
is not applied for unstable configurations. Fix the |
4 |
KeywordsManager.isStable method to behave consistently for both |
5 |
repoman and emerge. |
6 |
|
7 |
X-Gentoo-Bug: 563546 |
8 |
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=563546 |
9 |
--- |
10 |
.../package/ebuild/_config/KeywordsManager.py | 35 ++++++++-------------- |
11 |
pym/repoman/scanner.py | 10 +++++++ |
12 |
2 files changed, 22 insertions(+), 23 deletions(-) |
13 |
|
14 |
diff --git a/pym/portage/package/ebuild/_config/KeywordsManager.py b/pym/portage/package/ebuild/_config/KeywordsManager.py |
15 |
index 72e24b9..a4ffb62 100644 |
16 |
--- a/pym/portage/package/ebuild/_config/KeywordsManager.py |
17 |
+++ b/pym/portage/package/ebuild/_config/KeywordsManager.py |
18 |
@@ -112,29 +112,18 @@ class KeywordsManager(object): |
19 |
if self._getMissingKeywords(pkg, pgroups, mygroups): |
20 |
return False |
21 |
|
22 |
- if pkg.cpv._settings.local_config: |
23 |
- # If replacing all keywords with unstable variants would mask the |
24 |
- # package, then it's considered stable. |
25 |
- unstable = [] |
26 |
- for kw in mygroups: |
27 |
- if kw[:1] != "~": |
28 |
- kw = "~" + kw |
29 |
- unstable.append(kw) |
30 |
- |
31 |
- return bool(self._getMissingKeywords(pkg, pgroups, set(unstable))) |
32 |
- else: |
33 |
- # For repoman, if the package has an effective stable keyword that |
34 |
- # intersects with the effective ACCEPT_KEYWORDS for the current |
35 |
- # profile, then consider it stable. |
36 |
- for kw in pgroups: |
37 |
- if kw[:1] != "~": |
38 |
- if kw in mygroups or '*' in mygroups: |
39 |
- return True |
40 |
- if kw == '*': |
41 |
- for x in mygroups: |
42 |
- if x[:1] != "~": |
43 |
- return True |
44 |
- return False |
45 |
+ # If replacing all keywords with unstable variants would mask the |
46 |
+ # package, then it's considered stable for the purposes of |
47 |
+ # use.stable.mask/force interpretation. For unstable configurations, |
48 |
+ # this guarantees that the effective use.force/mask settings for a |
49 |
+ # particular ebuild do not change when that ebuild is stabilized. |
50 |
+ unstable = [] |
51 |
+ for kw in mygroups: |
52 |
+ if kw[:1] != "~": |
53 |
+ kw = "~" + kw |
54 |
+ unstable.append(kw) |
55 |
+ |
56 |
+ return bool(self._getMissingKeywords(pkg, pgroups, set(unstable))) |
57 |
|
58 |
def getMissingKeywords(self, |
59 |
cpv, |
60 |
diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py |
61 |
index df46144..9e5a313 100644 |
62 |
--- a/pym/repoman/scanner.py |
63 |
+++ b/pym/repoman/scanner.py |
64 |
@@ -379,14 +379,24 @@ class Scanner(object): |
65 |
else: |
66 |
arches.add((keyword, arch, (arch, keyword))) |
67 |
else: |
68 |
+ # For ebuilds with stable keywords, check if the |
69 |
+ # dependencies are satisfiable for unstable |
70 |
+ # configurations, since use.stable.mask is not |
71 |
+ # applied for unstable configurations (see bug |
72 |
+ # 563546). |
73 |
if keyword == "*": |
74 |
for expanded_arch in self.profiles: |
75 |
if expanded_arch == "**": |
76 |
continue |
77 |
arches.add( |
78 |
(keyword, expanded_arch, (expanded_arch,))) |
79 |
+ arches.add( |
80 |
+ (keyword, expanded_arch, |
81 |
+ (expanded_arch, "~" + expanded_arch))) |
82 |
else: |
83 |
arches.add((keyword, keyword, (keyword,))) |
84 |
+ arches.add((keyword, keyword, |
85 |
+ (keyword, "~" + keyword))) |
86 |
if not arches: |
87 |
# Use an empty profile for checking dependencies of |
88 |
# packages that have empty KEYWORDS. |
89 |
-- |
90 |
2.4.9 |