* [gentoo-commits] proj/portage:prefix commit in: bin/, lib/portage/, lib/_emerge/, /
@ 2022-01-14 10:40 Fabian Groffen
0 siblings, 0 replies; only message in thread
From: Fabian Groffen @ 2022-01-14 10:40 UTC (permalink / raw
To: gentoo-commits
commit: 95f6ee7dbf8c2a7267eac7da644f5ce2cff524b5
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 14 10:38:11 2022 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Fri Jan 14 10:38:11 2022 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=95f6ee7d
tarball: fix version to comply with PEP440
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
bin/isolated-functions.sh | 2 +-
lib/_emerge/EbuildPhase.py | 32 ++++++++++++++++----------------
lib/_emerge/actions.py | 46 +++++++++++++++++++++++-----------------------
lib/_emerge/depgraph.py | 18 +++++++++---------
lib/_emerge/emergelog.py | 1 -
lib/portage/__init__.py | 8 ++++----
tarball.sh | 2 +-
7 files changed, 54 insertions(+), 55 deletions(-)
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index 57dcfdb2f..ad294ae49 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -639,7 +639,7 @@ debug-print() {
# default target
printf '%s\n' "${@}" >> "${T}/eclass-debug.log"
# let the portage user own/write to this file
- chgrp "${PORTAGE_GRPNAME:-portage}" "${T}/eclass-debug.log"
+ chgrp "${PORTAGE_GRPNAME:-${PORTAGE_GROUP}}" "${T}/eclass-debug.log"
chmod g+w "${T}/eclass-debug.log"
fi
}
diff --git a/lib/_emerge/EbuildPhase.py b/lib/_emerge/EbuildPhase.py
index d07cff7bd..3fe4c8f3a 100644
--- a/lib/_emerge/EbuildPhase.py
+++ b/lib/_emerge/EbuildPhase.py
@@ -603,22 +603,22 @@ class _PostPhaseCommands(CompositeTask):
os.path.join(self.settings["PORTAGE_BUILDDIR"], "build-info"), all_provides
)
- # BEGIN PREFIX LOCAL
- if EPREFIX != "" and unresolved:
- # in prefix, consider the host libs for any unresolved libs,
- # so we kill warnings about missing libc.so.1, etc.
- for obj, libs in list(unresolved):
- unresolved.remove((obj, libs))
- libs=list(libs)
- for lib in list(libs):
- for path in ['/lib64', '/lib/64', '/lib', \
- '/usr/lib64', '/usr/lib/64', '/usr/lib']:
- if os.path.exists(os.path.join(path, lib)):
- libs.remove(lib)
- break
- if len(libs) > 0:
- unresolved.append((obj, tuple(libs)))
- # END PREFIX LOCAL
+ # BEGIN PREFIX LOCAL
+ if EPREFIX != "" and unresolved:
+ # in prefix, consider the host libs for any unresolved libs,
+ # so we kill warnings about missing libc.so.1, etc.
+ for obj, libs in list(unresolved):
+ unresolved.remove((obj, libs))
+ libs=list(libs)
+ for lib in list(libs):
+ for path in ['/lib64', '/lib/64', '/lib', \
+ '/usr/lib64', '/usr/lib/64', '/usr/lib']:
+ if os.path.exists(os.path.join(path, lib)):
+ libs.remove(lib)
+ break
+ if len(libs) > 0:
+ unresolved.append((obj, tuple(libs)))
+ # END PREFIX LOCAL
if unresolved:
unresolved.sort()
diff --git a/lib/_emerge/actions.py b/lib/_emerge/actions.py
index 0ed90cd71..c210255d0 100644
--- a/lib/_emerge/actions.py
+++ b/lib/_emerge/actions.py
@@ -2910,10 +2910,10 @@ def getgccversion(chost=None):
gcc_ver_command = ["gcc", "-dumpversion"]
gcc_ver_prefix = "gcc-"
- clang_ver_command = ['clang', '--version']
- clang_ver_prefix = 'clang-'
+ clang_ver_command = ['clang', '--version']
+ clang_ver_prefix = 'clang-'
- ubinpath = os.path.join('/', portage.const.EPREFIX, 'usr', 'bin')
+ ubinpath = os.path.join('/', portage.const.EPREFIX, 'usr', 'bin')
gcc_not_found_error = red(
"!!! No gcc found. You probably need to 'source /etc/profile'\n"
@@ -2921,11 +2921,11 @@ def getgccversion(chost=None):
+ "!!! other terminals also.\n"
)
- def getclangversion(output):
- version = re.search('clang version ([0-9.]+) ', output)
- if version:
- return version.group(1)
- return "unknown"
+ def getclangversion(output):
+ version = re.search('clang version ([0-9.]+) ', output)
+ if version:
+ return version.group(1)
+ return "unknown"
if chost:
try:
@@ -2958,21 +2958,21 @@ def getgccversion(chost=None):
if mystatus == os.EX_OK:
return gcc_ver_prefix + myoutput
- try:
- proc = subprocess.Popen(
- [ubinpath + "/" + chost + "-" + clang_ver_command[0]]
- + clang_ver_command[1:],
- stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT,
- )
- except OSError:
- myoutput = None
- mystatus = 1
- else:
- myoutput = _unicode_decode(proc.communicate()[0]).rstrip("\n")
- mystatus = proc.wait()
- if mystatus == os.EX_OK:
- return clang_ver_prefix + getclangversion(myoutput)
+ try:
+ proc = subprocess.Popen(
+ [ubinpath + "/" + chost + "-" + clang_ver_command[0]]
+ + clang_ver_command[1:],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT,
+ )
+ except OSError:
+ myoutput = None
+ mystatus = 1
+ else:
+ myoutput = _unicode_decode(proc.communicate()[0]).rstrip("\n")
+ mystatus = proc.wait()
+ if mystatus == os.EX_OK:
+ return clang_ver_prefix + getclangversion(myoutput)
try:
proc = subprocess.Popen(
diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
index 61be9d02b..0e977a0a9 100644
--- a/lib/_emerge/depgraph.py
+++ b/lib/_emerge/depgraph.py
@@ -11857,15 +11857,15 @@ def _get_masking_status(pkg, pkgsettings, root_config, myrepo=None, use=None):
if not pkgsettings._accept_chost(pkg.cpv, pkg._metadata):
mreasons.append(_MaskReason("CHOST", "CHOST: %s" % pkg._metadata["CHOST"]))
- eprefix = pkgsettings["EPREFIX"]
- if len(eprefix.rstrip('/')) > 0 and pkg.built and not pkg.installed:
- if not "EPREFIX" in pkg._metadata:
- mreasons.append(_MaskReason("EPREFIX",
- "missing EPREFIX"))
- elif len(pkg._metadata["EPREFIX"].strip()) < len(eprefix):
- mreasons.append(_MaskReason("EPREFIX",
- "EPREFIX: '%s' too small" % \
- pkg._metadata["EPREFIX"]))
+ eprefix = pkgsettings["EPREFIX"]
+ if len(eprefix.rstrip('/')) > 0 and pkg.built and not pkg.installed:
+ if not "EPREFIX" in pkg._metadata:
+ mreasons.append(_MaskReason("EPREFIX",
+ "missing EPREFIX"))
+ elif len(pkg._metadata["EPREFIX"].strip()) < len(eprefix):
+ mreasons.append(_MaskReason("EPREFIX",
+ "EPREFIX: '%s' too small" % \
+ pkg._metadata["EPREFIX"]))
if pkg.invalid:
for msgs in pkg.invalid.values():
diff --git a/lib/_emerge/emergelog.py b/lib/_emerge/emergelog.py
index a891f5b54..c951d61b5 100644
--- a/lib/_emerge/emergelog.py
+++ b/lib/_emerge/emergelog.py
@@ -17,7 +17,6 @@ from portage.const import EPREFIX
# unless it's really called via emerge.
_disable = True
_emerge_log_dir = EPREFIX + '/var/log'
-_emerge_log_dir = "/var/log"
def emergelog(xterm_titles, mystr, short_msg=None):
diff --git a/lib/portage/__init__.py b/lib/portage/__init__.py
index b6b00a8c2..1e4c68b13 100644
--- a/lib/portage/__init__.py
+++ b/lib/portage/__init__.py
@@ -12,8 +12,8 @@ try:
import asyncio
import sys
import errno
- # PREFIX LOCAL
- import multiprocessing
+ # PREFIX LOCAL
+ import multiprocessing
if not hasattr(errno, "ESTALE"):
# ESTALE may not be defined on some systems, such as interix.
@@ -58,9 +58,9 @@ except ImportError as e:
# the latter causing issues because all kinds of things can't be
# pickled, so force fork mode for now
try:
- multiprocessing.set_start_method('fork')
+ multiprocessing.set_start_method('fork')
except RuntimeError:
- pass
+ pass
# END PREFIX LOCAL
try:
diff --git a/tarball.sh b/tarball.sh
index 9aaf7e50d..761e1e8af 100755
--- a/tarball.sh
+++ b/tarball.sh
@@ -28,7 +28,7 @@ fi
install -d -m0755 ${DEST}
rsync -a --exclude='.git' --exclude='.hg' --exclude="repoman/" . ${DEST}
-sed -i -e '/^VERSION\s*=/s/^.*$/VERSION = "'${V}-prefix'"/' \
+sed -i -e '/^VERSION\s*=/s/^.*$/VERSION = "'${V}_prefix'"/' \
${DEST}/lib/portage/__init__.py
sed -i -e "/version = /s/'[^']\+'/'${V}-prefix'/" ${DEST}/setup.py
sed -i -e "1s/VERSION/${V}-prefix/" ${DEST}/man/{,ru/}*.[15]
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-14 10:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-14 10:40 [gentoo-commits] proj/portage:prefix commit in: bin/, lib/portage/, lib/_emerge/, / Fabian Groffen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox