public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:master commit in: /, bin/
@ 2012-03-27 14:40 Zac Medico
  0 siblings, 0 replies; 19+ messages in thread
From: Zac Medico @ 2012-03-27 14:40 UTC (permalink / raw
  To: gentoo-commits

commit:     fa0e7faa26b93ca419e6165f30164ab9d6893c09
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 27 14:39:57 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Mar 27 14:39:57 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=fa0e7faa

emerge-webrsync: use portageq from same prefix

---
 Makefile            |    5 +++--
 bin/emerge-webrsync |   12 ++++++++++--
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 697198e..c49cc66 100644
--- a/Makefile
+++ b/Makefile
@@ -29,8 +29,9 @@ DIRMODE = 0755
 SYSCONFDIR_FILES = etc-update.conf dispatch-conf.conf
 PORTAGE_CONFDIR_FILES = make.globals
 LOGROTATE_FILES = elog-save-summary
-BINDIR_FILES = ebuild egencache emerge portageq quickpkg repoman
-SBINDIR_FILES = archive-conf dispatch-conf emaint emerge-webrsync \
+BINDIR_FILES = ebuild egencache emerge emerge-webrsync \
+	portageq quickpkg repoman
+SBINDIR_FILES = archive-conf dispatch-conf emaint \
 	env-update etc-update fixpackages regenworld
 DOCS = ChangeLog NEWS RELEASE-NOTES
 

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index e6749f2..2fbf2ed 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -27,11 +27,19 @@ wecho() { echo "${argv0}: warning: $*" 1>&2 ; }
 eecho() { echo "${argv0}: error: $*" 1>&2 ; }
 
 argv0=$0
-if ! type -P portageq > /dev/null ; then
+
+# Use portageq from the same directory/prefix as the current script, so
+# that we don't have to rely on PATH including the current EPREFIX.
+scriptpath=${BASH_SOURCE[0]}
+if [ -x "${scriptpath%/*}/portageq" ]; then
+	portageq=${scriptpath%/*}/portageq
+elif type -P portageq > /dev/null ; then
+	portageq=portageq
+else
 	eecho "could not find 'portageq'; aborting"
 	exit 1
 fi
-eval $(portageq envvar -v FEATURES FETCHCOMMAND GENTOO_MIRRORS \
+eval $(${portageq} envvar -v FEATURES FETCHCOMMAND GENTOO_MIRRORS \
 	PORTAGE_BIN_PATH PORTAGE_GPG_DIR \
 	PORTAGE_NICENESS PORTAGE_RSYNC_EXTRA_OPTS PORTAGE_TMPDIR PORTDIR \
 	SYNC http_proxy ftp_proxy)



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/
@ 2012-03-27 15:19 Zac Medico
  0 siblings, 0 replies; 19+ messages in thread
From: Zac Medico @ 2012-03-27 15:19 UTC (permalink / raw
  To: gentoo-commits

commit:     8c1ba902154aee09b1c240d5a7a541dcafb46e6c
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 27 14:39:57 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Mar 27 15:18:28 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=8c1ba902

emerge-webrsync: use portageq from same prefix

---
 Makefile            |    5 +++--
 bin/emerge-webrsync |   12 ++++++++++--
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 697198e..c49cc66 100644
--- a/Makefile
+++ b/Makefile
@@ -29,8 +29,9 @@ DIRMODE = 0755
 SYSCONFDIR_FILES = etc-update.conf dispatch-conf.conf
 PORTAGE_CONFDIR_FILES = make.globals
 LOGROTATE_FILES = elog-save-summary
-BINDIR_FILES = ebuild egencache emerge portageq quickpkg repoman
-SBINDIR_FILES = archive-conf dispatch-conf emaint emerge-webrsync \
+BINDIR_FILES = ebuild egencache emerge emerge-webrsync \
+	portageq quickpkg repoman
+SBINDIR_FILES = archive-conf dispatch-conf emaint \
 	env-update etc-update fixpackages regenworld
 DOCS = ChangeLog NEWS RELEASE-NOTES
 

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index e6749f2..bfd9aa2 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -27,11 +27,19 @@ wecho() { echo "${argv0}: warning: $*" 1>&2 ; }
 eecho() { echo "${argv0}: error: $*" 1>&2 ; }
 
 argv0=$0
-if ! type -P portageq > /dev/null ; then
+
+# Use portageq from the same directory/prefix as the current script, so
+# that we don't have to rely on PATH including the current EPREFIX.
+scriptpath=${BASH_SOURCE[0]}
+if [ -x "${scriptpath%/*}/portageq" ]; then
+	portageq=${scriptpath%/*}/portageq
+elif type -P portageq > /dev/null ; then
+	portageq=portageq
+else
 	eecho "could not find 'portageq'; aborting"
 	exit 1
 fi
-eval $(portageq envvar -v FEATURES FETCHCOMMAND GENTOO_MIRRORS \
+eval $("${portageq}" envvar -v FEATURES FETCHCOMMAND GENTOO_MIRRORS \
 	PORTAGE_BIN_PATH PORTAGE_GPG_DIR \
 	PORTAGE_NICENESS PORTAGE_RSYNC_EXTRA_OPTS PORTAGE_TMPDIR PORTDIR \
 	SYNC http_proxy ftp_proxy)



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/
@ 2014-08-12 21:55 Alexander Berntsen
  0 siblings, 0 replies; 19+ messages in thread
From: Alexander Berntsen @ 2014-08-12 21:55 UTC (permalink / raw
  To: gentoo-commits

commit:     b5aba660b59271a21f9a0104680cee3472e8eebd
Author:     Alexander Berntsen <bernalex <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 12 21:18:35 2014 +0000
Commit:     Alexander Berntsen <bernalex <AT> gentoo <DOT> org>
CommitDate: Tue Aug 12 21:54:31 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b5aba660

repoman: Disable DESCRIPTION.punctuation check

This reverts commits:
  06637c4215d55c57517739214c6e0fd6f8f53914
  repoman: Add DESCRIPTION.puntuation check (bug #438976)

  0a2dab393f2ecf0476262620aa2e9a68d1f88a95
  repoman: Add accidently deleted closing bracket ')'

  bbb34efebd0bfc0b231073d00b863b3e3ebd918a
  repoman: Do not report DESCRIPTION.punctuation warning for "etc.".

QA has requested these reverts, as they did not approve of this repoman
check.

Signed-off-by: Alexander Berntsen <bernalex <AT> gentoo.org>
Reviewed-by:   Brian Dolbec       <dolsen <AT> gentoo.org>

---
 RELEASE-NOTES |  5 +++++
 bin/repoman   | 12 ------------
 2 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 9b4cbb7..22770ef 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -1,6 +1,11 @@
 Release Notes; upgrade information mainly.
 Features/major bugfixes are listed in NEWS
 
+portage-2.2.13
+==================================
+* Bug Fixes:
+    - Bug # 438976 Remove DESCRIPTION.punctuation check from repoman
+
 portage-2.2.12
 ==================================
 * Bug Fixes:

diff --git a/bin/repoman b/bin/repoman
index bd9ad15..5a6ee5b 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -319,7 +319,6 @@ qahelp = {
 	"LICENSE.missing": "Ebuilds that have a missing or empty LICENSE variable",
 	"LICENSE.virtual": "Virtuals that have a non-empty LICENSE variable",
 	"DESCRIPTION.missing": "Ebuilds that have a missing or empty DESCRIPTION variable",
-	"DESCRIPTION.punctuation": "DESCRIPTION ends with a period character",
 	"DESCRIPTION.toolong": "DESCRIPTION is over %d characters" % max_desc_len,
 	"EAPI.definition": "EAPI definition does not conform to PMS section 7.3.1 (first non-comment, non-blank line)",
 	"EAPI.deprecated": "Ebuilds that use features that are deprecated in the current EAPI",
@@ -388,7 +387,6 @@ qawarnings = set((
 "dependency.badmaskedindev",
 "dependency.badtilde",
 "dependency.perlcore",
-"DESCRIPTION.punctuation",
 "DESCRIPTION.toolong",
 "EAPI.deprecated",
 "HOMEPAGE.virtual",
@@ -1895,16 +1893,6 @@ for x in effective_scanlist:
 					stats[myqakey] += 1
 					fails[myqakey].append(relative_path)
 
-		# Abbreviations usable at the end of sentence.
-		abbreviations = (
-			'etc.',
-		)
-		if myaux['DESCRIPTION'][-1:] == '.' and not myaux['DESCRIPTION'].split()[-1] in abbreviations:
-			stats['DESCRIPTION.punctuation'] += 1
-			fails['DESCRIPTION.punctuation'].append(
-				"%s: DESCRIPTION ends with a '%s' character"
-				% (relative_path, myaux['DESCRIPTION'][-1:]))
-
 		# 14 is the length of DESCRIPTION=""
 		if len(myaux['DESCRIPTION']) > max_desc_len:
 			stats['DESCRIPTION.toolong'] += 1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/
@ 2014-08-19  7:01 Michał Górny
  0 siblings, 0 replies; 19+ messages in thread
From: Michał Górny @ 2014-08-19  7:01 UTC (permalink / raw
  To: gentoo-commits

commit:     b5aba660b59271a21f9a0104680cee3472e8eebd
Author:     Alexander Berntsen <bernalex <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 12 21:18:35 2014 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Aug 12 21:54:31 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b5aba660

repoman: Disable DESCRIPTION.punctuation check

This reverts commits:
  06637c4215d55c57517739214c6e0fd6f8f53914
  repoman: Add DESCRIPTION.puntuation check (bug #438976)

  0a2dab393f2ecf0476262620aa2e9a68d1f88a95
  repoman: Add accidently deleted closing bracket ')'

  bbb34efebd0bfc0b231073d00b863b3e3ebd918a
  repoman: Do not report DESCRIPTION.punctuation warning for "etc.".

QA has requested these reverts, as they did not approve of this repoman
check.

Signed-off-by: Alexander Berntsen <bernalex <AT> gentoo.org>
Reviewed-by:   Brian Dolbec       <dolsen <AT> gentoo.org>

---
 RELEASE-NOTES |  5 +++++
 bin/repoman   | 12 ------------
 2 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 9b4cbb7..22770ef 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -1,6 +1,11 @@
 Release Notes; upgrade information mainly.
 Features/major bugfixes are listed in NEWS
 
+portage-2.2.13
+==================================
+* Bug Fixes:
+    - Bug # 438976 Remove DESCRIPTION.punctuation check from repoman
+
 portage-2.2.12
 ==================================
 * Bug Fixes:

diff --git a/bin/repoman b/bin/repoman
index bd9ad15..5a6ee5b 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -319,7 +319,6 @@ qahelp = {
 	"LICENSE.missing": "Ebuilds that have a missing or empty LICENSE variable",
 	"LICENSE.virtual": "Virtuals that have a non-empty LICENSE variable",
 	"DESCRIPTION.missing": "Ebuilds that have a missing or empty DESCRIPTION variable",
-	"DESCRIPTION.punctuation": "DESCRIPTION ends with a period character",
 	"DESCRIPTION.toolong": "DESCRIPTION is over %d characters" % max_desc_len,
 	"EAPI.definition": "EAPI definition does not conform to PMS section 7.3.1 (first non-comment, non-blank line)",
 	"EAPI.deprecated": "Ebuilds that use features that are deprecated in the current EAPI",
@@ -388,7 +387,6 @@ qawarnings = set((
 "dependency.badmaskedindev",
 "dependency.badtilde",
 "dependency.perlcore",
-"DESCRIPTION.punctuation",
 "DESCRIPTION.toolong",
 "EAPI.deprecated",
 "HOMEPAGE.virtual",
@@ -1895,16 +1893,6 @@ for x in effective_scanlist:
 					stats[myqakey] += 1
 					fails[myqakey].append(relative_path)
 
-		# Abbreviations usable at the end of sentence.
-		abbreviations = (
-			'etc.',
-		)
-		if myaux['DESCRIPTION'][-1:] == '.' and not myaux['DESCRIPTION'].split()[-1] in abbreviations:
-			stats['DESCRIPTION.punctuation'] += 1
-			fails['DESCRIPTION.punctuation'].append(
-				"%s: DESCRIPTION ends with a '%s' character"
-				% (relative_path, myaux['DESCRIPTION'][-1:]))
-
 		# 14 is the length of DESCRIPTION=""
 		if len(myaux['DESCRIPTION']) > max_desc_len:
 			stats['DESCRIPTION.toolong'] += 1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/
@ 2017-09-02 21:37 Michał Górny
  0 siblings, 0 replies; 19+ messages in thread
From: Michał Górny @ 2017-09-02 21:37 UTC (permalink / raw
  To: gentoo-commits

commit:     232a45d02e526ac4bdb4c5806432ff4b58d8cdc7
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  2 17:40:17 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Sep  2 21:37:44 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=232a45d0

Do not enable optimizations by default to work-around pycparser issue

dev-python/pycparser-2.18+ exposes a design flaw in dev-python/ply that
makes it unable to work with -OO code. Given that Gentoo compiles its
Python packages with -OO and both -O and -OO use the same files for
Python < 3.5, using -O in Portage implicitly means -OO for those
implementations.

Remove the optimizations from Portage shebangs to prevent triggering the
issue until we find a proper solution for it.

Bug: https://bugs.gentoo.org/628386
Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>

 bin/clean_locks   | 2 +-
 bin/dispatch-conf | 2 +-
 bin/ebuild        | 2 +-
 bin/emaint        | 2 +-
 bin/env-update    | 2 +-
 bin/portageq      | 2 +-
 tabcheck.py       | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/bin/clean_locks b/bin/clean_locks
index 13af06197..fb245972f 100755
--- a/bin/clean_locks
+++ b/bin/clean_locks
@@ -1,4 +1,4 @@
-#!/usr/bin/python -bO
+#!/usr/bin/python -b
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 

diff --git a/bin/dispatch-conf b/bin/dispatch-conf
index 099c37f57..49e7774bf 100755
--- a/bin/dispatch-conf
+++ b/bin/dispatch-conf
@@ -1,4 +1,4 @@
-#!/usr/bin/python -bO
+#!/usr/bin/python -b
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 

diff --git a/bin/ebuild b/bin/ebuild
index 7930b41dd..bda746f78 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -1,4 +1,4 @@
-#!/usr/bin/python -bO
+#!/usr/bin/python -b
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 

diff --git a/bin/emaint b/bin/emaint
index a634c0ead..08e75851a 100755
--- a/bin/emaint
+++ b/bin/emaint
@@ -1,4 +1,4 @@
-#!/usr/bin/python -bO
+#!/usr/bin/python -b
 # Copyright 2005-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 

diff --git a/bin/env-update b/bin/env-update
index c43459bd7..03fc5849f 100755
--- a/bin/env-update
+++ b/bin/env-update
@@ -1,4 +1,4 @@
-#!/usr/bin/python -bO
+#!/usr/bin/python -b
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 

diff --git a/bin/portageq b/bin/portageq
index 06c8e0e57..0ac124fde 100755
--- a/bin/portageq
+++ b/bin/portageq
@@ -1,4 +1,4 @@
-#!/usr/bin/python -bO
+#!/usr/bin/python -b
 # Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 

diff --git a/tabcheck.py b/tabcheck.py
index 2d45cdead..a28ad93d9 100755
--- a/tabcheck.py
+++ b/tabcheck.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python -bO
+#!/usr/bin/python -b
 
 import tabnanny,sys
 


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/
@ 2020-08-01  1:57 Zac Medico
  0 siblings, 0 replies; 19+ messages in thread
From: Zac Medico @ 2020-08-01  1:57 UTC (permalink / raw
  To: gentoo-commits

commit:     a7777b9ce26be2f95cef697f7de35c6c198ffc6a
Author:     Aaron Bauman <bman <AT> gentoo <DOT> org>
AuthorDate: Sat Aug  1 01:33:05 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Aug  1 01:56:29 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=a7777b9c

Fix R0205 across all of repo.

Do not need to inherit object in py3.

All tests passed.

Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 bin/chpathtool.py    |  2 +-
 bin/doins.py         | 10 +++++-----
 bin/ebuild-ipc.py    |  2 +-
 bin/egencache        |  8 ++++----
 bin/portageq         |  2 +-
 bin/socks5-server.py |  2 +-
 runtests             |  2 +-
 7 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/bin/chpathtool.py b/bin/chpathtool.py
index c036046ae..120c1c93d 100755
--- a/bin/chpathtool.py
+++ b/bin/chpathtool.py
@@ -27,7 +27,7 @@ else:
 		# magic module seems to be broken
 		magic = None
 
-class IsTextFile(object):
+class IsTextFile:
 
 	def __init__(self):
 		if magic is not None:

diff --git a/bin/doins.py b/bin/doins.py
index a08e3f8c9..4929cb90a 100644
--- a/bin/doins.py
+++ b/bin/doins.py
@@ -150,7 +150,7 @@ def _set_timestamps(source_stat, dest):
 	os.utime(dest, ns=(source_stat.st_atime_ns, source_stat.st_mtime_ns))
 
 
-class _InsInProcessInstallRunner(object):
+class _InsInProcessInstallRunner:
 	"""Implements `install` command behavior running in a process."""
 
 	def __init__(self, opts, parsed_options):
@@ -257,7 +257,7 @@ class _InsInProcessInstallRunner(object):
 		return False
 
 
-class _InsSubprocessInstallRunner(object):
+class _InsSubprocessInstallRunner:
 	"""Runs `install` command in a subprocess to install a file."""
 
 	def __init__(self, split_options):
@@ -283,7 +283,7 @@ class _InsSubprocessInstallRunner(object):
 		return subprocess.call(command) == 0
 
 
-class _DirInProcessInstallRunner(object):
+class _DirInProcessInstallRunner:
 	"""Implements `install` command behavior running in a process."""
 
 	def __init__(self, parsed_options):
@@ -309,7 +309,7 @@ class _DirInProcessInstallRunner(object):
 		_set_attributes(self._parsed_options, dest)
 
 
-class _DirSubprocessInstallRunner(object):
+class _DirSubprocessInstallRunner:
 	"""Runs `install` command to create a directory."""
 
 	def __init__(self, split_options):
@@ -331,7 +331,7 @@ class _DirSubprocessInstallRunner(object):
 		subprocess.check_call(command)
 
 
-class _InstallRunner(object):
+class _InstallRunner:
 	"""Handles `install` command operation.
 
 	Runs operations which `install` command should work. If possible,

diff --git a/bin/ebuild-ipc.py b/bin/ebuild-ipc.py
index d68d3f05e..be4a320ce 100755
--- a/bin/ebuild-ipc.py
+++ b/bin/ebuild-ipc.py
@@ -100,7 +100,7 @@ class FifoWriter(AbstractPollTask):
 			os.close(self._fd)
 			self._fd = None
 
-class EbuildIpc(object):
+class EbuildIpc:
 
 	# Timeout for each individual communication attempt (we retry
 	# as long as the daemon process appears to be alive).

diff --git a/bin/egencache b/bin/egencache
index 199d212ee..e3d7cbfc3 100755
--- a/bin/egencache
+++ b/bin/egencache
@@ -238,7 +238,7 @@ def parse_args(args):
 
 	return parser, options, args
 
-class GenCache(object):
+class GenCache:
 	def __init__(self, portdb, cp_iter=None, max_jobs=None, max_load=None,
 		rsync=False):
 		# The caller must set portdb.porttrees in order to constrain
@@ -447,7 +447,7 @@ class GenCache(object):
 		if hasattr(trg_cache, '_prune_empty_dirs'):
 			trg_cache._prune_empty_dirs()
 
-class GenPkgDescIndex(object):
+class GenPkgDescIndex:
 	def __init__(self, portdb, output_file):
 		self.returncode = os.EX_OK
 		self._portdb = portdb
@@ -470,7 +470,7 @@ class GenPkgDescIndex(object):
 
 		f.close()
 
-class GenUseLocalDesc(object):
+class GenUseLocalDesc:
 	def __init__(self, portdb, output=None,
 			preserve_comments=False):
 		self.returncode = os.EX_OK
@@ -665,7 +665,7 @@ class GenUseLocalDesc(object):
 		os.utime(desc_path, (mtime, mtime))
 
 
-class GenChangeLogs(object):
+class GenChangeLogs:
 	def __init__(self, portdb, changelog_output, changelog_reversed,
 		max_jobs=None, max_load=None):
 		self.returncode = os.EX_OK

diff --git a/bin/portageq b/bin/portageq
index f8fc236d1..9fe5d68c1 100755
--- a/bin/portageq
+++ b/bin/portageq
@@ -1020,7 +1020,7 @@ docstrings['list_preserved_libs'] = """<eroot>
 list_preserved_libs.__doc__ = docstrings['list_preserved_libs']
 
 
-class MaintainerEmailMatcher(object):
+class MaintainerEmailMatcher:
 	def __init__(self, maintainer_emails):
 		self._re = re.compile("^(%s)$" % "|".join(maintainer_emails), re.I)
 

diff --git a/bin/socks5-server.py b/bin/socks5-server.py
index 1d07c98ed..8a1a4d1be 100644
--- a/bin/socks5-server.py
+++ b/bin/socks5-server.py
@@ -24,7 +24,7 @@ except AttributeError:
 	current_task = asyncio.Task.current_task
 
 
-class Socks5Server(object):
+class Socks5Server:
 	"""
 	An asynchronous SOCKSv5 server.
 	"""

diff --git a/runtests b/runtests
index ca59e0074..8cbd9620f 100755
--- a/runtests
+++ b/runtests
@@ -36,7 +36,7 @@ PYTHON_NICE_VERSIONS = [
 EPREFIX = os.environ.get('PORTAGE_OVERRIDE_EPREFIX', '/')
 
 
-class Colors(object):
+class Colors:
 	"""Simple object holding color constants."""
 
 	_COLORS_YES = ('y', 'yes', 'true')


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/
@ 2022-07-18 20:42 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2022-07-18 20:42 UTC (permalink / raw
  To: gentoo-commits

commit:     158ff662921150011fdd9929e8e7d5f4be946a5d
Author:     Sheng Yu <syu.os <AT> protonmail <DOT> com>
AuthorDate: Sun Jul 17 23:00:14 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jul 18 20:41:57 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=158ff662

quickpkg: Fix incorrect BINPKG_COMPRESS_FLAGS split.

Bug: https://bugs.gentoo.org/857933
Signed-off-by: Sheng Yu <syu.os <AT> protonmail.com>
Closes: https://github.com/gentoo/portage/pull/857
Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS         | 2 ++
 bin/quickpkg | 5 +----
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/NEWS b/NEWS
index 129416f50..634531453 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,8 @@ Bug fixes:
   started to show on every emerge, but is harmless and left over
   from many years ago). Bug #858407.
 
+* quickpkg: Fix quoting/splitting of BINPKG_COMPRESS_FLAGS arguments. Bug #857933.
+
 * estrip: fix double prefix (regression from "don't call estrip twice" fix
   in 3.0.31). Bug #858818.
 

diff --git a/bin/quickpkg b/bin/quickpkg
index b4ad43376..773c1c07e 100755
--- a/bin/quickpkg
+++ b/bin/quickpkg
@@ -167,10 +167,7 @@ def quickpkg_atom(options, infos, arg, eout):
                         % (binpkg_compression, missing_package)
                     )
                     return 1
-                cmd = [
-                    varexpand(x, mydict=settings)
-                    for x in shlex_split(compression["compress"])
-                ]
+                cmd = shlex_split(varexpand(compression["compress"], mydict=settings))
                 # Filter empty elements that make Popen fail
                 cmd = [x for x in cmd if x != ""]
                 with open(binpkg_tmpfile, "wb") as fobj:


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/
@ 2022-08-19 17:59 Mike Gilbert
  0 siblings, 0 replies; 19+ messages in thread
From: Mike Gilbert @ 2022-08-19 17:59 UTC (permalink / raw
  To: gentoo-commits

commit:     0275734583c28a5a9e9e5c07a2724269efe5d1a5
Author:     Philipp Rösner <philipp.roesner <AT> student <DOT> uni-halle <DOT> de>
AuthorDate: Fri Aug 19 15:46:03 2022 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Aug 19 17:31:17 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=02757345

bin/ecompress: add lz4 command line options

Calling lz4 with mutliple files results in warnings of the form:

`Warning : <path>/<file> won't be used !
Do you want multiple input files (-m) ?`

Adding the `-m` option to the lz4 call resolves this issue.
Additionally, the `--rm` option will remove the source files after a
successful compression.

Bug: https://bugs.gentoo.org/672916
Closes: https://github.com/gentoo/portage/pull/892
Signed-off-by: Philipp Rösner <rndxelement <AT> protonmail.com>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 NEWS          | 3 +++
 bin/ecompress | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/NEWS b/NEWS
index 6245c9e09..87799bc4f 100644
--- a/NEWS
+++ b/NEWS
@@ -75,6 +75,9 @@ Bug fixes:
 * emerge(1): mention --with-bdeps=n behavior for both --usepkg (-k) and
   --usepkgonly (-K) (bug #863422).
 
+* ecompress: add option to lz4 in order to be able to compress multiple
+  files at once (bug #672916).
+
 portage-3.0.34 (2022-07-20)
 --------------
 

diff --git a/bin/ecompress b/bin/ecompress
index 0aa5091dd..c69e8d6dd 100755
--- a/bin/ecompress
+++ b/bin/ecompress
@@ -124,6 +124,10 @@ fi
 if [[ ${PORTAGE_COMPRESS_FLAGS+set} != "set" ]] ; then
 	case ${PORTAGE_COMPRESS} in
 		bzip2|gzip)  PORTAGE_COMPRESS_FLAGS="-9";;
+		# Without setting '-m' lz4 will not compress multiple files at once.
+		# See: https://bugs.gentoo.org/672916
+		# Setting '--rm' will remove the source files after a successful compression.
+		lz4)  PORTAGE_COMPRESS_FLAGS="-m --rm";;
 	esac
 fi
 


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/
@ 2022-09-29 20:45 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2022-09-29 20:45 UTC (permalink / raw
  To: gentoo-commits

commit:     40d634fe925bda6b3c95067cb7d23f2bce32ce36
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 29 06:37:19 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Sep 29 20:45:40 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=40d634fe

bin: isolated-functions.sh: make ___makeopts_jobs return CPUs as default, not 1

Both Portage and pkgcore interpret no MAKEOPTS as "-jN" where N is the number
of available CPUs but we weren't doing this on the bash side in ___makeopts_jobs.

Switch it to use nproc for consistency (it's also, really, the behaviour
we're expecting).

Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS                      | 3 +++
 bin/isolated-functions.sh | 9 ++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 21296d5ff..31927c819 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,9 @@ Bug fixes:
 
 * data: Fix PORTAGE_USERNAME default (bug #873088).
 
+* bin: isolated-functions.sh: return number of CPUs in ___makeopts_jobs as default
+  instead of 1 to match Portage's behavior on the Python side.
+
 * bin: ecompress: zstd: Recognize .zst as a compressed file suffix for the purposes
   of the internal compressed file collision check.
 

diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index 0efcd5a7d..882789132 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -475,7 +475,14 @@ ___makeopts_jobs() {
 	# since POSIX doesn't specify a non-greedy match (i.e. ".*?").
 	local jobs=$(echo " ${MAKEOPTS} " | sed -r -n \
 		-e 's:.*[[:space:]](-[a-z]*j|--jobs[=[:space:]])[[:space:]]*([0-9]+).*:\2:p' || die)
-	echo ${jobs:-1}
+
+	# Fallbacks for if MAKEOPTS parsing failed
+	[[ -n ${jobs} ]] || \
+		jobs=$(getconf _NPROCESSORS_ONLN 2>/dev/null) || \
+		jobs=$(sysctl -n hw.ncpu 2>/dev/null) || \
+		jobs=1
+
+	echo ${jobs}
 }
 
 # Run ${XARGS} in parallel for detected number of CPUs, if supported.


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/
@ 2022-09-29 20:45 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2022-09-29 20:45 UTC (permalink / raw
  To: gentoo-commits

commit:     9ae3ec1af0071354db3bf57bc5cdec963b056e77
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 29 06:37:19 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Sep 29 20:45:39 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=9ae3ec1a

bin: ecompress: xz: set -9, pass -j from MAKEOPTS for parallel compression

- Pass -9 like we do for bzip2 & gzip.
- Pass -j from MAKEOPTS for parallel compression.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS          | 5 +++++
 bin/ecompress | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 8586e35cd..8ed871e5d 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,11 @@ Features:
   checking for dependencies. Update @goland-rebuild accordingly which now
   includes all packages depending on dev-lang/go (bug #827974, bug #865115)
 
+* bin: ecompress: xz: Pass -9 to xz for compression level like we do for bzip2 & gzip.
+
+* bin: ecompress: xz: Pass -T N where N is the number of jobs from ${MAKEOPTS}
+  to xz for parallel compression.
+
 Bug fixes:
 * emerge: Scheduler: Fix filenames for binpkgs in some cases - reuse existing
   filename and don't allocate a new one (bug #872392).

diff --git a/bin/ecompress b/bin/ecompress
index c69e8d6dd..57c518705 100755
--- a/bin/ecompress
+++ b/bin/ecompress
@@ -1,5 +1,5 @@
 #!/usr/bin/env bash
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
@@ -128,6 +128,7 @@ if [[ ${PORTAGE_COMPRESS_FLAGS+set} != "set" ]] ; then
 		# See: https://bugs.gentoo.org/672916
 		# Setting '--rm' will remove the source files after a successful compression.
 		lz4)  PORTAGE_COMPRESS_FLAGS="-m --rm";;
+		xz)   PORTAGE_COMPRESS_FLAGS="-9 -T$(__makeopts_jobs)";;
 	esac
 fi
 


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/
@ 2022-09-29 20:45 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2022-09-29 20:45 UTC (permalink / raw
  To: gentoo-commits

commit:     21c5d50a8e19be846e286ed06136822f89f4c4c2
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 29 06:37:19 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Sep 29 20:45:39 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=21c5d50a

bin: ecompress: zstd: add .zst to internal compression collision check

Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS          | 3 +++
 bin/ecompress | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 67cb6a795..dced9688a 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,9 @@ Bug fixes:
 
 * data: Fix PORTAGE_USERNAME default (bug #873088).
 
+* bin: ecompress: zstd: Recognize .zst as a compressed file suffix for the purposes
+  of the internal compressed file collision check.
+
 portage-3.0.37 (2022-09-23)
 --------------
 

diff --git a/bin/ecompress b/bin/ecompress
index a77bb7e35..7fb2b9c00 100755
--- a/bin/ecompress
+++ b/bin/ecompress
@@ -71,9 +71,9 @@ while [[ $# -gt 0 ]] ; do
 				# note: to save time, we need to do this only if there's
 				# at least one compressed file
 				case ${path} in
-					*.Z|*.gz|*.bz2|*.lzma|*.xz)
+					*.Z|*.gz|*.bz2|*.lzma|*.xz|*.zst)
 						vpath=${path%.*}
-						for comp in '' .Z .gz .bz2 .lzma .xz; do
+						for comp in '' .Z .gz .bz2 .lzma .xz .zst; do
 							if [[ ${vpath}${comp} != ${path} && \
 									-e ${vpath}${comp} ]]; then
 								collisions[${path}]=1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/
@ 2022-09-29 20:45 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2022-09-29 20:45 UTC (permalink / raw
  To: gentoo-commits

commit:     36fb8446ad50f878e63a855a12341d73277305ab
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 29 06:37:19 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Sep 29 20:45:40 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=36fb8446

bin: ecompress: lz4: add .lz4 to internal compression collision check

Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS          | 3 +++
 bin/ecompress | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 6ca656008..21296d5ff 100644
--- a/NEWS
+++ b/NEWS
@@ -32,6 +32,9 @@ Bug fixes:
 * bin: ecompress: zstd: Recognize .zst as a compressed file suffix for the purposes
   of the internal compressed file collision check.
 
+* bin: ecompress: lz4: Recognize .lz4 as a compressed file suffix for the purposes
+  of the internal compressed file collision check.
+
 * bin: ecompress: zstd: Set '-q --rm' in PORTAGE_COMPRESS_FLAGS to behave
   like other compressors.
 

diff --git a/bin/ecompress b/bin/ecompress
index 96a83e4b4..6d47059da 100755
--- a/bin/ecompress
+++ b/bin/ecompress
@@ -71,9 +71,9 @@ while [[ $# -gt 0 ]] ; do
 				# note: to save time, we need to do this only if there's
 				# at least one compressed file
 				case ${path} in
-					*.Z|*.gz|*.bz2|*.lzma|*.xz|*.zst)
+					*.Z|*.gz|*.bz2|*.lzma|.lz4|*.xz|*.zst)
 						vpath=${path%.*}
-						for comp in '' .Z .gz .bz2 .lzma .xz .zst; do
+						for comp in '' .Z .gz .bz2 .lzma .lz4 .xz .zst; do
 							if [[ ${vpath}${comp} != ${path} && \
 									-e ${vpath}${comp} ]]; then
 								collisions[${path}]=1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/
@ 2022-09-29 20:45 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2022-09-29 20:45 UTC (permalink / raw
  To: gentoo-commits

commit:     636dd15437eccfaf63e76c36412999b5e118c209
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 29 20:44:31 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Sep 29 20:45:40 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=636dd154

bin: ecompress: add .lz and .lzo for internal collision check too

Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS          | 3 +++
 bin/ecompress | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 31927c819..64095d920 100644
--- a/NEWS
+++ b/NEWS
@@ -38,6 +38,9 @@ Bug fixes:
 * bin: ecompress: lz4: Recognize .lz4 as a compressed file suffix for the purposes
   of the internal compressed file collision check.
 
+* bin: compress: Recognize .lzo and .lz for the internal compressed file
+  collision check too.
+
 * bin: ecompress: zstd: Set '-q --rm' in PORTAGE_COMPRESS_FLAGS to behave
   like other compressors.
 

diff --git a/bin/ecompress b/bin/ecompress
index 6d47059da..3e4b77a45 100755
--- a/bin/ecompress
+++ b/bin/ecompress
@@ -71,9 +71,9 @@ while [[ $# -gt 0 ]] ; do
 				# note: to save time, we need to do this only if there's
 				# at least one compressed file
 				case ${path} in
-					*.Z|*.gz|*.bz2|*.lzma|.lz4|*.xz|*.zst)
+					*.Z|*.gz|*.bz2|*.lzma|.lz|.lzo|.lz4|*.xz|*.zst)
 						vpath=${path%.*}
-						for comp in '' .Z .gz .bz2 .lzma .lz4 .xz .zst; do
+						for comp in '' .Z .gz .bz2 .lzma .lz .lzo .lz4 .xz .zst; do
 							if [[ ${vpath}${comp} != ${path} && \
 									-e ${vpath}${comp} ]]; then
 								collisions[${path}]=1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/
@ 2022-12-05  4:04 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2022-12-05  4:04 UTC (permalink / raw
  To: gentoo-commits

commit:     2294cb62b65431df06ded745ded8fcfb6a4d5865
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sun Dec  4 11:14:34 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Dec  5 04:04:02 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=2294cb62

bin/etc-update: Apply patsub_replacement defences

Per bug #881383, string replacing forms of parameter expansion must take care
to quote - or appropriately escape - any nested parameter expansions, assuming
that their values are intended to be taken literally (as is almost invariably
the case). This has long been the case, but the introduction of the new
patsub_replacement option in bash >=5.2 has brought the issue to the fore.

This commit addresses two instances in which the etc-update script could
unintentionally induce patsub replacement. There are many other quality issues
that affect this script but this is enough to address the aforementioned bug.

Bug: https://bugs.gentoo.org/881383
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS           | 3 ++-
 bin/etc-update | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index f986616a2..2144156fd 100644
--- a/NEWS
+++ b/NEWS
@@ -5,7 +5,8 @@ Features:
 * TODO
 
 Bug fixes:
-* TODO
+* etc-update: Apply defences for patsub_replacement being default on in Bash 5.2.
+  bug #881383.
 
 portage-3.0.41 (2022-11-04)
 --------------

diff --git a/bin/etc-update b/bin/etc-update
index a7d1088da..59e709168 100755
--- a/bin/etc-update
+++ b/bin/etc-update
@@ -90,8 +90,8 @@ cmd_var_is_valid() {
 }
 
 diff_command() {
-	local cmd=${diff_command//%file1/$1}
-	${cmd//%file2/$2}
+	local cmd=${diff_command//%file1/"$1"}
+	${cmd//%file2/"$2"}
 }
 
 # Usage: do_mv_ln [options] <src> <dst>


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/
@ 2023-05-01  7:21 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2023-05-01  7:21 UTC (permalink / raw
  To: gentoo-commits

commit:     526bda2cd1ed30465c15b86658f9ecbdf8e6cdeb
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 30 05:20:00 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May  1 07:20:57 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=526bda2c

emerge-webrsync: switch Portage-caller case to gemato

This changes the common case where Portage calls emerge-webrsync
for repos configured w/ sync-type='webrsync' to use gemato rather
than legacy manual gpg invocations.

Bug: https://bugs.gentoo.org/905358
Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS                |  6 ++----
 bin/emerge-webrsync | 11 ++++++-----
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/NEWS b/NEWS
index f0b500471..36ffee0c9 100644
--- a/NEWS
+++ b/NEWS
@@ -3,10 +3,8 @@ portage-3.0.48 (UNRELEASED)
 Bug fixes:
 * fowners, fperms: Fix handling of relative pathnames (bug #905223).
 
-* emerge-webrsync: Be less alarmist when a user is syncing with Portage
-  (not calling emerge-webrsync directly) with sync-type='webrsync'. We
-  were emitting a misleading warning about the validation method in use
-  which might in fact encourage people to use the older method.
+* emerge-webrsync: Switch Portage to use gemato for when it shells out
+  to emerge-webrsync for repositories configured with sync-type=webrsync.
 
 Cleanups:
 * Convert printf-style %-formats into fstrings.

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 4686d7b5f..4546f510c 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -129,11 +129,12 @@ handle_pgp_setup() {
 			die "Do not call ${argv0##*/} directly, instead call emerge --sync or emaint sync."
 		fi
 
-		WEBRSYNC_VERIFY_SIGNATURE=2
-	elif [[ ${webrsync_gpg} -eq 1 ]] then
+		# Use gemato for the standard Portage-calling-us case w/ sync-type='webrsync'.
+		WEBRSYNC_VERIFY_SIGNATURE=1
+	elif [[ ${webrsync_gpg} -eq 1 ]]; then
 		# We only warn if FEATURES="webrsync-gpg" is in make.conf, not if
-		# Portage is calling us for 'type=webrsync' with verification.
-		# TODO: Change the Portage path to fully use gemato and unify the lot.
+		# Portage is calling us for 'sync-type=webrsync' with verification, because
+		# that path uses gemato now (plus the user can't help it, obviously).
 		ewarn "FEATURES=webrsync-gpg is deprecated, see the make.conf(5) man page."
 		WEBRSYNC_VERIFY_SIGNATURE=2
 	elif [[ -n ${no_pgp_verify} ]]; then
@@ -152,7 +153,7 @@ handle_pgp_setup() {
 			[[ ${PORTAGE_QUIET} -eq 1 ]] || einfo "PGP verification method: gemato"
 			;;
 		2)
-			[[ ${PORTAGE_QUIET} -eq 1 ]] || ewarn "PGP verification method: legacy gpg path"
+			ewarn "PGP verification method: legacy gpg path"
 			;;
 		*)
 			die "Unknown WEBRSYNC_VERIFY_SIGNATURE state: \${WEBRSYNC_VERIFY_SIGNATURE}=${WEBRSYNC_VERIFY_SIGNATURE}"


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/
@ 2023-05-17  6:20 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2023-05-17  6:20 UTC (permalink / raw
  To: gentoo-commits

commit:     b444a4baa113dcf9f779fa68b056b8ac5e9ea5ea
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed May 17 06:12:32 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed May 17 06:20:12 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=b444a4ba

emerge-webrsync: fall back correctly to manual gpg if no gemato

Bug: https://bugs.gentoo.org/905868
Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS                | 3 +++
 bin/emerge-webrsync | 9 +++++++++
 2 files changed, 12 insertions(+)

diff --git a/NEWS b/NEWS
index 505fde7c6..baf1140f8 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,9 @@ Bug fixes:
   both of them now use the same main path for PGP verification (i.e.
   gemato).
 
+* emerge-webrsync: Fall back correctly to manual gpg (rather than aborting
+  entirely) if gemato is not installed (bug #905868).
+
 Cleanups:
 * Convert printf-style %-formats into fstrings.
 

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index b953624d4..e707f8b9b 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -302,6 +302,8 @@ check_file_signature_gemato() {
 			# a keyring problem).
 			die "signature verification failed"
 		fi
+	else
+		return 127
 	fi
 
 	return "${r}"
@@ -346,6 +348,13 @@ check_file_signature() {
 			1)
 				check_file_signature_gemato "${signature}" "${file}"
 				r=$?
+
+				if [[ ${r} -eq 127 ]] ; then
+					ewarn "Falling back to gpg as gemato is not installed"
+					check_file_signature_gpg_unwrapped "${signature}" "${file}"
+					r=$?
+				fi
+
 				;;
 			2)
 				check_file_signature_gpg_unwrapped "${signature}" "${file}"


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/
@ 2023-12-04  6:45 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2023-12-04  6:45 UTC (permalink / raw
  To: gentoo-commits

commit:     632fea4f4aa4bdca63bf6d8db266b09a6954e313
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  2 22:53:49 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Dec  4 06:45:45 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=632fea4f

Set SYSROOT for has/best_version so that they work when IPC is disabled

This issue broke cross-compiling.

Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
Closes: https://github.com/gentoo/portage/pull/1198
Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS                 |  7 +++++++
 bin/phase-helpers.sh | 10 +++++++---
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index ce9ed282b5..5561c7fe40 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,13 @@ Release notes take the form of the following optional categories:
 * Bug fixes
 * Cleanups
 
+portage-3.0.57 (UNRELEASED)
+--------------
+
+Bug fixes:
+* Set SYSROOT appropriately for best_version and has_version so that they work
+  when cross-compiling and IPC is disabled.
+
 portage-3.0.56 (2023-12-01)
 --------------
 

diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index ec634e536d..45a1639c42 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -907,7 +907,11 @@ __eapi8_src_prepare() {
 
 ___best_version_and_has_version_common() {
 	local atom root root_arg
-	local -a cmd=()
+
+	# If ROOT is set to / below then SYSROOT cannot point elsewhere. Even if
+	# ROOT is untouched, setting SYSROOT=/ for this command will always work.
+	local -a cmd=(env SYSROOT=/)
+
 	case $1 in
 		--host-root|-r|-d|-b)
 			root_arg=$1
@@ -932,7 +936,7 @@ ___best_version_and_has_version_common() {
 				# Since portageq requires the root argument be consistent
 				# with EPREFIX, ensure consistency here (bug #655414).
 				root=/${PORTAGE_OVERRIDE_EPREFIX#/}
-				cmd+=(env EPREFIX="${PORTAGE_OVERRIDE_EPREFIX}")
+				cmd+=(EPREFIX="${PORTAGE_OVERRIDE_EPREFIX}")
 			else
 				root=/
 			fi ;;
@@ -948,7 +952,7 @@ ___best_version_and_has_version_common() {
 						# Use /${PORTAGE_OVERRIDE_EPREFIX#/} to support older
 						# EAPIs, as it is equivalent to BROOT.
 						root=/${PORTAGE_OVERRIDE_EPREFIX#/}
-						cmd+=(env EPREFIX="${PORTAGE_OVERRIDE_EPREFIX}")
+						cmd+=(EPREFIX="${PORTAGE_OVERRIDE_EPREFIX}")
 						;;
 				esac
 			else


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/
@ 2023-12-27 21:18 Ulrich Müller
  0 siblings, 0 replies; 19+ messages in thread
From: Ulrich Müller @ 2023-12-27 21:18 UTC (permalink / raw
  To: gentoo-commits

commit:     cb788dd9acf9f48a9c4934920ebadaa942fe0682
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 24 10:54:27 2023 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Dec 27 15:09:32 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=cb788dd9

ebuild.sh: Warn about colon-separated argument in sandbox functions

According to PMS and the Devmanual, only a single item is allowed
as argument for addread, addwrite, adddeny and addpredict:
https://projects.gentoo.org/pms/8/pms.html#x1-12300012.3.3
https://devmanual.gentoo.org/function-reference/sandbox-functions/

The previous usage message (contrary to Devmanual policy) had been
added in commit 0c6454261c514f021a4ddce2415a68773027ed6a.

Bug: https://bugs.gentoo.org/920654
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 NEWS          | 4 ++++
 bin/ebuild.sh | 8 ++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index e1e47d0a2e..40fdfd9ea2 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,10 @@ Features:
 * emerge: depclean now returns with failure if no packages are matched
   (bug #917120)
 
+Bug fixes:
+* addread, addwrite, adddeny, addpredict: Warn about passing a colon-separated
+  list of paths as argument (bug #920654).
+
 portage-3.0.58 (2023-12-14)
 --------------
 

diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index dc8d205f9a..c9f7c04e28 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -162,7 +162,10 @@ fi
 __sb_append_var() {
 	local _v=$1 ; shift
 	local var="SANDBOX_${_v}"
-	[[ -z $1 || -n $2 ]] && die "Usage: add$(LC_ALL=C tr "[:upper:]" "[:lower:]" <<< "${_v}") <colon-delimited list of paths>"
+	[[ $# -eq 1 ]] || die "Usage: add${_v,,} <path>"
+	# Make this fatal after 2024-12-31
+	[[ ${1} == *:* ]] \
+		&& eqawarn "QA Notice: add${_v,,} called with colon-separated argument"
 	export ${var}="${!var:+${!var}:}$1"
 }
 # bash-4 version:
@@ -173,8 +176,9 @@ addwrite()   { __sb_append_var WRITE   "$@" ; }
 adddeny()    { __sb_append_var DENY    "$@" ; }
 addpredict() { __sb_append_var PREDICT "$@" ; }
 
+addread /
+addread "${PORTAGE_TMPDIR}/portage"
 addwrite "${PORTAGE_TMPDIR}/portage"
-addread "/:${PORTAGE_TMPDIR}/portage"
 [[ -n ${PORTAGE_GPG_DIR} ]] && addpredict "${PORTAGE_GPG_DIR}"
 
 # Avoid sandbox violations in temporary directories.


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [gentoo-commits] proj/portage:master commit in: /, bin/
@ 2024-06-13  2:34 Sam James
  0 siblings, 0 replies; 19+ messages in thread
From: Sam James @ 2024-06-13  2:34 UTC (permalink / raw
  To: gentoo-commits

commit:     19e750b6880c1ffba55c4d309fbf33d5e746ee33
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 13 02:20:27 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jun 13 02:23:38 2024 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=19e750b6

bin/ebuild.sh: disable globskipdots too in Bash 5.2

See 69cac73ba0a7bcf2e2cff88c60d389895a550623.

globskipdots is a new option in bash-5.2 that is also default-on
in that release. The default value is not gated by BASH_COMPAT (see bug #907061),
hence we need to disable it for older Bashes to avoid behaviour changes in ebuilds
and eclasses.

Bug: https://bugs.gentoo.org/907061
Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS          | 6 ++++++
 bin/ebuild.sh | 8 ++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/NEWS b/NEWS
index 5aa485d264..b4b378e7a0 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,12 @@ Features:
   as well as / for all EAPIs rather than instead of / for EAPI 6 and below
   (bug #435066).
 
+Bug fixes:
+* ebuild: Handle Bash 5.2's change in behavior which enables the shopt
+  'globskipdots' by default. This is needed to avoid breaking existing
+  working ebuilds. Future EAPIs will need to adjust the logic
+  added by this change. See bug #907061.
+
 portage-3.0.65 (2024-06-04)
 --------------
 

diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index c9f7c04e28..8b1e0861a8 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -18,7 +18,7 @@ source "${PORTAGE_BIN_PATH}/isolated-functions.sh" || exit 1
 # used instead.
 __check_bash_version() {
 	# Figure out which min version of bash we require.
-	# Adjust patsub_replacement logic below on new EAPI!
+	# Adjust patsub_replacement/globskipdots logic below on new EAPI!
 	local maj min
 	if ___eapi_bash_3_2 ; then
 		maj=3 min=2
@@ -52,16 +52,16 @@ __check_bash_version() {
 		shopt -s compat32
 	fi
 
-	# patsub_replacement is a new option in bash-5.2 that is also default-on
+	# patsub_replacement and globskipdots are new options in bash-5.2 that are also default-on
 	# in that release. The default value is not gated by BASH_COMPAT (see bug #881383),
 	# hence we need to disable it for older Bashes to avoid behaviour changes in ebuilds
 	# and eclasses.
 	#
 	# New EAPI note: a newer EAPI (after 8) may well adopt Bash 5.2 as its minimum version.
 	# If it does, this logic will need to be adjusted to only disable patsub_replacement
-	# for < ${new_api}!
+	# and globskipdots for < ${new_api}!
 	if (( BASH_VERSINFO[0] >= 6 || ( BASH_VERSINFO[0] == 5 && BASH_VERSINFO[1] >= 2 ) )) ; then
-		shopt -u patsub_replacement
+		shopt -u patsub_replacement globskipdots
 	fi
 
 }


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2024-06-13  2:34 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-27 21:18 [gentoo-commits] proj/portage:master commit in: /, bin/ Ulrich Müller
  -- strict thread matches above, loose matches on Subject: below --
2024-06-13  2:34 Sam James
2023-12-04  6:45 Sam James
2023-05-17  6:20 Sam James
2023-05-01  7:21 Sam James
2022-12-05  4:04 Sam James
2022-09-29 20:45 Sam James
2022-09-29 20:45 Sam James
2022-09-29 20:45 Sam James
2022-09-29 20:45 Sam James
2022-09-29 20:45 Sam James
2022-08-19 17:59 Mike Gilbert
2022-07-18 20:42 Sam James
2020-08-01  1:57 Zac Medico
2017-09-02 21:37 Michał Górny
2014-08-19  7:01 Michał Górny
2014-08-12 21:55 Alexander Berntsen
2012-03-27 15:19 Zac Medico
2012-03-27 14:40 Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox