1 |
commit: 95f6ee7dbf8c2a7267eac7da644f5ce2cff524b5 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 14 10:38:11 2022 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 14 10:38:11 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=95f6ee7d |
7 |
|
8 |
tarball: fix version to comply with PEP440 |
9 |
|
10 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
11 |
|
12 |
bin/isolated-functions.sh | 2 +- |
13 |
lib/_emerge/EbuildPhase.py | 32 ++++++++++++++++---------------- |
14 |
lib/_emerge/actions.py | 46 +++++++++++++++++++++++----------------------- |
15 |
lib/_emerge/depgraph.py | 18 +++++++++--------- |
16 |
lib/_emerge/emergelog.py | 1 - |
17 |
lib/portage/__init__.py | 8 ++++---- |
18 |
tarball.sh | 2 +- |
19 |
7 files changed, 54 insertions(+), 55 deletions(-) |
20 |
|
21 |
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh |
22 |
index 57dcfdb2f..ad294ae49 100644 |
23 |
--- a/bin/isolated-functions.sh |
24 |
+++ b/bin/isolated-functions.sh |
25 |
@@ -639,7 +639,7 @@ debug-print() { |
26 |
# default target |
27 |
printf '%s\n' "${@}" >> "${T}/eclass-debug.log" |
28 |
# let the portage user own/write to this file |
29 |
- chgrp "${PORTAGE_GRPNAME:-portage}" "${T}/eclass-debug.log" |
30 |
+ chgrp "${PORTAGE_GRPNAME:-${PORTAGE_GROUP}}" "${T}/eclass-debug.log" |
31 |
chmod g+w "${T}/eclass-debug.log" |
32 |
fi |
33 |
} |
34 |
|
35 |
diff --git a/lib/_emerge/EbuildPhase.py b/lib/_emerge/EbuildPhase.py |
36 |
index d07cff7bd..3fe4c8f3a 100644 |
37 |
--- a/lib/_emerge/EbuildPhase.py |
38 |
+++ b/lib/_emerge/EbuildPhase.py |
39 |
@@ -603,22 +603,22 @@ class _PostPhaseCommands(CompositeTask): |
40 |
os.path.join(self.settings["PORTAGE_BUILDDIR"], "build-info"), all_provides |
41 |
) |
42 |
|
43 |
- # BEGIN PREFIX LOCAL |
44 |
- if EPREFIX != "" and unresolved: |
45 |
- # in prefix, consider the host libs for any unresolved libs, |
46 |
- # so we kill warnings about missing libc.so.1, etc. |
47 |
- for obj, libs in list(unresolved): |
48 |
- unresolved.remove((obj, libs)) |
49 |
- libs=list(libs) |
50 |
- for lib in list(libs): |
51 |
- for path in ['/lib64', '/lib/64', '/lib', \ |
52 |
- '/usr/lib64', '/usr/lib/64', '/usr/lib']: |
53 |
- if os.path.exists(os.path.join(path, lib)): |
54 |
- libs.remove(lib) |
55 |
- break |
56 |
- if len(libs) > 0: |
57 |
- unresolved.append((obj, tuple(libs))) |
58 |
- # END PREFIX LOCAL |
59 |
+ # BEGIN PREFIX LOCAL |
60 |
+ if EPREFIX != "" and unresolved: |
61 |
+ # in prefix, consider the host libs for any unresolved libs, |
62 |
+ # so we kill warnings about missing libc.so.1, etc. |
63 |
+ for obj, libs in list(unresolved): |
64 |
+ unresolved.remove((obj, libs)) |
65 |
+ libs=list(libs) |
66 |
+ for lib in list(libs): |
67 |
+ for path in ['/lib64', '/lib/64', '/lib', \ |
68 |
+ '/usr/lib64', '/usr/lib/64', '/usr/lib']: |
69 |
+ if os.path.exists(os.path.join(path, lib)): |
70 |
+ libs.remove(lib) |
71 |
+ break |
72 |
+ if len(libs) > 0: |
73 |
+ unresolved.append((obj, tuple(libs))) |
74 |
+ # END PREFIX LOCAL |
75 |
|
76 |
if unresolved: |
77 |
unresolved.sort() |
78 |
|
79 |
diff --git a/lib/_emerge/actions.py b/lib/_emerge/actions.py |
80 |
index 0ed90cd71..c210255d0 100644 |
81 |
--- a/lib/_emerge/actions.py |
82 |
+++ b/lib/_emerge/actions.py |
83 |
@@ -2910,10 +2910,10 @@ def getgccversion(chost=None): |
84 |
gcc_ver_command = ["gcc", "-dumpversion"] |
85 |
gcc_ver_prefix = "gcc-" |
86 |
|
87 |
- clang_ver_command = ['clang', '--version'] |
88 |
- clang_ver_prefix = 'clang-' |
89 |
+ clang_ver_command = ['clang', '--version'] |
90 |
+ clang_ver_prefix = 'clang-' |
91 |
|
92 |
- ubinpath = os.path.join('/', portage.const.EPREFIX, 'usr', 'bin') |
93 |
+ ubinpath = os.path.join('/', portage.const.EPREFIX, 'usr', 'bin') |
94 |
|
95 |
gcc_not_found_error = red( |
96 |
"!!! No gcc found. You probably need to 'source /etc/profile'\n" |
97 |
@@ -2921,11 +2921,11 @@ def getgccversion(chost=None): |
98 |
+ "!!! other terminals also.\n" |
99 |
) |
100 |
|
101 |
- def getclangversion(output): |
102 |
- version = re.search('clang version ([0-9.]+) ', output) |
103 |
- if version: |
104 |
- return version.group(1) |
105 |
- return "unknown" |
106 |
+ def getclangversion(output): |
107 |
+ version = re.search('clang version ([0-9.]+) ', output) |
108 |
+ if version: |
109 |
+ return version.group(1) |
110 |
+ return "unknown" |
111 |
|
112 |
if chost: |
113 |
try: |
114 |
@@ -2958,21 +2958,21 @@ def getgccversion(chost=None): |
115 |
if mystatus == os.EX_OK: |
116 |
return gcc_ver_prefix + myoutput |
117 |
|
118 |
- try: |
119 |
- proc = subprocess.Popen( |
120 |
- [ubinpath + "/" + chost + "-" + clang_ver_command[0]] |
121 |
- + clang_ver_command[1:], |
122 |
- stdout=subprocess.PIPE, |
123 |
- stderr=subprocess.STDOUT, |
124 |
- ) |
125 |
- except OSError: |
126 |
- myoutput = None |
127 |
- mystatus = 1 |
128 |
- else: |
129 |
- myoutput = _unicode_decode(proc.communicate()[0]).rstrip("\n") |
130 |
- mystatus = proc.wait() |
131 |
- if mystatus == os.EX_OK: |
132 |
- return clang_ver_prefix + getclangversion(myoutput) |
133 |
+ try: |
134 |
+ proc = subprocess.Popen( |
135 |
+ [ubinpath + "/" + chost + "-" + clang_ver_command[0]] |
136 |
+ + clang_ver_command[1:], |
137 |
+ stdout=subprocess.PIPE, |
138 |
+ stderr=subprocess.STDOUT, |
139 |
+ ) |
140 |
+ except OSError: |
141 |
+ myoutput = None |
142 |
+ mystatus = 1 |
143 |
+ else: |
144 |
+ myoutput = _unicode_decode(proc.communicate()[0]).rstrip("\n") |
145 |
+ mystatus = proc.wait() |
146 |
+ if mystatus == os.EX_OK: |
147 |
+ return clang_ver_prefix + getclangversion(myoutput) |
148 |
|
149 |
try: |
150 |
proc = subprocess.Popen( |
151 |
|
152 |
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py |
153 |
index 61be9d02b..0e977a0a9 100644 |
154 |
--- a/lib/_emerge/depgraph.py |
155 |
+++ b/lib/_emerge/depgraph.py |
156 |
@@ -11857,15 +11857,15 @@ def _get_masking_status(pkg, pkgsettings, root_config, myrepo=None, use=None): |
157 |
if not pkgsettings._accept_chost(pkg.cpv, pkg._metadata): |
158 |
mreasons.append(_MaskReason("CHOST", "CHOST: %s" % pkg._metadata["CHOST"])) |
159 |
|
160 |
- eprefix = pkgsettings["EPREFIX"] |
161 |
- if len(eprefix.rstrip('/')) > 0 and pkg.built and not pkg.installed: |
162 |
- if not "EPREFIX" in pkg._metadata: |
163 |
- mreasons.append(_MaskReason("EPREFIX", |
164 |
- "missing EPREFIX")) |
165 |
- elif len(pkg._metadata["EPREFIX"].strip()) < len(eprefix): |
166 |
- mreasons.append(_MaskReason("EPREFIX", |
167 |
- "EPREFIX: '%s' too small" % \ |
168 |
- pkg._metadata["EPREFIX"])) |
169 |
+ eprefix = pkgsettings["EPREFIX"] |
170 |
+ if len(eprefix.rstrip('/')) > 0 and pkg.built and not pkg.installed: |
171 |
+ if not "EPREFIX" in pkg._metadata: |
172 |
+ mreasons.append(_MaskReason("EPREFIX", |
173 |
+ "missing EPREFIX")) |
174 |
+ elif len(pkg._metadata["EPREFIX"].strip()) < len(eprefix): |
175 |
+ mreasons.append(_MaskReason("EPREFIX", |
176 |
+ "EPREFIX: '%s' too small" % \ |
177 |
+ pkg._metadata["EPREFIX"])) |
178 |
|
179 |
if pkg.invalid: |
180 |
for msgs in pkg.invalid.values(): |
181 |
|
182 |
diff --git a/lib/_emerge/emergelog.py b/lib/_emerge/emergelog.py |
183 |
index a891f5b54..c951d61b5 100644 |
184 |
--- a/lib/_emerge/emergelog.py |
185 |
+++ b/lib/_emerge/emergelog.py |
186 |
@@ -17,7 +17,6 @@ from portage.const import EPREFIX |
187 |
# unless it's really called via emerge. |
188 |
_disable = True |
189 |
_emerge_log_dir = EPREFIX + '/var/log' |
190 |
-_emerge_log_dir = "/var/log" |
191 |
|
192 |
|
193 |
def emergelog(xterm_titles, mystr, short_msg=None): |
194 |
|
195 |
diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py |
196 |
index b6b00a8c2..1e4c68b13 100644 |
197 |
--- a/lib/portage/__init__.py |
198 |
+++ b/lib/portage/__init__.py |
199 |
@@ -12,8 +12,8 @@ try: |
200 |
import asyncio |
201 |
import sys |
202 |
import errno |
203 |
- # PREFIX LOCAL |
204 |
- import multiprocessing |
205 |
+ # PREFIX LOCAL |
206 |
+ import multiprocessing |
207 |
|
208 |
if not hasattr(errno, "ESTALE"): |
209 |
# ESTALE may not be defined on some systems, such as interix. |
210 |
@@ -58,9 +58,9 @@ except ImportError as e: |
211 |
# the latter causing issues because all kinds of things can't be |
212 |
# pickled, so force fork mode for now |
213 |
try: |
214 |
- multiprocessing.set_start_method('fork') |
215 |
+ multiprocessing.set_start_method('fork') |
216 |
except RuntimeError: |
217 |
- pass |
218 |
+ pass |
219 |
# END PREFIX LOCAL |
220 |
|
221 |
try: |
222 |
|
223 |
diff --git a/tarball.sh b/tarball.sh |
224 |
index 9aaf7e50d..761e1e8af 100755 |
225 |
--- a/tarball.sh |
226 |
+++ b/tarball.sh |
227 |
@@ -28,7 +28,7 @@ fi |
228 |
|
229 |
install -d -m0755 ${DEST} |
230 |
rsync -a --exclude='.git' --exclude='.hg' --exclude="repoman/" . ${DEST} |
231 |
-sed -i -e '/^VERSION\s*=/s/^.*$/VERSION = "'${V}-prefix'"/' \ |
232 |
+sed -i -e '/^VERSION\s*=/s/^.*$/VERSION = "'${V}_prefix'"/' \ |
233 |
${DEST}/lib/portage/__init__.py |
234 |
sed -i -e "/version = /s/'[^']\+'/'${V}-prefix'/" ${DEST}/setup.py |
235 |
sed -i -e "1s/VERSION/${V}-prefix/" ${DEST}/man/{,ru/}*.[15] |