public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/, /, bin/
@ 2022-10-18  3:40 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2022-10-18  3:40 UTC (permalink / raw
  To: gentoo-commits

commit:     c81e799a3bc8de79ade7c5e2610ed305581c73cc
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 18 03:16:02 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct 18 03:40:07 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=c81e799a

info: drop .lz4/.lzo for info, use sorted list

Use same ordering of suffixes as we do elsewhere for easy comparison.

(I threw in .lz4 & .lzo last-minute earlier but on reflection, it's
misleading to put it here if it's not supported yet by texinfo.)

Fixes: 800e09a4a1a630548ea8316e5c906c6f48af3105
Bug: https://bugs.gentoo.org/757525
Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS                        | 2 +-
 bin/ebuild-helpers/prepinfo | 2 +-
 bin/misc-functions.sh       | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index 780684966..3e2a5a2d6 100644
--- a/NEWS
+++ b/NEWS
@@ -19,7 +19,7 @@ Features:
   * -Wodr
 
 * ecompress, etc: Support additional compression suffixes for texinfo:
-  .xz, .lz, .lz4, .zst, .lzma (bug #757525).
+  .Z, .bz2, .lzma, .lz, .xz, .zst (bug #757525).
 
 Bug fixes:
 * Manifest: Fix Manifest.addFile() calls and add tests (bug #875860).

diff --git a/bin/ebuild-helpers/prepinfo b/bin/ebuild-helpers/prepinfo
index 4d200d0d3..14fa38226 100755
--- a/bin/ebuild-helpers/prepinfo
+++ b/bin/ebuild-helpers/prepinfo
@@ -32,7 +32,7 @@ find "${ED%/}/${infodir#/}" -type d -print0 | while read -r -d $'\0' x ; do
 		[[ -e ${f} ]] && continue 2
 	done
 
-	rm -f "${x}"/dir{,.info}{,.gz,.bz2,.xz,.lz,.zst,.lzma,.lz4}
+	rm -f "${x}"/dir{,.info}{,.Z,.gz,.bz2,.lzma,.lz,.xz,.zst}
 done
 
 exit 0

diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 2fa61cf37..fc2a36fb3 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -253,7 +253,7 @@ install_qa_check() {
 	fi
 
 	# Portage regenerates this on the installed system.
-	rm -f "${ED%/}"/usr/share/info/dir{,.gz,.bz2,.xz,.lz,.zst,.lzma,.lz4} || die "rm failed!"
+	rm -f "${ED%/}"/usr/share/info/dir{,.Z,.gz,.bz2,.lzma,.lz,.xz,.zst} || die "rm failed!"
 }
 
 __dyn_instprep() {


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/, /, bin/
@ 2023-05-13 20:29 Ulrich Müller
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Müller @ 2023-05-13 20:29 UTC (permalink / raw
  To: gentoo-commits

commit:     4bc369c549c34a757c799e3f6df1214cd1da12ef
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat May 13 10:35:50 2023 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat May 13 20:13:25 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=4bc369c5

portageq-wrapper: New wrapper script

Move the internal portageq wrapper script out of the ebuild-helpers
directory. Call the new script from best_version and has_version in
the case when IPC is disabled.

The goal is to ban portageq from the ebuild environment after some
transition time.

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

 NEWS                                              |  4 ++++
 bin/ebuild-helpers/portageq                       | 24 +----------------------
 bin/phase-helpers.sh                              |  2 +-
 bin/{ebuild-helpers/portageq => portageq-wrapper} | 19 ++++--------------
 4 files changed, 10 insertions(+), 39 deletions(-)

diff --git a/NEWS b/NEWS
index 6d039c84f..e282d3f3c 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,10 @@ Breaking changes:
 * Output deprecation warnings for portageq, prepstrip and prepallstrip
   when they are called from an ebuild (bug #906129, bug #906156).
 
+Cleanups:
+* Move the internal portageq wrapper script out of the ebuild-helpers
+  directory.
+
 portage-3.0.48 (UNRELEASED)
 --------------
 Bug fixes:

diff --git a/bin/ebuild-helpers/portageq b/bin/ebuild-helpers/portageq
index 0df0cd273..e3926e11a 100755
--- a/bin/ebuild-helpers/portageq
+++ b/bin/ebuild-helpers/portageq
@@ -2,29 +2,7 @@
 # Copyright 2009-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-scriptpath=${BASH_SOURCE[0]}
-scriptname=${scriptpath##*/}
-
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
 
 eqawarn "QA Notice: '${0##*/}' is not allowed in ebuild scope"
-
-# Use safe cwd, avoiding unsafe import for bug #469338.
-cd "${PORTAGE_PYM_PATH}" || exit 1
-
-IFS=':'
-set -f # in case ${PATH} contains any shell glob characters
-
-for path in ${PATH}; do
-	[[ -x ${path}/${scriptname} ]] || continue
-	[[ ${path} == */portage/*/ebuild-helpers* ]] && continue
-	[[ ${path}/${scriptname} -ef ${scriptpath} ]] && continue
-
-	PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
-		exec "${PORTAGE_PYTHON:-/usr/bin/python}" \
-			"${path}/${scriptname}" "$@"
-done
-
-unset IFS
-echo "${scriptname}: command not found" 1>&2
-exit 127
+exec "${PORTAGE_BIN_PATH}"/portageq-wrapper "$@"

diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index af96b73e4..f1b762b0a 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -963,7 +963,7 @@ ___best_version_and_has_version_common() {
 	if [[ -n ${PORTAGE_IPC_DAEMON} ]] ; then
 		cmd+=("${PORTAGE_BIN_PATH}"/ebuild-ipc "${FUNCNAME[1]}" "${root}" "${atom}")
 	else
-		cmd+=("${PORTAGE_BIN_PATH}"/ebuild-helpers/portageq "${FUNCNAME[1]}" "${root}" "${atom}")
+		cmd+=("${PORTAGE_BIN_PATH}"/portageq-wrapper "${FUNCNAME[1]}" "${root}" "${atom}")
 	fi
 
 	"${cmd[@]}"

diff --git a/bin/ebuild-helpers/portageq b/bin/portageq-wrapper
similarity index 50%
copy from bin/ebuild-helpers/portageq
copy to bin/portageq-wrapper
index 0df0cd273..2ca4052c4 100755
--- a/bin/ebuild-helpers/portageq
+++ b/bin/portageq-wrapper
@@ -2,29 +2,18 @@
 # Copyright 2009-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-scriptpath=${BASH_SOURCE[0]}
-scriptname=${scriptpath##*/}
-
-source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
-
-eqawarn "QA Notice: '${0##*/}' is not allowed in ebuild scope"
-
 # Use safe cwd, avoiding unsafe import for bug #469338.
 cd "${PORTAGE_PYM_PATH}" || exit 1
 
-IFS=':'
+IFS=":"
 set -f # in case ${PATH} contains any shell glob characters
 
 for path in ${PATH}; do
-	[[ -x ${path}/${scriptname} ]] || continue
 	[[ ${path} == */portage/*/ebuild-helpers* ]] && continue
-	[[ ${path}/${scriptname} -ef ${scriptpath} ]] && continue
-
+	[[ -x ${path}/portageq ]] || continue
 	PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
-		exec "${PORTAGE_PYTHON:-/usr/bin/python}" \
-			"${path}/${scriptname}" "$@"
+		exec "${PORTAGE_PYTHON:-/usr/bin/python}" "${path}/portageq" "$@"
 done
 
-unset IFS
-echo "${scriptname}: command not found" 1>&2
+echo "portageq: command not found" >&2
 exit 127


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

end of thread, other threads:[~2023-05-13 20:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-13 20:29 [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/, /, bin/ Ulrich Müller
  -- strict thread matches above, loose matches on Subject: below --
2022-10-18  3:40 Sam James

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