public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-02-25 20:11 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2011-02-25 20:11 UTC (permalink / raw
  To: gentoo-commits

commit:     6271cfe43dcf0cb42d4c2c0b772a7be17be78d2f
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 25 20:11:34 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Feb 25 20:11:34 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=6271cfe4

doins: avoid die when called as dodoc with no arg

---
 bin/ebuild-helpers/doins |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/bin/ebuild-helpers/doins b/bin/ebuild-helpers/doins
index 8055a37..c549791 100755
--- a/bin/ebuild-helpers/doins
+++ b/bin/ebuild-helpers/doins
@@ -4,6 +4,17 @@
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
+if [[ ${0##*/} == dodoc ]] ; then
+	if [ $# -eq 0 ] ; then
+		# default_src_install may call dodoc with no arguments
+		# when DOC is defined but empty, so simply return
+		# sucessfully in this case.
+		exit 0
+	fi
+	export INSOPTIONS=-m0644
+	export INSDESTTREE=usr/share/doc/${PF}/${_E_DOCDESTTREE_}
+fi
+
 if [ $# -lt 1 ] ; then
 	helpers_die "${0##*/}: at least one argument needed"
 	exit 1
@@ -16,17 +27,6 @@ else
 	DOINSRECUR=n
 fi
 
-if [[ ${0##*/} == dodoc ]] ; then
-	if [ $# -eq 0 ] ; then
-		# default_src_install may call dodoc with no arguments
-		# when DOC is defined but empty, so simply return
-		# sucessfully in this case.
-		exit 0
-	fi
-	export INSOPTIONS=-m0644
-	export INSDESTTREE=usr/share/doc/${PF}/${_E_DOCDESTTREE_}
-fi
-
 if [[ ${INSDESTTREE#${D}} != "${INSDESTTREE}" ]]; then
 	vecho "-------------------------------------------------------" 1>&2
 	vecho "You should not use \${D} with helpers." 1>&2



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-02-25 20:33 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2011-02-25 20:33 UTC (permalink / raw
  To: gentoo-commits

commit:     15e251fdae81c43e78443587f0eb19b0ca158bd3
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 25 20:32:21 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Feb 25 20:32:21 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=15e251fd

doins: fix dodoc directory error handling

---
 bin/ebuild-helpers/doins |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/bin/ebuild-helpers/doins b/bin/ebuild-helpers/doins
index c549791..0aedcb9 100755
--- a/bin/ebuild-helpers/doins
+++ b/bin/ebuild-helpers/doins
@@ -89,6 +89,10 @@ for x in "$@" ; do
 	if [[ $PRESERVE_SYMLINKS = n && -d $x ]] || \
 		[[ $PRESERVE_SYMLINKS = y && -d $x && ! -L $x ]] ; then
 		if [ "${DOINSRECUR}" == "n" ] ; then
+			if [[ ${0##*/} == dodoc ]] ; then
+				echo "!!! ${0##*/}: $x is a directory" 1>&2
+				((failed|=1))
+			fi
 			continue
 		fi
 



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-03-02  4:53 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2011-03-02  4:53 UTC (permalink / raw
  To: gentoo-commits

commit:     37f44e5dd11f5ec524578377198e6f736093d282
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  2 04:52:28 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Mar  2 04:52:28 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=37f44e5d

dodoc: update copyright date

---
 bin/ebuild-helpers/dodoc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/dodoc b/bin/ebuild-helpers/dodoc
index 67391a8..65713db 100755
--- a/bin/ebuild-helpers/dodoc
+++ b/bin/ebuild-helpers/dodoc
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-04-11 23:29 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2011-04-11 23:29 UTC (permalink / raw
  To: gentoo-commits

commit:     2e334d77e3d1836ab6ba5dfc1700e90f9599d4d3
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 11 23:23:54 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Apr 11 23:23:54 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2e334d77

doins: dereference abs symlinks to files

Our fake $DISTDIR contains symlinks that should not be reproduced
inside $D. In order to ensure that things like dodoc
"$DISTDIR"/foo.pdf work as expected, we dereference symlinked files
that are referenced by absolute paths. Thanks to James Cloos
<cloos <AT> jhcloos.com> for reporting this issue which he observed with
the sci-mathematics/minisat ebuild.

---
 bin/ebuild-helpers/doins |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/doins b/bin/ebuild-helpers/doins
index 0aedcb9..3daa9a0 100755
--- a/bin/ebuild-helpers/doins
+++ b/bin/ebuild-helpers/doins
@@ -55,7 +55,13 @@ _doins() {
 	local mysrc="$1" mydir="$2" cleanup="" rval
 
 	if [ -L "$mysrc" ] ; then
-		if [ $PRESERVE_SYMLINKS = y ] ; then
+		# Our fake $DISTDIR contains symlinks that should
+		# not be reproduced inside $D. In order to ensure
+		# that things like dodoc "$DISTDIR"/foo.pdf work
+		# as expected, we dereference symlinked files that
+		# are referenced by absolute paths.
+		if [ $PRESERVE_SYMLINKS = y ] && \
+			! [[ -f "$mysrc" && $(readlink "$mysrc") == /* ]] ; then
 			rm -rf "$D$INSDESTTREE/$mydir/${mysrc##*/}" || return $?
 			cp -P "$mysrc" "$D$INSDESTTREE/$mydir/${mysrc##*/}"
 			return $?



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-05-04 16:41 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2011-05-04 16:41 UTC (permalink / raw
  To: gentoo-commits

commit:     fbd402cd32ab8dad37ac28cd63f8700e8f811a3d
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed May  4 16:36:29 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed May  4 16:36:29 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=fbd402cd

doins: add reference to bug #239529

The reasoning for the code from commit
55b3150af635a418ba3f1424132359c894db7ec4 is not really obvious, so
it's helpful to reference the corresponding bug report.

---
 bin/ebuild-helpers/doins |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/doins b/bin/ebuild-helpers/doins
index bcef311..7dec146 100755
--- a/bin/ebuild-helpers/doins
+++ b/bin/ebuild-helpers/doins
@@ -114,7 +114,10 @@ for x in "$@" ; do
 		x=${x##*/}
 		x_orig=$x
 		# Follow any symlinks recursively until we've got
-		# a normal directory for 'find' to traverse.
+		# a normal directory for 'find' to traverse. The
+		# name of the symlink will be used for the name
+		# of the installed directory, as discussed in
+		# bug #239529.
 		while [ -L "$x" ] ; do
 			pushd "$(readlink "$x")" >/dev/null
 			x=${PWD##*/}



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-06-30  8:07 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2011-06-30  8:07 UTC (permalink / raw
  To: gentoo-commits

commit:     a4336dd925767f1a78d7d046110fd7462f676d8d
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 30 08:03:44 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jun 30 08:03:44 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a4336dd9

ecompress: beware of -k in PORTAGE_COMPRESS_FLAGS

This will fix bug #372183.

---
 bin/ebuild-helpers/ecompress |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/ecompress b/bin/ebuild-helpers/ecompress
index de81b44..9ff1c56 100755
--- a/bin/ebuild-helpers/ecompress
+++ b/bin/ebuild-helpers/ecompress
@@ -80,7 +80,10 @@ case $1 in
 			# if it cannot actually compress the file
 			echo {0..1000} > compressme
 			${PORTAGE_COMPRESS} ${PORTAGE_COMPRESS_FLAGS} compressme > /dev/null
-			suffix=$(ls compressme*)
+			# If PORTAGE_COMPRESS_FLAGS contains -k then we need to avoid
+			# having our glob match the uncompressed file here.
+			suffix=$(echo compressme.*)
+			[[ -z $suffix ]] && suffix=$(echo compressme*)
 			suffix=${suffix#compressme}
 			cd /
 			rm -rf "${tmpdir}"



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-06-30  8:18 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2011-06-30  8:18 UTC (permalink / raw
  To: gentoo-commits

commit:     815f134f43e801b66fa8856f2b6aefe96786e0fc
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 30 08:17:38 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jun 30 08:17:38 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=815f134f

Fix last commit to work regardless of nullglob.

---
 bin/ebuild-helpers/ecompress |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/ecompress b/bin/ebuild-helpers/ecompress
index 9ff1c56..b61421b 100755
--- a/bin/ebuild-helpers/ecompress
+++ b/bin/ebuild-helpers/ecompress
@@ -83,7 +83,8 @@ case $1 in
 			# If PORTAGE_COMPRESS_FLAGS contains -k then we need to avoid
 			# having our glob match the uncompressed file here.
 			suffix=$(echo compressme.*)
-			[[ -z $suffix ]] && suffix=$(echo compressme*)
+			[[ -z $suffix || "$suffix" == "compressme.*" ]] && \
+				suffix=$(echo compressme*)
 			suffix=${suffix#compressme}
 			cd /
 			rm -rf "${tmpdir}"



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-08-22 16:06 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2011-08-22 16:06 UTC (permalink / raw
  To: gentoo-commits

commit:     05b3e2b245630505fa5f581fbdf0531d00cb0b93
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 22 16:06:13 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Aug 22 16:06:13 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=05b3e2b2

dosym: QA warn if basename omitted (bug #379899)

---
 bin/ebuild-helpers/dosym |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/bin/ebuild-helpers/dosym b/bin/ebuild-helpers/dosym
index 500dad0..3bec2b8 100755
--- a/bin/ebuild-helpers/dosym
+++ b/bin/ebuild-helpers/dosym
@@ -9,6 +9,11 @@ if [[ $# -ne 2 ]] ; then
 	exit 1
 fi
 
+if [[ ${2} == */ ]] ; then
+	# implicit basename not allowed by PMS (bug #379899)
+	eqawarn "QA Notice: dosym target omits basename: '${2}'"
+fi
+
 destdir=${2%/*}
 [[ ! -d ${D}${destdir} ]] && dodir "${destdir}"
 



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-08-22 17:35 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2011-08-22 17:35 UTC (permalink / raw
  To: gentoo-commits

commit:     3534aa843f22e84f5dd79a8306605d5178ec76c3
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 22 17:35:44 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Aug 22 17:35:44 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3534aa84

dosym: QA warn if target is existing dir

---
 bin/ebuild-helpers/dosym |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/dosym b/bin/ebuild-helpers/dosym
index 3bec2b8..7dd4c6d 100755
--- a/bin/ebuild-helpers/dosym
+++ b/bin/ebuild-helpers/dosym
@@ -9,7 +9,8 @@ if [[ $# -ne 2 ]] ; then
 	exit 1
 fi
 
-if [[ ${2} == */ ]] ; then
+if [[ ${2} == */ ]] || \
+	[[ -d ${D}${2} && ! -L ${D}${2} ]] ; then
 	# implicit basename not allowed by PMS (bug #379899)
 	eqawarn "QA Notice: dosym target omits basename: '${2}'"
 fi



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-10-10  2:29 Mike Frysinger
  0 siblings, 0 replies; 114+ messages in thread
From: Mike Frysinger @ 2011-10-10  2:29 UTC (permalink / raw
  To: gentoo-commits

commit:     8ebca724748c0c2046e3120b0f5a813fc4298671
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  9 18:43:11 2011 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Oct 10 02:27:58 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=8ebca724

prepstrip: optimize chmod slightly

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

---
 bin/ebuild-helpers/prepstrip |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index d25259d..5f0fe18 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -73,9 +73,9 @@ save_elf_debug() {
 		eval $inode=\$x
 		${OBJCOPY} --only-keep-debug "${x}" "${y}"
 		${OBJCOPY} --add-gnu-debuglink="${y}" "${x}"
-		[[ -g ${x} ]] && chmod go-r "${y}"
-		[[ -u ${x} ]] && chmod go-r "${y}"
-		chmod a-x,o-w "${y}"
+		local args="a-x,o-w"
+		[[ -g ${x} || -u ${x} ]] && args+=",go-r"
+		chmod ${args} "${y}"
 	fi
 
 	if [[ -n ${buildid} ]] ; then



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-10-10  2:29 Mike Frysinger
  0 siblings, 0 replies; 114+ messages in thread
From: Mike Frysinger @ 2011-10-10  2:29 UTC (permalink / raw
  To: gentoo-commits

commit:     2e6fa11b074d67ebeb799210256d4716d6655a97
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  9 22:53:53 2011 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Oct 10 02:27:58 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2e6fa11b

prepstrip: merge debugedit checks

Avoid checking for debugedit multiple times.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

---
 bin/ebuild-helpers/prepstrip |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 5f0fe18..5167ef3 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -25,11 +25,6 @@ export SAFE_STRIP_FLAGS="--strip-unneeded"
 export PORTAGE_STRIP_FLAGS=${PORTAGE_STRIP_FLAGS-${SAFE_STRIP_FLAGS} -R .comment}
 prepstrip_sources_dir=/usr/src/debug/${CATEGORY}/${PF}
 
-if has installsources ${FEATURES} && ! type -P debugedit >/dev/null ; then
-	ewarn "FEATURES=installsources is enabled but the debugedit binary could not"
-	ewarn "be found. This feature will not work unless debugedit is installed!"
-fi
-
 unset ${!INODE_*}
 
 inode_var_name() {
@@ -43,7 +38,11 @@ inode_var_name() {
 save_elf_sources() {
 	has installsources ${FEATURES} || return 0
 	has installsources ${RESTRICT} && return 0
-	type -P debugedit >/dev/null || return 0
+	if ! type -P debugedit >/dev/null ; then
+		ewarn "FEATURES=installsources is enabled but the debugedit binary could not"
+		ewarn "be found. This feature will not work unless debugedit is installed!"
+		return 0
+	fi
 
 	local x=$1
 	local inode=$(inode_var_name "$x")



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-10-10  2:29 Mike Frysinger
  0 siblings, 0 replies; 114+ messages in thread
From: Mike Frysinger @ 2011-10-10  2:29 UTC (permalink / raw
  To: gentoo-commits

commit:     286675a500998e536dbbf2ee2dfe1fedf4290b38
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 10 02:27:35 2011 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Oct 10 02:27:58 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=286675a5

prepstrip: optimize duplicate calls to `has`

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

---
 bin/ebuild-helpers/prepstrip |   35 +++++++++++++++++++++++------------
 1 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 5167ef3..e22f417 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -4,14 +4,26 @@
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
+# avoid multiple calls to `has`.  this creates things like:
+#   FEATURES_foo=false
+# if "foo" is not in $FEATURES
+tf() { "$@" && echo true || echo false ; }
+exp_tf() {
+	local flag var=$1
+	shift
+	for flag in "$@" ; do
+		eval ${var}_${flag}=$(tf has ${flag} ${!var})
+	done
+}
+exp_tf FEATURES installsources nostrip splitdebug
+exp_tf RESTRICT binchecks installsources strip
+
 banner=false
 SKIP_STRIP=false
-if has nostrip ${FEATURES} || \
-   has strip ${RESTRICT}
-then
+if ${RESTRICT_strip} || ${FEATURES_nostrip} ; then
 	SKIP_STRIP=true
 	banner=true
-	has installsources ${FEATURES} || exit 0
+	${FEATURES_installsources} || exit 0
 fi
 
 STRIP=${STRIP:-${CHOST}-strip}
@@ -36,8 +48,8 @@ inode_var_name() {
 }
 
 save_elf_sources() {
-	has installsources ${FEATURES} || return 0
-	has installsources ${RESTRICT} && return 0
+	${FEATURES_installsources} || return 0
+	${RESTRICT_installsources} && return 0
 	if ! type -P debugedit >/dev/null ; then
 		ewarn "FEATURES=installsources is enabled but the debugedit binary could not"
 		ewarn "be found. This feature will not work unless debugedit is installed!"
@@ -52,7 +64,7 @@ save_elf_sources() {
 }
 
 save_elf_debug() {
-	has splitdebug ${FEATURES} || return 0
+	${FEATURES_splitdebug} || return 0
 
 	local x=$1
 	local y="${D}usr/lib/debug/${x:${#D}}.debug"
@@ -89,8 +101,7 @@ save_elf_debug() {
 # The existance of the section .symtab tells us that a binary is stripped.
 # We want to log already stripped binaries, as this may be a QA violation.
 # They prevent us from getting the splitdebug data.
-if ! has binchecks ${RESTRICT} && \
-	! has strip ${RESTRICT} ; then
+if ! ${RESTRICT_binchecks} && ! ${RESTRICT_strip} ; then
 	log=$T/scanelf-already-stripped.log
 	qa_var="QA_PRESTRIPPED_${ARCH/-/_}"
 	[[ -n ${!qa_var} ]] && QA_PRESTRIPPED="${!qa_var}"
@@ -172,9 +183,9 @@ do
 done
 
 if [[ -s ${T}/debug.sources ]] && \
-        has installsources ${FEATURES} && \
-        ! has installsources ${RESTRICT} && \
-        type -P debugedit >/dev/null
+   ${FEATURES_installsources} && \
+   ! ${RESTRICT_installsources} && \
+   type -P debugedit >/dev/null
 then
 	vecho "installsources: rsyncing source files"
 	[[ -d ${D}${prepstrip_sources_dir} ]] || mkdir -p "${D}${prepstrip_sources_dir}"



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-10-10  6:04 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2011-10-10  6:04 UTC (permalink / raw
  To: gentoo-commits

commit:     13a759213ec1fefe5e637e5467fe9d5f35d8f570
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 10 06:04:33 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Oct 10 06:04:33 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=13a75921

prepstrip: merge debugedit checks more

Use a ${debugedit_found} to remember if it's found or not, and use
${debugedit_warned} to avoid showing duplicate warnings.

---
 bin/ebuild-helpers/prepstrip |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index e22f417..bd51843 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -36,6 +36,9 @@ type -P -- ${OBJCOPY} > /dev/null || OBJCOPY=objcopy
 export SAFE_STRIP_FLAGS="--strip-unneeded"
 export PORTAGE_STRIP_FLAGS=${PORTAGE_STRIP_FLAGS-${SAFE_STRIP_FLAGS} -R .comment}
 prepstrip_sources_dir=/usr/src/debug/${CATEGORY}/${PF}
+type -P debugedit >/dev/null
+debugedit_found=$?
+debugedit_warned=
 
 unset ${!INODE_*}
 
@@ -50,9 +53,12 @@ inode_var_name() {
 save_elf_sources() {
 	${FEATURES_installsources} || return 0
 	${RESTRICT_installsources} && return 0
-	if ! type -P debugedit >/dev/null ; then
-		ewarn "FEATURES=installsources is enabled but the debugedit binary could not"
-		ewarn "be found. This feature will not work unless debugedit is installed!"
+	if [ ${debugedit_found} -ne 0 ] ; then
+		if [ -z ${debugedit_warned} ] ; then
+			debugedit_warned=1
+			ewarn "FEATURES=installsources is enabled but the debugedit binary could not"
+			ewarn "be found. This feature will not work unless debugedit is installed!"
+		fi
 		return 0
 	fi
 
@@ -73,7 +79,7 @@ save_elf_debug() {
 	[[ ${x} == *".debug" ]] && return 0
 
 	# this will recompute the build-id, but for now that's ok
-	local buildid="$( type -P debugedit >/dev/null && debugedit -i "${x}" )"
+	local buildid="$( [ ${debugedit_found} -eq 0 ] && debugedit -i "${x}" )"
 
 	mkdir -p $(dirname "${y}")
 
@@ -185,7 +191,7 @@ done
 if [[ -s ${T}/debug.sources ]] && \
    ${FEATURES_installsources} && \
    ! ${RESTRICT_installsources} && \
-   type -P debugedit >/dev/null
+   [ ${debugedit_found} -eq 0 ]
 then
 	vecho "installsources: rsyncing source files"
 	[[ -d ${D}${prepstrip_sources_dir} ]] || mkdir -p "${D}${prepstrip_sources_dir}"



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-10-10  6:27 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2011-10-10  6:27 UTC (permalink / raw
  To: gentoo-commits

commit:     aeced1ac893951aec4992b2a1af7a4d057d6ce24
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 10 06:27:16 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Oct 10 06:27:16 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=aeced1ac

prepstrip: tweak style of debugedit checks

Make the checks more like the FEATURES/RESTRICT checks from commit
286675a500998e536dbbf2ee2dfe1fedf4290b38.

---
 bin/ebuild-helpers/prepstrip |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index bd51843..68b2133 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -36,9 +36,9 @@ type -P -- ${OBJCOPY} > /dev/null || OBJCOPY=objcopy
 export SAFE_STRIP_FLAGS="--strip-unneeded"
 export PORTAGE_STRIP_FLAGS=${PORTAGE_STRIP_FLAGS-${SAFE_STRIP_FLAGS} -R .comment}
 prepstrip_sources_dir=/usr/src/debug/${CATEGORY}/${PF}
-type -P debugedit >/dev/null
-debugedit_found=$?
-debugedit_warned=
+
+type -P debugedit >/dev/null && debugedit_found=true || debugedit_found=false
+debugedit_warned=false
 
 unset ${!INODE_*}
 
@@ -53,9 +53,9 @@ inode_var_name() {
 save_elf_sources() {
 	${FEATURES_installsources} || return 0
 	${RESTRICT_installsources} && return 0
-	if [ ${debugedit_found} -ne 0 ] ; then
-		if [ -z ${debugedit_warned} ] ; then
-			debugedit_warned=1
+	if ! ${debugedit_found} ; then
+		if ! ${debugedit_warned} ; then
+			debugedit_warned=true
 			ewarn "FEATURES=installsources is enabled but the debugedit binary could not"
 			ewarn "be found. This feature will not work unless debugedit is installed!"
 		fi
@@ -79,7 +79,7 @@ save_elf_debug() {
 	[[ ${x} == *".debug" ]] && return 0
 
 	# this will recompute the build-id, but for now that's ok
-	local buildid="$( [ ${debugedit_found} -eq 0 ] && debugedit -i "${x}" )"
+	local buildid="$( ${debugedit_found} && debugedit -i "${x}" )"
 
 	mkdir -p $(dirname "${y}")
 
@@ -191,7 +191,7 @@ done
 if [[ -s ${T}/debug.sources ]] && \
    ${FEATURES_installsources} && \
    ! ${RESTRICT_installsources} && \
-   [ ${debugedit_found} -eq 0 ]
+   ${debugedit_found}
 then
 	vecho "installsources: rsyncing source files"
 	[[ -d ${D}${prepstrip_sources_dir} ]] || mkdir -p "${D}${prepstrip_sources_dir}"



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-10-11  2:28 Mike Frysinger
  0 siblings, 0 replies; 114+ messages in thread
From: Mike Frysinger @ 2011-10-11  2:28 UTC (permalink / raw
  To: gentoo-commits

commit:     12dc5c56c821336f02338e3374b97e55273aee3c
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 11 02:28:55 2011 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Oct 11 02:28:55 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=12dc5c56

prepstrip: avoid a `dirname` with a simple ${var%/*}

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

---
 bin/ebuild-helpers/prepstrip |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 68b2133..67ceead 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -81,7 +81,7 @@ save_elf_debug() {
 	# this will recompute the build-id, but for now that's ok
 	local buildid="$( ${debugedit_found} && debugedit -i "${x}" )"
 
-	mkdir -p $(dirname "${y}")
+	mkdir -p "${y%/*}"
 
 	local inode=$(inode_var_name "$x")
 	if [[ -n ${!inode} ]] ; then



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-10-11 14:24 Mike Frysinger
  0 siblings, 0 replies; 114+ messages in thread
From: Mike Frysinger @ 2011-10-11 14:24 UTC (permalink / raw
  To: gentoo-commits

commit:     d4fdc3f5c04e556ce217e004ed461c9f05146c0f
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 11 04:40:09 2011 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Oct 11 04:47:47 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d4fdc3f5

prepstrip: extract buildid with readelf to avoid debugedit when possible

The readelf utility is much more common than debugedit.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

---
 bin/ebuild-helpers/prepstrip |   32 +++++++++++++++++++++++---------
 1 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 67ceead..7a08aba 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -26,10 +26,13 @@ if ${RESTRICT_strip} || ${FEATURES_nostrip} ; then
 	${FEATURES_installsources} || exit 0
 fi
 
-STRIP=${STRIP:-${CHOST}-strip}
-type -P -- ${STRIP} > /dev/null || STRIP=strip
-OBJCOPY=${OBJCOPY:-${CHOST}-objcopy}
-type -P -- ${OBJCOPY} > /dev/null || OBJCOPY=objcopy
+# look up the tools we might be using
+for t in STRIP:strip OBJCOPY:objcopy READELF:readelf ; do
+	v=${t%:*} # STRIP
+	t=${t#*:} # strip
+	eval ${v}=\"${!v:-${CHOST}-${t}}\"
+	type -P -- ${!v} >/dev/null || eval ${v}=${t}
+done
 
 # We'll leave out -R .note for now until we can check out the relevance
 # of the section when it has the ALLOC flag set on it ...
@@ -65,8 +68,15 @@ save_elf_sources() {
 	local x=$1
 	local inode=$(inode_var_name "$x")
 	[[ -n ${!inode} ]] && return 0
-	debugedit -b "${WORKDIR}" -d "${prepstrip_sources_dir}" \
-		-l "${T}"/debug.sources "${x}"
+
+	# since we're editing the ELF here, we should recompute the build-id
+	# (the -i flag below).  save that output so we don't need to recompute
+	# it later on in the save_elf_debug step.
+	buildid=$(debugedit -i \
+		-b "${WORKDIR}" \
+		-d "${prepstrip_sources_dir}" \
+		-l "${T}"/debug.sources \
+		"${x}")
 }
 
 save_elf_debug() {
@@ -78,9 +88,6 @@ save_elf_debug() {
 	# dont save debug info twice
 	[[ ${x} == *".debug" ]] && return 0
 
-	# this will recompute the build-id, but for now that's ok
-	local buildid="$( ${debugedit_found} && debugedit -i "${x}" )"
-
 	mkdir -p "${y%/*}"
 
 	local inode=$(inode_var_name "$x")
@@ -95,6 +102,12 @@ save_elf_debug() {
 		chmod ${args} "${y}"
 	fi
 
+	# if we don't already have build-id from debugedit, look it up
+	if [[ -z ${buildid} ]] ; then
+		# convert the readelf output to something useful
+		buildid=$(${READELF} -x .note.gnu.build-id "${x}" 2>/dev/null \
+			| awk '$NF ~ /GNU/ { getline; printf $2$3$4$5; getline; print $2 }')
+	fi
 	if [[ -n ${buildid} ]] ; then
 		local buildid_dir="${D}usr/lib/debug/.build-id/${buildid:0:2}"
 		local buildid_file="${buildid_dir}/${buildid:2}"
@@ -165,6 +178,7 @@ do
 	# actually causes problems.  install sources for all
 	# elf types though cause that stuff is good.
 
+	buildid=
 	if [[ ${f} == *"current ar archive"* ]] ; then
 		vecho "   ${x:${#D}}"
 		if ${strip_this} ; then



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-10-11 14:24 Mike Frysinger
  0 siblings, 0 replies; 114+ messages in thread
From: Mike Frysinger @ 2011-10-11 14:24 UTC (permalink / raw
  To: gentoo-commits

commit:     51579fb34c19519a585ce2d052a270b6d84a2d97
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 11 04:49:48 2011 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Oct 11 14:18:48 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=51579fb3

prepstrip: add support for elfutils strip

If people use strip from the elfutils package, take advantage of some of
its neat features (like splitting + stripping in one step).

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

---
 bin/ebuild-helpers/prepstrip |   64 ++++++++++++++++++++++++++++++------------
 1 files changed, 46 insertions(+), 18 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 7a08aba..7f158c2 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -34,10 +34,26 @@ for t in STRIP:strip OBJCOPY:objcopy READELF:readelf ; do
 	type -P -- ${!v} >/dev/null || eval ${v}=${t}
 done
 
-# We'll leave out -R .note for now until we can check out the relevance
-# of the section when it has the ALLOC flag set on it ...
-export SAFE_STRIP_FLAGS="--strip-unneeded"
-export PORTAGE_STRIP_FLAGS=${PORTAGE_STRIP_FLAGS-${SAFE_STRIP_FLAGS} -R .comment}
+# Figure out what tool set we're using to strip stuff
+unset SAFE_STRIP_FLAGS DEF_STRIP_FLAGS SPLIT_STRIP_FLAGS
+case $(${STRIP} --version 2>/dev/null) in
+*elfutils*) # dev-libs/elfutils
+	# elfutils default behavior is always safe, so don't need to specify
+	# any flags at all
+	SAFE_STRIP_FLAGS=""
+	DEF_STRIP_FLAGS="--remove-comment"
+	SPLIT_STRIP_FLAGS="-f"
+	;;
+*GNU*) # sys-devel/binutils
+	# We'll leave out -R .note for now until we can check out the relevance
+	# of the section when it has the ALLOC flag set on it ...
+	SAFE_STRIP_FLAGS="--strip-unneeded"
+	DEF_STRIP_FLAGS="-R .comment"
+	SPLIT_STRIP_FLAGS=
+	;;
+esac
+: ${PORTAGE_STRIP_FLAGS=${SAFE_STRIP_FLAGS} ${DEF_STRIP_FLAGS}}
+
 prepstrip_sources_dir=/usr/src/debug/${CATEGORY}/${PF}
 
 type -P debugedit >/dev/null && debugedit_found=true || debugedit_found=false
@@ -95,8 +111,12 @@ save_elf_debug() {
 		ln "${D}usr/lib/debug/${!inode:${#D}}.debug" "$y"
 	else
 		eval $inode=\$x
-		${OBJCOPY} --only-keep-debug "${x}" "${y}"
-		${OBJCOPY} --add-gnu-debuglink="${y}" "${x}"
+		if [[ -e ${T}/prepstrip.split.debug ]] ; then
+			mv "${T}"/prepstrip.split.debug "${y}"
+		else
+			${OBJCOPY} --only-keep-debug "${x}" "${y}"
+			${OBJCOPY} --add-gnu-debuglink="${y}" "${x}"
+		fi
 		local args="a-x,o-w"
 		[[ -g ${x} || -u ${x} ]] && args+=",go-r"
 		chmod ${args} "${y}"
@@ -117,6 +137,24 @@ save_elf_debug() {
 	fi
 }
 
+process_elf() {
+	local x=$1 strip_flags=${*:2}
+
+	vecho "   ${x:${#D}}"
+	save_elf_sources "${x}"
+
+	if ${strip_this} ; then
+		# see if we can split & strip at the same time
+		if [[ -n ${SPLIT_STRIP_FLAGS} ]] ; then
+			${STRIP} ${strip_flags} -f "${T}"/prepstrip.split.debug "${x}"
+			save_elf_debug "${x}"
+		else
+			save_elf_debug "${x}"
+			${STRIP} ${strip_flags} "${x}"
+		fi
+	fi
+}
+
 # The existance of the section .symtab tells us that a binary is stripped.
 # We want to log already stripped binaries, as this may be a QA violation.
 # They prevent us from getting the splitdebug data.
@@ -186,19 +224,9 @@ do
 			${STRIP} -g "${x}"
 		fi
 	elif [[ ${f} == *"SB executable"* || ${f} == *"SB shared object"* ]] ; then
-		vecho "   ${x:${#D}}"
-		save_elf_sources "${x}"
-		if ${strip_this} ; then
-			save_elf_debug "${x}"
-			${STRIP} ${PORTAGE_STRIP_FLAGS} "${x}"
-		fi
+		process_elf "${x}" ${PORTAGE_STRIP_FLAGS}
 	elif [[ ${f} == *"SB relocatable"* ]] ; then
-		vecho "   ${x:${#D}}"
-		save_elf_sources "${x}"
-		if ${strip_this} ; then
-			[[ ${x} == *.ko ]] && save_elf_debug "${x}"
-			${STRIP} ${SAFE_STRIP_FLAGS} "${x}"
-		fi
+		process_elf "${x}" ${SAFE_STRIP_FLAGS}
 	fi
 done
 



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-10-11 17:29 Mike Frysinger
  0 siblings, 0 replies; 114+ messages in thread
From: Mike Frysinger @ 2011-10-11 17:29 UTC (permalink / raw
  To: gentoo-commits

commit:     86e3ed5b8d1efdd439415cb3dec2905e5de058dc
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 11 17:28:45 2011 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Oct 11 17:28:59 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=86e3ed5b

prepstrip: make sure eu-strip embeds right filename

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

---
 bin/ebuild-helpers/prepstrip |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 7f158c2..8c2ca48 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -146,7 +146,10 @@ process_elf() {
 	if ${strip_this} ; then
 		# see if we can split & strip at the same time
 		if [[ -n ${SPLIT_STRIP_FLAGS} ]] ; then
-			${STRIP} ${strip_flags} -f "${T}"/prepstrip.split.debug "${x}"
+			${STRIP} ${strip_flags} \
+				-f "${T}"/prepstrip.split.debug \
+				-F "${x##*/}.debug" \
+				"${x}"
 			save_elf_debug "${x}"
 		else
 			save_elf_debug "${x}"



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-11-07  8:14 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2011-11-07  8:14 UTC (permalink / raw
  To: gentoo-commits

commit:     38acf30cbf60c73fade97f121176158af898640c
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  7 08:14:29 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Nov  7 08:14:29 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=38acf30c

Handle empty PORTAGE_COMPRESS for bug #389047.

This fixes a case where empty PORTAGE_COMPRESS made ecompressdir forget
to call restore_skip_dirs, such that docompress -x resulted in files
not being installed due to hide_skip_dirs hiding them permanently.

---
 bin/ebuild-helpers/ecompressdir |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir
index 76c2718..fa42775 100755
--- a/bin/ebuild-helpers/ecompressdir
+++ b/bin/ebuild-helpers/ecompressdir
@@ -133,7 +133,11 @@ for dir in "$@" ; do
 		'cp -p "${file}" "${file}.ecompress.break" ; mv -f "${file}.ecompress.break" "${file}"' \;
 
 	# now lets do our work
-	[[ -z ${suffix} ]] && continue
+	if [[ -z ${suffix} ]] ; then
+		restore_skip_dirs
+		continue
+	fi
+
 	vecho "${0##*/}: $(ecompress --bin) /${actual_dir#${ED}}"
 	funk_up_dir "compress" "${suffix}" "ecompress"
 



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-11-08 19:25 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2011-11-08 19:25 UTC (permalink / raw
  To: gentoo-commits

commit:     46f565d32b46b073103c9ed045326ecd9d3f2859
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Nov  8 19:24:35 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Nov  8 19:24:35 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=46f565d3

ecompressdir: remove 'continue' from loop logic

Hopefully this helps us avoid errors in loop logic like bug #389047.

---
 bin/ebuild-helpers/ecompressdir |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir
index fa42775..f9a846a 100755
--- a/bin/ebuild-helpers/ecompressdir
+++ b/bin/ebuild-helpers/ecompressdir
@@ -133,14 +133,11 @@ for dir in "$@" ; do
 		'cp -p "${file}" "${file}.ecompress.break" ; mv -f "${file}.ecompress.break" "${file}"' \;
 
 	# now lets do our work
-	if [[ -z ${suffix} ]] ; then
-		restore_skip_dirs
-		continue
+	if [[ -n ${suffix} ]] ; then
+		vecho "${0##*/}: $(ecompress --bin) /${actual_dir#${ED}}"
+		funk_up_dir "compress" "${suffix}" "ecompress"
 	fi
 
-	vecho "${0##*/}: $(ecompress --bin) /${actual_dir#${ED}}"
-	funk_up_dir "compress" "${suffix}" "ecompress"
-
 	# finally, restore the skipped stuff
 	restore_skip_dirs
 done



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-12-20  0:00 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2011-12-20  0:00 UTC (permalink / raw
  To: gentoo-commits

commit:     b135c01eff4ea89d16ae711271cc215388d08d17
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 20 00:00:38 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Dec 20 00:00:38 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b135c01e

prepstrip: merge diff from prefix branch

NOTE: Debug files must be installed in
${EPREFIX}/usr/lib/debug/${EPREFIX} (note that ${EPREFIX} occurs twice
in this path) in order for gdb's debug-file-directory lookup to work
correctly.

---
 bin/ebuild-helpers/prepstrip |   35 ++++++++++++++++++++++++++---------
 1 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 15eed84..241caaf 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -19,7 +19,7 @@ exp_tf FEATURES installsources nostrip splitdebug
 exp_tf RESTRICT binchecks installsources strip
 
 [[ " ${FEATURES} " == *" force-prefix "* ]] || \
-	case "$EAPI" in 0|1|2) ED=${D} ;; esac
+	case "$EAPI" in 0|1|2) EPREFIX= ED=${D} ;; esac
 
 banner=false
 SKIP_STRIP=false
@@ -57,7 +57,7 @@ case $(${STRIP} --version 2>/dev/null) in
 esac
 : ${PORTAGE_STRIP_FLAGS=${SAFE_STRIP_FLAGS} ${DEF_STRIP_FLAGS}}
 
-prepstrip_sources_dir=/usr/src/debug/${CATEGORY}/${PF}
+prepstrip_sources_dir=${EPREFIX}/usr/src/debug/${CATEGORY}/${PF}
 
 type -P debugedit >/dev/null && debugedit_found=true || debugedit_found=false
 debugedit_warned=false
@@ -101,8 +101,12 @@ save_elf_sources() {
 save_elf_debug() {
 	${FEATURES_splitdebug} || return 0
 
+	# NOTE: Debug files must be installed in
+	# ${EPREFIX}/usr/lib/debug/${EPREFIX} (note that ${EPREFIX} occurs
+	# twice in this path) in order for gdb's debug-file-directory
+	# lookup to work correctly.
 	local x=$1
-	local y="${ED}usr/lib/debug/${x:${#ED}}.debug"
+	local y=${ED}usr/lib/debug/${x:${#D}}.debug
 
 	# dont save debug info twice
 	[[ ${x} == *".debug" ]] && return 0
@@ -111,7 +115,7 @@ save_elf_debug() {
 
 	local inode=$(inode_var_name "$x")
 	if [[ -n ${!inode} ]] ; then
-		ln "${ED}usr/lib/debug/${!inode:${#ED}}.debug" "$y"
+		ln "${ED}usr/lib/debug/${!inode:${#D}}.debug" "$y"
 	else
 		eval $inode=\$x
 		if [[ -e ${T}/prepstrip.split.debug ]] ; then
@@ -135,8 +139,8 @@ save_elf_debug() {
 		local buildid_dir="${ED}usr/lib/debug/.build-id/${buildid:0:2}"
 		local buildid_file="${buildid_dir}/${buildid:2}"
 		mkdir -p "${buildid_dir}"
-		ln -s "../../${x:${#ED}}.debug" "${buildid_file}.debug"
-		ln -s "/${x:${#ED}}" "${buildid_file}"
+		ln -s "../../${x:${#D}}.debug" "${buildid_file}.debug"
+		ln -s "/${x:${#D}}" "${buildid_file}"
 	fi
 }
 
@@ -216,6 +220,15 @@ do
 		strip_this=false
 	fi
 
+	# In Prefix we are usually an unprivileged user, so we can't strip
+	# unwritable objects.  Make them temporarily writable for the
+	# stripping.
+	was_not_writable=false
+	if [[ -n ${EPREFIX} && ! -w ${x} ]] ; then
+		was_not_writable=true
+		chmod u+w "${x}"
+	fi
+
 	# only split debug info for final linked objects
 	# or kernel modules as debuginfo for intermediatary
 	# files (think crt*.o from gcc/glibc) is useless and
@@ -234,6 +247,10 @@ do
 	elif [[ ${f} == *"SB relocatable"* ]] ; then
 		process_elf "${x}" ${SAFE_STRIP_FLAGS}
 	fi
+
+	if ${was_not_writable} ; then
+		chmod u-w "${x}"
+	fi
 done
 
 if [[ -s ${T}/debug.sources ]] && \
@@ -242,10 +259,10 @@ if [[ -s ${T}/debug.sources ]] && \
    ${debugedit_found}
 then
 	vecho "installsources: rsyncing source files"
-	[[ -d ${ED}${prepstrip_sources_dir} ]] || mkdir -p "${ED}${prepstrip_sources_dir}"
+	[[ -d ${D}${prepstrip_sources_dir} ]] || mkdir -p "${D}${prepstrip_sources_dir}"
 	grep -zv '/<[^/>]*>$' "${T}"/debug.sources | \
 		(cd "${WORKDIR}"; LANG=C sort -z -u | \
-		rsync -tL0 --files-from=- "${WORKDIR}/" "${ED}${prepstrip_sources_dir}/" )
+		rsync -tL0 --files-from=- "${WORKDIR}/" "${D}${prepstrip_sources_dir}/" )
 
 	# Preserve directory structure.
 	# Needed after running save_elf_sources.
@@ -253,5 +270,5 @@ then
 	while read -r -d $'\0' emptydir
 	do
 		>> "$emptydir"/.keepdir
-	done < <(find "${ED}${prepstrip_sources_dir}/" -type d -empty -print0)
+	done < <(find "${D}${prepstrip_sources_dir}/" -type d -empty -print0)
 fi



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-12-21 19:30 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2011-12-21 19:30 UTC (permalink / raw
  To: gentoo-commits

commit:     4e3a6eb60d48edddbe6a279f02b0cfc561394841
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 21 16:20:38 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Dec 21 19:30:01 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4e3a6eb6

Strip .GCC.command.line from output files as well.

---
 bin/ebuild-helpers/prepstrip |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 241caaf..1d7b3d2 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -51,7 +51,7 @@ case $(${STRIP} --version 2>/dev/null) in
 	# We'll leave out -R .note for now until we can check out the relevance
 	# of the section when it has the ALLOC flag set on it ...
 	SAFE_STRIP_FLAGS="--strip-unneeded"
-	DEF_STRIP_FLAGS="-R .comment"
+	DEF_STRIP_FLAGS="-R .comment -R .GCC.command.line"
 	SPLIT_STRIP_FLAGS=
 	;;
 esac



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2011-12-22 22:17 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2011-12-22 22:17 UTC (permalink / raw
  To: gentoo-commits

commit:     e20df85cf8579aaa9cf07d59efc453d5837a7598
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 22 22:15:43 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Dec 22 22:15:43 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e20df85c

ebuild-helpers/new*: QA warn for extra args

---
 bin/ebuild-helpers/newbin    |    5 ++++-
 bin/ebuild-helpers/newconfd  |    5 ++++-
 bin/ebuild-helpers/newdoc    |    5 ++++-
 bin/ebuild-helpers/newenvd   |    5 ++++-
 bin/ebuild-helpers/newexe    |    5 ++++-
 bin/ebuild-helpers/newinitd  |    5 ++++-
 bin/ebuild-helpers/newins    |    3 +++
 bin/ebuild-helpers/newlib.a  |    5 ++++-
 bin/ebuild-helpers/newlib.so |    5 ++++-
 bin/ebuild-helpers/newman    |    5 ++++-
 bin/ebuild-helpers/newsbin   |    5 ++++-
 11 files changed, 43 insertions(+), 10 deletions(-)

diff --git a/bin/ebuild-helpers/newbin b/bin/ebuild-helpers/newbin
index 30f19b0..bf98744 100755
--- a/bin/ebuild-helpers/newbin
+++ b/bin/ebuild-helpers/newbin
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
@@ -14,6 +14,9 @@ if [ ! -e "$1" ] ; then
 	exit 1
 fi
 
+(($#>2)) && \
+	eqawarn "QA Notice: ${0##*/} called with more than 2 arguments: ${@:3}"
+
 rm -rf "${T}/${2}" && \
 cp -f "${1}" "${T}/${2}" && \
 exec dobin "${T}/${2}"

diff --git a/bin/ebuild-helpers/newconfd b/bin/ebuild-helpers/newconfd
index 5752cfa..fa3710d 100755
--- a/bin/ebuild-helpers/newconfd
+++ b/bin/ebuild-helpers/newconfd
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
@@ -14,6 +14,9 @@ if [ ! -e "$1" ] ; then
 	exit 1
 fi
 
+(($#>2)) && \
+	eqawarn "QA Notice: ${0##*/} called with more than 2 arguments: ${@:3}"
+
 rm -rf "${T}/${2}" && \
 cp -f "${1}" "${T}/${2}" && \
 exec doconfd "${T}/${2}"

diff --git a/bin/ebuild-helpers/newdoc b/bin/ebuild-helpers/newdoc
index f97ce0d..df6fb1d 100755
--- a/bin/ebuild-helpers/newdoc
+++ b/bin/ebuild-helpers/newdoc
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
@@ -14,6 +14,9 @@ if [ ! -e "$1" ] ; then
 	exit 1
 fi
 
+(($#>2)) && \
+	eqawarn "QA Notice: ${0##*/} called with more than 2 arguments: ${@:3}"
+
 rm -rf "${T}/${2}" && \
 cp -f "${1}" "${T}/${2}" && \
 exec dodoc "${T}/${2}"

diff --git a/bin/ebuild-helpers/newenvd b/bin/ebuild-helpers/newenvd
index 83c556e..c54af05 100755
--- a/bin/ebuild-helpers/newenvd
+++ b/bin/ebuild-helpers/newenvd
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
@@ -14,6 +14,9 @@ if [ ! -e "$1" ] ; then
 	exit 1
 fi
 
+(($#>2)) && \
+	eqawarn "QA Notice: ${0##*/} called with more than 2 arguments: ${@:3}"
+
 rm -rf "${T}/${2}" && \
 cp -f "${1}" "${T}/${2}" && \
 exec doenvd "${T}/${2}"

diff --git a/bin/ebuild-helpers/newexe b/bin/ebuild-helpers/newexe
index 92dbe9f..9bcf64b 100755
--- a/bin/ebuild-helpers/newexe
+++ b/bin/ebuild-helpers/newexe
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
@@ -14,6 +14,9 @@ if [ ! -e "$1" ] ; then
 	exit 1
 fi
 
+(($#>2)) && \
+	eqawarn "QA Notice: ${0##*/} called with more than 2 arguments: ${@:3}"
+
 rm -rf "${T}/${2}" && \
 cp -f "${1}" "${T}/${2}" && \
 exec doexe "${T}/${2}"

diff --git a/bin/ebuild-helpers/newinitd b/bin/ebuild-helpers/newinitd
index fc6003a..03bbe68 100755
--- a/bin/ebuild-helpers/newinitd
+++ b/bin/ebuild-helpers/newinitd
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
@@ -14,6 +14,9 @@ if [ ! -e "$1" ] ; then
 	exit 1
 fi
 
+(($#>2)) && \
+	eqawarn "QA Notice: ${0##*/} called with more than 2 arguments: ${@:3}"
+
 rm -rf "${T}/${2}" && \
 cp -f "${1}" "${T}/${2}" && \
 exec doinitd "${T}/${2}"

diff --git a/bin/ebuild-helpers/newins b/bin/ebuild-helpers/newins
index 065477f..adf2d80 100755
--- a/bin/ebuild-helpers/newins
+++ b/bin/ebuild-helpers/newins
@@ -14,6 +14,9 @@ if [ ! -e "$1" ] ; then
 	exit 1
 fi
 
+(($#>2)) && \
+	eqawarn "QA Notice: ${0##*/} called with more than 2 arguments: ${@:3}"
+
 rm -rf "${T}/${2}" || exit $?
 case "$EAPI" in
 	0|1|2|3|3_pre2)

diff --git a/bin/ebuild-helpers/newlib.a b/bin/ebuild-helpers/newlib.a
index eef4104..7ff8195 100755
--- a/bin/ebuild-helpers/newlib.a
+++ b/bin/ebuild-helpers/newlib.a
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
@@ -14,6 +14,9 @@ if [ ! -e "$1" ] ; then
 	exit 1
 fi
 
+(($#>2)) && \
+	eqawarn "QA Notice: ${0##*/} called with more than 2 arguments: ${@:3}"
+
 rm -rf "${T}/${2}" && \
 cp -f "${1}" "${T}/${2}" && \
 exec dolib.a "${T}/${2}"

diff --git a/bin/ebuild-helpers/newlib.so b/bin/ebuild-helpers/newlib.so
index c8696f3..fd4c097 100755
--- a/bin/ebuild-helpers/newlib.so
+++ b/bin/ebuild-helpers/newlib.so
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
@@ -14,6 +14,9 @@ if [ ! -e "$1" ] ; then
 	exit 1
 fi
 
+(($#>2)) && \
+	eqawarn "QA Notice: ${0##*/} called with more than 2 arguments: ${@:3}"
+
 rm -rf "${T}/${2}" && \
 cp -f "${1}" "${T}/${2}" && \
 exec dolib.so "${T}/${2}"

diff --git a/bin/ebuild-helpers/newman b/bin/ebuild-helpers/newman
index ffb8a2d..889e0f9 100755
--- a/bin/ebuild-helpers/newman
+++ b/bin/ebuild-helpers/newman
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
@@ -14,6 +14,9 @@ if [ ! -e "$1" ] ; then
 	exit 1
 fi
 
+(($#>2)) && \
+	eqawarn "QA Notice: ${0##*/} called with more than 2 arguments: ${@:3}"
+
 rm -rf "${T}/${2}" && \
 cp -f "${1}" "${T}/${2}" && \
 exec doman "${T}/${2}"

diff --git a/bin/ebuild-helpers/newsbin b/bin/ebuild-helpers/newsbin
index 82242aa..9df0af2 100755
--- a/bin/ebuild-helpers/newsbin
+++ b/bin/ebuild-helpers/newsbin
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
@@ -14,6 +14,9 @@ if [ ! -e "$1" ] ; then
 	exit 1
 fi
 
+(($#>2)) && \
+	eqawarn "QA Notice: ${0##*/} called with more than 2 arguments: ${@:3}"
+
 rm -rf "${T}/${2}" && \
 cp -f "${1}" "${T}/${2}" && \
 exec dosbin "${T}/${2}"



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-01-14 21:37 Mike Frysinger
  0 siblings, 0 replies; 114+ messages in thread
From: Mike Frysinger @ 2012-01-14 21:37 UTC (permalink / raw
  To: gentoo-commits

commit:     ac263977391643f1c147d7e767b5b804ac095d55
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 13 19:29:06 2012 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Jan 14 21:37:24 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ac263977

prepstrip: add writable workaround for everyone

The writable issue shows up when using `ebuild` as non-root users
in non-prefix setups.  So always do it.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

---
 bin/ebuild-helpers/prepstrip |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 1d7b3d2..ee547f2 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -224,7 +224,7 @@ do
 	# unwritable objects.  Make them temporarily writable for the
 	# stripping.
 	was_not_writable=false
-	if [[ -n ${EPREFIX} && ! -w ${x} ]] ; then
+	if [[ ! -w ${x} ]] ; then
 		was_not_writable=true
 		chmod u+w "${x}"
 	fi



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-01-21 21:33 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-01-21 21:33 UTC (permalink / raw
  To: gentoo-commits

commit:     e3ab6f288110602d59c7e8fee8ee8c514c7a4329
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 21 21:32:59 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jan 21 21:32:59 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e3ab6f28

ecompress: don't rename dir symlink, bug #399595

---
 bin/ebuild-helpers/ecompressdir |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir
index 5ba44d7..74973ab 100755
--- a/bin/ebuild-helpers/ecompressdir
+++ b/bin/ebuild-helpers/ecompressdir
@@ -69,6 +69,10 @@ funk_up_dir() {
 	while read -r -d $'\0' brokenlink ; do
 		[[ -e ${brokenlink} ]] && continue
 		olddest=$(readlink "${brokenlink}")
+		# Ignore temporarily broken symlinks due to
+		# _relocate_skip_dirs (bug #399595).
+		skip_dir_dest=${T}/ecompress-skip/${actual_dir#${ED}}/${brokenlink%/*}/${olddest}
+		[[ -e ${skip_dir_dest} ]] && continue
 		[[ ${act} == "compress" ]] \
 			&& newdest="${olddest}${suffix}" \
 			|| newdest="${olddest%${suffix}}"



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-02-22 20:51 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-02-22 20:51 UTC (permalink / raw
  To: gentoo-commits

commit:     0842a51cd5a4cf4652a524fba0a420c17953327a
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 22 20:50:48 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Feb 22 20:50:48 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0842a51c

ecompressdir: handle abs symlink, bug #405327

---
 bin/ebuild-helpers/ecompressdir |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir
index 74973ab..17ecd80 100755
--- a/bin/ebuild-helpers/ecompressdir
+++ b/bin/ebuild-helpers/ecompressdir
@@ -10,7 +10,7 @@ if [[ -z $1 ]] ; then
 fi
 
 [[ " ${FEATURES} " == *" force-prefix "* ]] || \
-	case "$EAPI" in 0|1|2) ED=${D} ;; esac
+	case "$EAPI" in 0|1|2) ED=${D} EPREFIX= ;; esac
 
 case $1 in
 	--ignore)
@@ -70,8 +70,15 @@ funk_up_dir() {
 		[[ -e ${brokenlink} ]] && continue
 		olddest=$(readlink "${brokenlink}")
 		# Ignore temporarily broken symlinks due to
-		# _relocate_skip_dirs (bug #399595).
-		skip_dir_dest=${T}/ecompress-skip/${actual_dir#${ED}}/${brokenlink%/*}/${olddest}
+		# _relocate_skip_dirs (bug #399595), and handle
+		# absolute symlinks to files that aren't merged
+		# yet (bug #405327).
+		if [[ ${olddest} == /* ]] ; then
+			[ -e "${D}${olddest}" ] && continue
+			skip_dir_dest=${T}/ecompress-skip/${olddest#${EPREFIX}}
+		else
+			skip_dir_dest=${T}/ecompress-skip/${actual_dir#${ED}}/${brokenlink%/*}/${olddest}
+		fi
 		[[ -e ${skip_dir_dest} ]] && continue
 		[[ ${act} == "compress" ]] \
 			&& newdest="${olddest}${suffix}" \



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

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

commit:     de5f5fb90784ad957fcde2755fa981db821603bf
Author:     Jeremy Olexa <darkside <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 29 22:02:56 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Mar 29 22:02:56 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=de5f5fb9

dosym: add $EPREFIX to absolute target

---
 bin/ebuild-helpers/dosym |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/dosym b/bin/ebuild-helpers/dosym
index 5e41ec4..4286eef 100755
--- a/bin/ebuild-helpers/dosym
+++ b/bin/ebuild-helpers/dosym
@@ -20,8 +20,11 @@ fi
 
 destdir=${2%/*}
 [[ ! -d ${ED}${destdir} ]] && dodir "${destdir}"
+# when absolute, prefix with offset for Gentoo Prefix
+target="${1}"
+[[ ${target:0:1} == "/" ]] && target="${EPREFIX}${target}"
+ln -snf "${target}" "${ED}${2}"
 
-ln -snf "$1" "${ED}$2"
 ret=$?
 [[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
 exit $ret



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-03-29 22:12 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-03-29 22:12 UTC (permalink / raw
  To: gentoo-commits

commit:     3ff6c0d01a074169b8afeddc668191541f5e4330
Author:     Jeremy Olexa <darkside <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 29 22:02:56 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Mar 29 22:11:41 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=3ff6c0d0

dosym: add $EPREFIX to absolute target

---
 bin/ebuild-helpers/dosym |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/bin/ebuild-helpers/dosym b/bin/ebuild-helpers/dosym
index 5e41ec4..2489e22 100755
--- a/bin/ebuild-helpers/dosym
+++ b/bin/ebuild-helpers/dosym
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
@@ -20,8 +20,11 @@ fi
 
 destdir=${2%/*}
 [[ ! -d ${ED}${destdir} ]] && dodir "${destdir}"
+# when absolute, prefix with offset for Gentoo Prefix
+target="${1}"
+[[ ${target:0:1} == "/" ]] && target="${EPREFIX}${target}"
+ln -snf "${target}" "${ED}${2}"
 
-ln -snf "$1" "${ED}$2"
 ret=$?
 [[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
 exit $ret



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-03-29 22:26 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-03-29 22:26 UTC (permalink / raw
  To: gentoo-commits

commit:     ec974a0d7637fff2dc2d57917f6dbb5c348c5e7d
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 29 22:25:23 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Mar 29 22:25:23 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ec974a0d

fowners: return success for prefix if EUID != 0

This is based on a patch by Jeremy Olexa from bug #409893.

---
 bin/ebuild-helpers/fowners |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/bin/ebuild-helpers/fowners b/bin/ebuild-helpers/fowners
index a5a28f2..a213c9e 100755
--- a/bin/ebuild-helpers/fowners
+++ b/bin/ebuild-helpers/fowners
@@ -1,16 +1,22 @@
 #!/bin/bash
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 [[ " ${FEATURES} " == *" force-prefix "* ]] || \
-	case "$EAPI" in 0|1|2) ED=${D} ;; esac
+	case "$EAPI" in 0|1|2) EPREFIX= ED=${D} ;; esac
 
 # we can't prefix all arguments because
 # chown takes random options
 slash="/"
 chown "${@/#${slash}/${ED}${slash}}"
 ret=$?
+
+if [[ ${ret} != 0 && -n ${EPREFIX} && ${EUID} != 0 ]] ; then
+	ewarn "fowners failure ignored in Prefix with non-privileged user"
+	exit 0
+fi
+
 [[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
 exit $ret



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-05-14  8:29 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-05-14  8:29 UTC (permalink / raw
  To: gentoo-commits

commit:     b4fba3e9fa2e285244de491f57700978158c1838
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon May 14 08:29:40 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon May 14 08:29:40 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b4fba3e9

prepstrip: disable parallel for splitdebug, etc..

---
 bin/ebuild-helpers/prepstrip |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 09b0333..a5b2cae 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -62,6 +62,20 @@ prepstrip_sources_dir=${EPREFIX}/usr/src/debug/${CATEGORY}/${PF}
 type -P debugedit >/dev/null && debugedit_found=true || debugedit_found=false
 debugedit_warned=false
 
+disable_parallel=false
+${FEATURES_splitdebug} && disable_parallel=true
+${FEATURES_installsources} && \
+	! ${RESTRICT_installsources} && \
+	${debugedit_found} && disable_parallel=true
+
+if ${disable_parallel} ; then
+	# Disable parallel processing, in order to prevent interference with
+	# temp files like debug.sources or prepstrip.split.debug
+	numjobs() {
+		echo 1
+	}
+fi
+
 multijob_init
 
 unset ${!INODE_*}
@@ -265,6 +279,9 @@ do
 	multijob_post_fork
 done
 
+# Let jobs finish before processing ${T}/debug.sources
+multijob_finish
+
 if [[ -s ${T}/debug.sources ]] && \
    ${FEATURES_installsources} && \
    ! ${RESTRICT_installsources} && \
@@ -284,5 +301,3 @@ then
 		>> "$emptydir"/.keepdir
 	done < <(find "${D}${prepstrip_sources_dir}/" -type d -empty -print0)
 fi
-
-multijob_finish



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-05-14  8:42 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-05-14  8:42 UTC (permalink / raw
  To: gentoo-commits

commit:     c534e32f78cf7c543e9203e7fe1c7b1630144ffb
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon May 14 08:42:12 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon May 14 08:42:12 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c534e32f

prepstrip: wait for Pre-stripped check to finish

---
 bin/ebuild-helpers/prepstrip |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index a5b2cae..063a17c 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -215,6 +215,9 @@ if ! ${RESTRICT_binchecks} && ! ${RESTRICT_strip} ; then
 	multijob_post_fork
 fi
 
+# Let the Pre-stripped check finish before we start stripping
+multijob_finish
+
 # Now we look for unstripped binaries.
 for x in \
 	$(scanelf -yqRBF '#k%F' -k '.symtab' "$@") \



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-05-14 18:51 Mike Frysinger
  0 siblings, 0 replies; 114+ messages in thread
From: Mike Frysinger @ 2012-05-14 18:51 UTC (permalink / raw
  To: gentoo-commits

commit:     235c122ae35ebf965f2effd31a4b830195ceb0dd
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon May 14 17:35:46 2012 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon May 14 18:51:05 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=235c122a

prepstrip: run the log parsing in parallel to file stripping

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

---
 bin/ebuild-helpers/prepstrip |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 063a17c..c5b1785 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -187,12 +187,15 @@ process_elf() {
 # We want to log already stripped binaries, as this may be a QA violation.
 # They prevent us from getting the splitdebug data.
 if ! ${RESTRICT_binchecks} && ! ${RESTRICT_strip} ; then
+	# We need to do the non-stripped scan serially first before we turn around
+	# and start stripping the files ourselves.  The log parsing can be done in
+	# parallel though.
+	log=$T/scanelf-already-stripped.log
+	scanelf -yqRBF '#k%F' -k '!.symtab' "$@" | sed -e "s#^${ED}##" > "$log"
 	(
 	multijob_child_init
-	log=$T/scanelf-already-stripped.log
 	qa_var="QA_PRESTRIPPED_${ARCH/-/_}"
 	[[ -n ${!qa_var} ]] && QA_PRESTRIPPED="${!qa_var}"
-	scanelf -yqRBF '#k%F' -k '!.symtab' "$@" | sed -e "s#^${ED}##" > "$log"
 	if [[ -n $QA_PRESTRIPPED && -s $log && \
 		${QA_STRICT_PRESTRIPPED-unset} = unset ]] ; then
 		shopts=$-
@@ -215,9 +218,6 @@ if ! ${RESTRICT_binchecks} && ! ${RESTRICT_strip} ; then
 	multijob_post_fork
 fi
 
-# Let the Pre-stripped check finish before we start stripping
-multijob_finish
-
 # Now we look for unstripped binaries.
 for x in \
 	$(scanelf -yqRBF '#k%F' -k '.symtab' "$@") \



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-05-14 18:51 Mike Frysinger
  0 siblings, 0 replies; 114+ messages in thread
From: Mike Frysinger @ 2012-05-14 18:51 UTC (permalink / raw
  To: gentoo-commits

commit:     1ebf126ae221bb8bd78df07a92fc4608b24f6689
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon May 14 18:19:25 2012 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon May 14 18:51:05 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=1ebf126a

prepstrip: tweak style and document helper funcs a bit

Mostly make sure we be consistent with ${var} rather than $var.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

---
 bin/ebuild-helpers/prepstrip |   34 +++++++++++++++++++---------------
 1 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index c5b1785..61249ac 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -19,7 +19,7 @@ exp_tf FEATURES compressdebug installsources nostrip splitdebug
 exp_tf RESTRICT binchecks installsources strip
 
 [[ " ${FEATURES} " == *" force-prefix "* ]] || \
-	case "$EAPI" in 0|1|2) EPREFIX= ED=${D} ;; esac
+	case "${EAPI}" in 0|1|2) EPREFIX= ED=${D} ;; esac
 
 banner=false
 SKIP_STRIP=false
@@ -80,14 +80,16 @@ multijob_init
 
 unset ${!INODE_*}
 
+# Usage: inode_var_name: <file>
 inode_var_name() {
-	if  [[ $USERLAND = BSD ]] ; then
+	if  [[ ${USERLAND} == "BSD" ]] ; then
 		stat -f 'INODE_%d_%i' "$1"
 	else
 		stat -c 'INODE_%d_%i' "$1"
 	fi
 }
 
+# Usage: save_elf_sources <elf>
 save_elf_sources() {
 	${FEATURES_installsources} || return 0
 	${RESTRICT_installsources} && return 0
@@ -101,7 +103,7 @@ save_elf_sources() {
 	fi
 
 	local x=$1
-	local inode=$(inode_var_name "$x")
+	local inode=$(inode_var_name "${x}")
 	[[ -n ${!inode} ]] && return 0
 
 	# since we're editing the ELF here, we should recompute the build-id
@@ -114,6 +116,7 @@ save_elf_sources() {
 		"${x}")
 }
 
+# Usage: save_elf_debug <elf>
 save_elf_debug() {
 	${FEATURES_splitdebug} || return 0
 
@@ -129,11 +132,11 @@ save_elf_debug() {
 
 	mkdir -p "${y%/*}"
 
-	local inode=$(inode_var_name "$x")
+	local inode=$(inode_var_name "${x}")
 	if [[ -n ${!inode} ]] ; then
-		ln "${ED}usr/lib/debug/${!inode:${#D}}.debug" "$y"
+		ln "${ED}usr/lib/debug/${!inode:${#D}}.debug" "${y}"
 	else
-		eval $inode=\$x
+		eval ${inode}=\${x}
 		if [[ -e ${T}/prepstrip.split.debug ]] ; then
 			mv "${T}"/prepstrip.split.debug "${y}"
 		else
@@ -162,6 +165,7 @@ save_elf_debug() {
 	fi
 }
 
+# Usage: process_elf <elf>
 process_elf() {
 	local x=$1 strip_flags=${*:2}
 
@@ -196,23 +200,23 @@ if ! ${RESTRICT_binchecks} && ! ${RESTRICT_strip} ; then
 	multijob_child_init
 	qa_var="QA_PRESTRIPPED_${ARCH/-/_}"
 	[[ -n ${!qa_var} ]] && QA_PRESTRIPPED="${!qa_var}"
-	if [[ -n $QA_PRESTRIPPED && -s $log && \
+	if [[ -n ${QA_PRESTRIPPED} && -s ${log} && \
 		${QA_STRICT_PRESTRIPPED-unset} = unset ]] ; then
 		shopts=$-
 		set -o noglob
-		for x in $QA_PRESTRIPPED ; do
-			sed -e "s#^${x#/}\$##" -i "$log"
+		for x in ${QA_PRESTRIPPED} ; do
+			sed -e "s#^${x#/}\$##" -i "${log}"
 		done
 		set +o noglob
-		set -$shopts
+		set -${shopts}
 	fi
-	sed -e "/^\$/d" -e "s#^#/#" -i "$log"
-	if [[ -s $log ]] ; then
+	sed -e "/^\$/d" -e "s#^#/#" -i "${log}"
+	if [[ -s ${log} ]] ; then
 		vecho -e "\n"
 		eqawarn "QA Notice: Pre-stripped files found:"
-		eqawarn "$(<"$log")"
+		eqawarn "$(<"${log}")"
 	else
-		rm -f "$log"
+		rm -f "${log}"
 	fi
 	) &
 	multijob_post_fork
@@ -301,6 +305,6 @@ then
 	# https://bugzilla.redhat.com/show_bug.cgi?id=444310
 	while read -r -d $'\0' emptydir
 	do
-		>> "$emptydir"/.keepdir
+		>> "${emptydir}"/.keepdir
 	done < <(find "${D}${prepstrip_sources_dir}/" -type d -empty -print0)
 fi



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-05-14 20:13 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-05-14 20:13 UTC (permalink / raw
  To: gentoo-commits

commit:     f40c0ccbe546d7e4c59c9931476ed24d8ea222c9
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon May 14 20:13:22 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon May 14 20:13:22 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f40c0ccb

prepstrip: fix hardlink handling for subshells

---
 bin/ebuild-helpers/prepstrip |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 61249ac..0f5f1d5 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -78,14 +78,15 @@ fi
 
 multijob_init
 
-unset ${!INODE_*}
+mkdir "${T}"/prepstrip.split.debug.inodes || die
 
 # Usage: inode_var_name: <file>
-inode_var_name() {
+inode_file_link() {
+	echo -n "${T}"/prepstrip.split.debug.inodes/
 	if  [[ ${USERLAND} == "BSD" ]] ; then
-		stat -f 'INODE_%d_%i' "$1"
+		stat -f '%i' "$1"
 	else
-		stat -c 'INODE_%d_%i' "$1"
+		stat -c '%i' "$1"
 	fi
 }
 
@@ -103,8 +104,7 @@ save_elf_sources() {
 	fi
 
 	local x=$1
-	local inode=$(inode_var_name "${x}")
-	[[ -n ${!inode} ]] && return 0
+	[[ -f $(inode_file_link "${x}") ]] && return 0
 
 	# since we're editing the ELF here, we should recompute the build-id
 	# (the -i flag below).  save that output so we don't need to recompute
@@ -132,11 +132,10 @@ save_elf_debug() {
 
 	mkdir -p "${y%/*}"
 
-	local inode=$(inode_var_name "${x}")
-	if [[ -n ${!inode} ]] ; then
-		ln "${ED}usr/lib/debug/${!inode:${#D}}.debug" "${y}"
+	local inode=$(inode_file_link "${x}")
+	if [[ -f ${inode} ]] ; then
+		ln "${inode}" "${y}"
 	else
-		eval ${inode}=\${x}
 		if [[ -e ${T}/prepstrip.split.debug ]] ; then
 			mv "${T}"/prepstrip.split.debug "${y}"
 		else
@@ -148,6 +147,7 @@ save_elf_debug() {
 		local args="a-x,o-w"
 		[[ -g ${x} || -u ${x} ]] && args+=",go-r"
 		chmod ${args} "${y}"
+		ln "${y}" "${inode}"
 	fi
 
 	# if we don't already have build-id from debugedit, look it up
@@ -289,6 +289,8 @@ done
 # Let jobs finish before processing ${T}/debug.sources
 multijob_finish
 
+rm -rf "${T}"/prepstrip.split.debug.inodes
+
 if [[ -s ${T}/debug.sources ]] && \
    ${FEATURES_installsources} && \
    ! ${RESTRICT_installsources} && \



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-05-14 20:20 Mike Frysinger
  0 siblings, 0 replies; 114+ messages in thread
From: Mike Frysinger @ 2012-05-14 20:20 UTC (permalink / raw
  To: gentoo-commits

commit:     4941c3c674400116f118a9c75b520c3fd1a25490
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon May 14 18:20:15 2012 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon May 14 18:51:05 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4941c3c6

prepstrip: make splitdebug/installsources parallel safe

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

---
 bin/ebuild-helpers/prepstrip |   44 +++++++++++++++++++----------------------
 1 files changed, 20 insertions(+), 24 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 61249ac..a58a83b 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -62,22 +62,13 @@ prepstrip_sources_dir=${EPREFIX}/usr/src/debug/${CATEGORY}/${PF}
 type -P debugedit >/dev/null && debugedit_found=true || debugedit_found=false
 debugedit_warned=false
 
-disable_parallel=false
-${FEATURES_splitdebug} && disable_parallel=true
-${FEATURES_installsources} && \
-	! ${RESTRICT_installsources} && \
-	${debugedit_found} && disable_parallel=true
-
-if ${disable_parallel} ; then
-	# Disable parallel processing, in order to prevent interference with
-	# temp files like debug.sources or prepstrip.split.debug
-	numjobs() {
-		echo 1
-	}
-fi
-
 multijob_init
 
+# Setup $T filesystem layout that we care about.
+tmpdir="${T}/prepstrip"
+rm -rf "${tmpdir}"
+mkdir -p "${tmpdir}"/{splitdebug,sources}
+
 unset ${!INODE_*}
 
 # Usage: inode_var_name: <file>
@@ -112,11 +103,11 @@ save_elf_sources() {
 	buildid=$(debugedit -i \
 		-b "${WORKDIR}" \
 		-d "${prepstrip_sources_dir}" \
-		-l "${T}"/debug.sources \
+		-l "${tmpdir}/sources/${x##*/}.${BASHPID}" \
 		"${x}")
 }
 
-# Usage: save_elf_debug <elf>
+# Usage: save_elf_debug <elf> [splitdebug file]
 save_elf_debug() {
 	${FEATURES_splitdebug} || return 0
 
@@ -125,6 +116,7 @@ save_elf_debug() {
 	# twice in this path) in order for gdb's debug-file-directory
 	# lookup to work correctly.
 	local x=$1
+	local splitdebug=$2
 	local y=${ED}usr/lib/debug/${x:${#D}}.debug
 
 	# dont save debug info twice
@@ -137,8 +129,8 @@ save_elf_debug() {
 		ln "${ED}usr/lib/debug/${!inode:${#D}}.debug" "${y}"
 	else
 		eval ${inode}=\${x}
-		if [[ -e ${T}/prepstrip.split.debug ]] ; then
-			mv "${T}"/prepstrip.split.debug "${y}"
+		if [[ -n ${splitdebug} ]] ; then
+			mv "${splitdebug}" "${y}"
 		else
 			local objcopy_flags="--only-keep-debug"
 			${FEATURES_compressdebug} && objcopy_flags+=" --compress-debug-sections"
@@ -175,11 +167,13 @@ process_elf() {
 	if ${strip_this} ; then
 		# see if we can split & strip at the same time
 		if [[ -n ${SPLIT_STRIP_FLAGS} ]] ; then
+			local shortname="${x##*/}.debug"
+			local splitdebug="${tmpdir}/splitdebug/${shortname}.${BASHPID}"
 			${STRIP} ${strip_flags} \
-				-f "${T}"/prepstrip.split.debug \
-				-F "${x##*/}.debug" \
+				-f "${splitdebug}" \
+				-F "${shortname}" \
 				"${x}"
-			save_elf_debug "${x}"
+			save_elf_debug "${x}" "${splitdebug}"
 		else
 			save_elf_debug "${x}"
 			${STRIP} ${strip_flags} "${x}"
@@ -194,8 +188,8 @@ if ! ${RESTRICT_binchecks} && ! ${RESTRICT_strip} ; then
 	# We need to do the non-stripped scan serially first before we turn around
 	# and start stripping the files ourselves.  The log parsing can be done in
 	# parallel though.
-	log=$T/scanelf-already-stripped.log
-	scanelf -yqRBF '#k%F' -k '!.symtab' "$@" | sed -e "s#^${ED}##" > "$log"
+	log=${tmpdir}/scanelf-already-stripped.log
+	scanelf -yqRBF '#k%F' -k '!.symtab' "$@" | sed -e "s#^${ED}##" > "${log}"
 	(
 	multijob_child_init
 	qa_var="QA_PRESTRIPPED_${ARCH/-/_}"
@@ -286,9 +280,11 @@ do
 	multijob_post_fork
 done
 
-# Let jobs finish before processing ${T}/debug.sources
+# With a bit more work, we could run the rsync processes below in
+# parallel, but not sure that'd be an overall improvement.
 multijob_finish
 
+cat "${tmpdir}"/sources/* > "${tmpdir}/debug.sources" 2>/dev/null
 if [[ -s ${T}/debug.sources ]] && \
    ${FEATURES_installsources} && \
    ! ${RESTRICT_installsources} && \



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-05-14 20:53 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-05-14 20:53 UTC (permalink / raw
  To: gentoo-commits

commit:     931d0a0f6e9009fab646632c47ea8738576aa27e
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon May 14 20:53:36 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon May 14 20:53:36 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=931d0a0f

prepstrip: fix hardlink handling for subshells

---
 bin/ebuild-helpers/prepstrip |   34 +++++++++++++++++++++++-----------
 1 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index a58a83b..4a479ba 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -69,14 +69,15 @@ tmpdir="${T}/prepstrip"
 rm -rf "${tmpdir}"
 mkdir -p "${tmpdir}"/{splitdebug,sources}
 
-unset ${!INODE_*}
+mkdir "${T}"/prepstrip.split.debug.inodes || die
 
 # Usage: inode_var_name: <file>
-inode_var_name() {
+inode_file_link() {
+	echo -n "${T}"/prepstrip.split.debug.inodes/
 	if  [[ ${USERLAND} == "BSD" ]] ; then
-		stat -f 'INODE_%d_%i' "$1"
+		stat -f '%i' "$1"
 	else
-		stat -c 'INODE_%d_%i' "$1"
+		stat -c '%i' "$1"
 	fi
 }
 
@@ -93,9 +94,13 @@ save_elf_sources() {
 		return 0
 	fi
 
-	local x=$1
-	local inode=$(inode_var_name "${x}")
-	[[ -n ${!inode} ]] && return 0
+	local x=$1 y inode=$(inode_file_link "${x}")
+	if [[ -f ${inode} ]] ; then
+		y=${ED}usr/lib/debug/${x:${#D}}.debug
+		mkdir -p "${y%/*}"
+		ln "${inode}" "${y}"
+		return 0
+	fi
 
 	# since we're editing the ELF here, we should recompute the build-id
 	# (the -i flag below).  save that output so we don't need to recompute
@@ -124,11 +129,10 @@ save_elf_debug() {
 
 	mkdir -p "${y%/*}"
 
-	local inode=$(inode_var_name "${x}")
-	if [[ -n ${!inode} ]] ; then
-		ln "${ED}usr/lib/debug/${!inode:${#D}}.debug" "${y}"
+	local inode=$(inode_file_link "${x}")
+	if [[ -f ${inode} ]] ; then
+		ln "${inode}" "${y}"
 	else
-		eval ${inode}=\${x}
 		if [[ -n ${splitdebug} ]] ; then
 			mv "${splitdebug}" "${y}"
 		else
@@ -140,6 +144,12 @@ save_elf_debug() {
 		local args="a-x,o-w"
 		[[ -g ${x} || -u ${x} ]] && args+=",go-r"
 		chmod ${args} "${y}"
+		if ! ln "${y}" "${inode}" ; then
+			# This means a parallel process has already created the
+			# inode link. So, replace ${y} with a link to that inode.
+			rm -f "${y}"
+			ln "${inode}" "${y}"
+		fi
 	fi
 
 	# if we don't already have build-id from debugedit, look it up
@@ -284,6 +294,8 @@ done
 # parallel, but not sure that'd be an overall improvement.
 multijob_finish
 
+rm -rf "${T}"/prepstrip.split.debug.inodes
+
 cat "${tmpdir}"/sources/* > "${tmpdir}/debug.sources" 2>/dev/null
 if [[ -s ${T}/debug.sources ]] && \
    ${FEATURES_installsources} && \



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-05-14 21:11 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-05-14 21:11 UTC (permalink / raw
  To: gentoo-commits

commit:     72fad479b79ff9cb81b65a552fcd2ccaedbdaef7
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon May 14 20:53:36 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon May 14 21:11:02 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=72fad479

prepstrip: fix hardlink handling for subshells

---
 bin/ebuild-helpers/prepstrip |   36 +++++++++++++++++++++++-------------
 1 files changed, 23 insertions(+), 13 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index a58a83b..c00fb37 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -67,16 +67,15 @@ multijob_init
 # Setup $T filesystem layout that we care about.
 tmpdir="${T}/prepstrip"
 rm -rf "${tmpdir}"
-mkdir -p "${tmpdir}"/{splitdebug,sources}
-
-unset ${!INODE_*}
+mkdir -p "${tmpdir}"/{inodes,splitdebug,sources}
 
 # Usage: inode_var_name: <file>
-inode_var_name() {
+inode_file_link() {
+	echo -n "${tmpdir}/inodes/"
 	if  [[ ${USERLAND} == "BSD" ]] ; then
-		stat -f 'INODE_%d_%i' "$1"
+		stat -f '%i' "$1"
 	else
-		stat -c 'INODE_%d_%i' "$1"
+		stat -c '%i' "$1"
 	fi
 }
 
@@ -93,9 +92,13 @@ save_elf_sources() {
 		return 0
 	fi
 
-	local x=$1
-	local inode=$(inode_var_name "${x}")
-	[[ -n ${!inode} ]] && return 0
+	local x=$1 y inode=$(inode_file_link "${x}")
+	if [[ -f ${inode} ]] ; then
+		y=${ED}usr/lib/debug/${x:${#D}}.debug
+		mkdir -p "${y%/*}"
+		ln "${inode}" "${y}"
+		return 0
+	fi
 
 	# since we're editing the ELF here, we should recompute the build-id
 	# (the -i flag below).  save that output so we don't need to recompute
@@ -124,11 +127,10 @@ save_elf_debug() {
 
 	mkdir -p "${y%/*}"
 
-	local inode=$(inode_var_name "${x}")
-	if [[ -n ${!inode} ]] ; then
-		ln "${ED}usr/lib/debug/${!inode:${#D}}.debug" "${y}"
+	local inode=$(inode_file_link "${x}")
+	if [[ -f ${inode} ]] ; then
+		ln "${inode}" "${y}"
 	else
-		eval ${inode}=\${x}
 		if [[ -n ${splitdebug} ]] ; then
 			mv "${splitdebug}" "${y}"
 		else
@@ -140,6 +142,12 @@ save_elf_debug() {
 		local args="a-x,o-w"
 		[[ -g ${x} || -u ${x} ]] && args+=",go-r"
 		chmod ${args} "${y}"
+		if ! ln "${y}" "${inode}" ; then
+			# This means a parallel process has already created the
+			# inode link. So, replace ${y} with a link to that inode.
+			rm -f "${y}"
+			ln "${inode}" "${y}"
+		fi
 	fi
 
 	# if we don't already have build-id from debugedit, look it up
@@ -304,3 +312,5 @@ then
 		>> "${emptydir}"/.keepdir
 	done < <(find "${D}${prepstrip_sources_dir}/" -type d -empty -print0)
 fi
+
+rm -rf "${tmpdir}"



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-05-14 22:03 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-05-14 22:03 UTC (permalink / raw
  To: gentoo-commits

commit:     ad944275b88a50d2a1f694826b127cceb9221e78
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon May 14 20:53:36 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon May 14 22:02:38 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ad944275

prepstrip: fix hardlink handling for subshells

---
 bin/ebuild-helpers/prepstrip |   29 +++++++++++++++++------------
 1 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index a58a83b..6f2c742 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -67,16 +67,15 @@ multijob_init
 # Setup $T filesystem layout that we care about.
 tmpdir="${T}/prepstrip"
 rm -rf "${tmpdir}"
-mkdir -p "${tmpdir}"/{splitdebug,sources}
-
-unset ${!INODE_*}
+mkdir -p "${tmpdir}"/{inodes,splitdebug,sources}
 
 # Usage: inode_var_name: <file>
-inode_var_name() {
+inode_file_link() {
+	echo -n "${tmpdir}/inodes/"
 	if  [[ ${USERLAND} == "BSD" ]] ; then
-		stat -f 'INODE_%d_%i' "$1"
+		stat -f '%i' "$1"
 	else
-		stat -c 'INODE_%d_%i' "$1"
+		stat -c '%i' "$1"
 	fi
 }
 
@@ -94,8 +93,7 @@ save_elf_sources() {
 	fi
 
 	local x=$1
-	local inode=$(inode_var_name "${x}")
-	[[ -n ${!inode} ]] && return 0
+	[[ -f $(inode_file_link "${x}") ]] && return 0
 
 	# since we're editing the ELF here, we should recompute the build-id
 	# (the -i flag below).  save that output so we don't need to recompute
@@ -124,11 +122,10 @@ save_elf_debug() {
 
 	mkdir -p "${y%/*}"
 
-	local inode=$(inode_var_name "${x}")
-	if [[ -n ${!inode} ]] ; then
-		ln "${ED}usr/lib/debug/${!inode:${#D}}.debug" "${y}"
+	local inode=$(inode_file_link "${x}")
+	if [[ -f ${inode} ]] ; then
+		ln "${inode}" "${y}"
 	else
-		eval ${inode}=\${x}
 		if [[ -n ${splitdebug} ]] ; then
 			mv "${splitdebug}" "${y}"
 		else
@@ -140,6 +137,12 @@ save_elf_debug() {
 		local args="a-x,o-w"
 		[[ -g ${x} || -u ${x} ]] && args+=",go-r"
 		chmod ${args} "${y}"
+		if ! ln "${y}" "${inode}" ; then
+			# This means a parallel process has already created the
+			# inode link. So, replace ${y} with a link to that inode.
+			rm -f "${y}"
+			ln "${inode}" "${y}"
+		fi
 	fi
 
 	# if we don't already have build-id from debugedit, look it up
@@ -304,3 +307,5 @@ then
 		>> "${emptydir}"/.keepdir
 	done < <(find "${D}${prepstrip_sources_dir}/" -type d -empty -print0)
 fi
+
+rm -rf "${tmpdir}"



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-05-14 22:38 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-05-14 22:38 UTC (permalink / raw
  To: gentoo-commits

commit:     9ed00a9e70a3705164a5349145ff467e5c40ddfd
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon May 14 22:38:00 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon May 14 22:38:00 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9ed00a9e

prepstrip: fix hardlink race in process_elf

---
 bin/ebuild-helpers/prepstrip |   22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 6f2c742..deb5cab 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -137,12 +137,7 @@ save_elf_debug() {
 		local args="a-x,o-w"
 		[[ -g ${x} || -u ${x} ]] && args+=",go-r"
 		chmod ${args} "${y}"
-		if ! ln "${y}" "${inode}" ; then
-			# This means a parallel process has already created the
-			# inode link. So, replace ${y} with a link to that inode.
-			rm -f "${y}"
-			ln "${inode}" "${y}"
-		fi
+		ln "${y}" "${inode}"
 	fi
 
 	# if we don't already have build-id from debugedit, look it up
@@ -168,6 +163,20 @@ process_elf() {
 	save_elf_sources "${x}"
 
 	if ${strip_this} ; then
+
+		# If two processes try to strip the same hardlink at the same
+		# time, it will cause one of them to lose the splitdebug info.
+		# So, use a lockfile to prevent interference (easily observed
+		# with dev-vcs/git which creates ~109 hardlinks to one file in
+		# /usr/libexec/git-core).
+		local lockfile=$(inode_file_link "${x}")_lockfile
+		if ! ln "${x}" "${lockfile}" ; then
+			while [[ -f ${lockfile} ]] ; do
+				sleep 1
+			done
+			unset lockfile
+		fi
+
 		# see if we can split & strip at the same time
 		if [[ -n ${SPLIT_STRIP_FLAGS} ]] ; then
 			local shortname="${x##*/}.debug"
@@ -181,6 +190,7 @@ process_elf() {
 			save_elf_debug "${x}"
 			${STRIP} ${strip_flags} "${x}"
 		fi
+		[[ -n ${lockfile} ]] && rm -f "${lockfile}"
 	fi
 }
 



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-05-14 22:56 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-05-14 22:56 UTC (permalink / raw
  To: gentoo-commits

commit:     dd0d2264225c44503283bd1d144815167d245be6
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon May 14 22:50:31 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon May 14 22:55:30 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=dd0d2264

prepstrip: fix installsources breakage

The debug.sources path changed in commit
4941c3c674400116f118a9c75b520c3fd1a25490.

---
 bin/ebuild-helpers/prepstrip |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index deb5cab..85d5d6a 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -297,15 +297,15 @@ done
 # parallel, but not sure that'd be an overall improvement.
 multijob_finish
 
-cat "${tmpdir}"/sources/* > "${tmpdir}/debug.sources" 2>/dev/null
-if [[ -s ${T}/debug.sources ]] && \
+cd "${tmpdir}"/sources/ && cat * > "${tmpdir}/debug.sources" 2>/dev/null
+if [[ -s ${tmpdir}/debug.sources ]] && \
    ${FEATURES_installsources} && \
    ! ${RESTRICT_installsources} && \
    ${debugedit_found}
 then
 	vecho "installsources: rsyncing source files"
 	[[ -d ${D}${prepstrip_sources_dir} ]] || mkdir -p "${D}${prepstrip_sources_dir}"
-	grep -zv '/<[^/>]*>$' "${T}"/debug.sources | \
+	grep -zv '/<[^/>]*>$' "${tmpdir}"/debug.sources | \
 		(cd "${WORKDIR}"; LANG=C sort -z -u | \
 		rsync -tL0 --files-from=- "${WORKDIR}/" "${D}${prepstrip_sources_dir}/" )
 



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-06-02  2:28 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-06-02  2:28 UTC (permalink / raw
  To: gentoo-commits

commit:     e6d387610ce692dfef3c6a3fc549d29863410176
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Jun  2 02:28:31 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jun  2 02:28:31 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e6d38761

ecompressdir: fix funk_up_dir return value

---
 bin/ebuild-helpers/ecompressdir |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir
index a2c9e52..7d5d432 100755
--- a/bin/ebuild-helpers/ecompressdir
+++ b/bin/ebuild-helpers/ecompressdir
@@ -61,11 +61,11 @@ funk_up_dir() {
 	local negate=""
 	[[ ${act} == "compress" ]] && negate="!"
 
+	local ret=0
 	# first we act on all the files
 	find "${dir}" -type f ${negate} -iname '*'${suffix} -print0 | ${XARGS} -0 ${binary}
 	((ret|=$?))
 
-	find "${dir}" -type l -print0 | \
 	while read -r -d $'\0' brokenlink ; do
 		[[ -e ${brokenlink} ]] && continue
 		olddest=$(readlink "${brokenlink}")
@@ -88,7 +88,8 @@ funk_up_dir() {
 			&& ln -snf "${newdest}" "${brokenlink}${suffix}" \
 			|| ln -snf "${newdest}" "${brokenlink%${suffix}}"
 		((ret|=$?))
-	done
+	done < <(find "${dir}" -type l -print0)
+	return ${ret}
 }
 
 # _relocate_skip_dirs(srctree, dsttree)
@@ -170,6 +171,7 @@ for dir in "$@" ; do
 	if [[ -n ${suffix} ]] ; then
 		vecho "${0##*/}: $(ecompress --bin) /${actual_dir#${ED}}"
 		funk_up_dir "compress" "${suffix}" "ecompress"
+		: $(( ret |= $? ))
 	fi
 
 	# finally, restore the skipped stuff



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-06-02  2:37 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-06-02  2:37 UTC (permalink / raw
  To: gentoo-commits

commit:     bbacf8674168cf033de0ccb161f568d0b26f032b
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Jun  2 02:36:52 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jun  2 02:36:52 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=bbacf867

ecompressdir: fix ln -s for bug #418309

This fixes parallel funk_up_dir decompress calls so that they don't
inappropriately compete with eachother to fix the same broken symlinks.

---
 bin/ebuild-helpers/ecompressdir |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir
index 7d5d432..f39f883 100755
--- a/bin/ebuild-helpers/ecompressdir
+++ b/bin/ebuild-helpers/ecompressdir
@@ -80,9 +80,13 @@ funk_up_dir() {
 			skip_dir_dest=${T}/ecompress-skip/${actual_dir#${ED}}/${brokenlink%/*}/${olddest}
 		fi
 		[[ -e ${skip_dir_dest} ]] && continue
-		[[ ${act} == "compress" ]] \
-			&& newdest="${olddest}${suffix}" \
-			|| newdest="${olddest%${suffix}}"
+		if [[ ${act} == "compress" ]] ; then
+			newdest=${olddest}${suffix}
+		else
+			[[ ${olddest} == *${suffix} ]] || continue
+			newdest=${olddest%${suffix}}
+		fi
+		[[ -f ${newdest} ]] || continue
 		rm -f "${brokenlink}"
 		[[ ${act} == "compress" ]] \
 			&& ln -snf "${newdest}" "${brokenlink}${suffix}" \



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-06-02  2:45 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-06-02  2:45 UTC (permalink / raw
  To: gentoo-commits

commit:     27d7b258d23069f874ad8eceb35f58829cee85f3
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Jun  2 02:45:37 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jun  2 02:45:37 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=27d7b258

ecompressdir: avoid ecompress.break interference

---
 bin/ebuild-helpers/ecompressdir |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir
index f39f883..c77d998 100755
--- a/bin/ebuild-helpers/ecompressdir
+++ b/bin/ebuild-helpers/ecompressdir
@@ -164,13 +164,13 @@ for dir in "$@" ; do
 		: $(( ret |= $? ))
 	done
 
+	multijob_finish
+	: $(( ret |= $? ))
+
 	# forcibly break all hard links as some compressors whine about it
 	find "${dir}" -type f -links +1 -exec env file="{}" sh -c \
 		'cp -p "${file}" "${file}.ecompress.break" ; mv -f "${file}.ecompress.break" "${file}"' \;
 
-	multijob_finish
-	: $(( ret |= $? ))
-
 	# now lets do our work
 	if [[ -n ${suffix} ]] ; then
 		vecho "${0##*/}: $(ecompress --bin) /${actual_dir#${ED}}"



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-06-02  4:06 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-06-02  4:06 UTC (permalink / raw
  To: gentoo-commits

commit:     9b2e4d5a48e17ae1a637c6de7a311cd9055dd02e
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Jun  2 04:06:14 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jun  2 04:06:14 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9b2e4d5a

ecompressdir: fix brokenlink newdest logic

Was broken in commit bbacf8674168cf033de0ccb161f568d0b26f032b.

---
 bin/ebuild-helpers/ecompressdir |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir
index c77d998..6801a07 100755
--- a/bin/ebuild-helpers/ecompressdir
+++ b/bin/ebuild-helpers/ecompressdir
@@ -86,7 +86,11 @@ funk_up_dir() {
 			[[ ${olddest} == *${suffix} ]] || continue
 			newdest=${olddest%${suffix}}
 		fi
-		[[ -f ${newdest} ]] || continue
+		if [[ "${newdest}" == /* ]] ; then
+			[[ -f "${D}${newdest}" ]] || continue
+		else
+			[[ -f "${dir}/${brokenlink%/*}/${newdest}" ]] || continue
+		fi
 		rm -f "${brokenlink}"
 		[[ ${act} == "compress" ]] \
 			&& ln -snf "${newdest}" "${brokenlink}${suffix}" \



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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-07-15 21:29 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-07-15 21:29 UTC (permalink / raw
  To: gentoo-commits

commit:     484d2df3fb2f65414746dbb85fa81d99f374648f
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 15 21:29:20 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Jul 15 21:29:20 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=484d2df3

prepstrip: avoid rm warning about cwd

---
 bin/ebuild-helpers/prepstrip |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 85d5d6a..fe5c1bc 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -318,4 +318,5 @@ then
 	done < <(find "${D}${prepstrip_sources_dir}/" -type d -empty -print0)
 fi
 
+cd "${T}"
 rm -rf "${tmpdir}"



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

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

commit:     a1c6b4cf64735c65ffc64706d0f4e4733cd59562
Author:     Nico Roeser <n-roeser <AT> gmx <DOT> net>
AuthorDate: Sat Aug 11 19:11:06 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Aug 11 19:11:06 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a1c6b4cf

installsources: fix file permissions, bug #430962

---
 bin/ebuild-helpers/prepstrip |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index fe5c1bc..bbcfac2 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -307,7 +307,7 @@ then
 	[[ -d ${D}${prepstrip_sources_dir} ]] || mkdir -p "${D}${prepstrip_sources_dir}"
 	grep -zv '/<[^/>]*>$' "${tmpdir}"/debug.sources | \
 		(cd "${WORKDIR}"; LANG=C sort -z -u | \
-		rsync -tL0 --files-from=- "${WORKDIR}/" "${D}${prepstrip_sources_dir}/" )
+		rsync -tL0 --chmod=ugo-st,a+r,go-w,Da+x,Fa-x --files-from=- "${WORKDIR}/" "${D}${prepstrip_sources_dir}/" )
 
 	# Preserve directory structure.
 	# Needed after running save_elf_sources.


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-08-23 22:29 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-08-23 22:29 UTC (permalink / raw
  To: gentoo-commits

commit:     c74972c6b1e30232ab961f0206cdee81b7e4c5f5
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 23 22:29:35 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Aug 23 22:29:35 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c74972c6

prepstrip: avoid debugedit/strip interference

This will fix bug #421099.

---
 bin/ebuild-helpers/prepstrip |   30 ++++++++++++++++--------------
 1 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index bbcfac2..5f87482 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -160,23 +160,24 @@ process_elf() {
 	local x=$1 strip_flags=${*:2}
 
 	vecho "   ${x:${#ED}}"
+
+	# If two processes try to debugedit or strip the same hardlink at the
+	# same time, it may corrupt files or cause loss of splitdebug info.
+	# So, use a lockfile to prevent interference (easily observed with
+	# dev-vcs/git which creates ~111 hardlinks to one file in
+	# /usr/libexec/git-core).
+	local lockfile=$(inode_file_link "${x}")_lockfile
+	if ! ln "${x}" "${lockfile}" 2>/dev/null ; then
+		while [[ -f ${lockfile} ]] ; do
+			sleep 1
+		done
+		unset lockfile
+	fi
+
 	save_elf_sources "${x}"
 
 	if ${strip_this} ; then
 
-		# If two processes try to strip the same hardlink at the same
-		# time, it will cause one of them to lose the splitdebug info.
-		# So, use a lockfile to prevent interference (easily observed
-		# with dev-vcs/git which creates ~109 hardlinks to one file in
-		# /usr/libexec/git-core).
-		local lockfile=$(inode_file_link "${x}")_lockfile
-		if ! ln "${x}" "${lockfile}" ; then
-			while [[ -f ${lockfile} ]] ; do
-				sleep 1
-			done
-			unset lockfile
-		fi
-
 		# see if we can split & strip at the same time
 		if [[ -n ${SPLIT_STRIP_FLAGS} ]] ; then
 			local shortname="${x##*/}.debug"
@@ -190,8 +191,9 @@ process_elf() {
 			save_elf_debug "${x}"
 			${STRIP} ${strip_flags} "${x}"
 		fi
-		[[ -n ${lockfile} ]] && rm -f "${lockfile}"
 	fi
+
+	[[ -n ${lockfile} ]] && rm -f "${lockfile}"
 }
 
 # The existance of the section .symtab tells us that a binary is stripped.


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-08-25 19:46 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-08-25 19:46 UTC (permalink / raw
  To: gentoo-commits

commit:     2ce290c1ff61bb6688f27858ae32db82b0030619
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 25 19:45:21 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Aug 25 19:45:21 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2ce290c1

new*: symlink to generic newins implementation

---
 bin/ebuild-helpers/newbin    |   23 +----------------------
 bin/ebuild-helpers/newconfd  |   23 +----------------------
 bin/ebuild-helpers/newdoc    |   23 +----------------------
 bin/ebuild-helpers/newenvd   |   23 +----------------------
 bin/ebuild-helpers/newexe    |   23 +----------------------
 bin/ebuild-helpers/newinitd  |   23 +----------------------
 bin/ebuild-helpers/newlib.a  |   23 +----------------------
 bin/ebuild-helpers/newlib.so |   23 +----------------------
 bin/ebuild-helpers/newman    |   23 +----------------------
 bin/ebuild-helpers/newsbin   |   23 +----------------------
 10 files changed, 10 insertions(+), 220 deletions(-)

diff --git a/bin/ebuild-helpers/newbin b/bin/ebuild-helpers/newbin
deleted file mode 100755
index bf98744..0000000
--- a/bin/ebuild-helpers/newbin
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-
-if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-	helpers_die "${0##*/}: Need two arguments, old file and new file"
-	exit 1
-fi
-
-if [ ! -e "$1" ] ; then
-	helpers_die "!!! ${0##*/}: $1 does not exist"
-	exit 1
-fi
-
-(($#>2)) && \
-	eqawarn "QA Notice: ${0##*/} called with more than 2 arguments: ${@:3}"
-
-rm -rf "${T}/${2}" && \
-cp -f "${1}" "${T}/${2}" && \
-exec dobin "${T}/${2}"

diff --git a/bin/ebuild-helpers/newbin b/bin/ebuild-helpers/newbin
new file mode 120000
index 0000000..59a0db2
--- /dev/null
+++ b/bin/ebuild-helpers/newbin
@@ -0,0 +1 @@
+newins
\ No newline at end of file

diff --git a/bin/ebuild-helpers/newconfd b/bin/ebuild-helpers/newconfd
deleted file mode 100755
index fa3710d..0000000
--- a/bin/ebuild-helpers/newconfd
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-
-if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-	helpers_die "${0##*/}: Need two arguments, old file and new file"
-	exit 1
-fi
-
-if [ ! -e "$1" ] ; then
-	helpers_die "!!! ${0##*/}: $1 does not exist"
-	exit 1
-fi
-
-(($#>2)) && \
-	eqawarn "QA Notice: ${0##*/} called with more than 2 arguments: ${@:3}"
-
-rm -rf "${T}/${2}" && \
-cp -f "${1}" "${T}/${2}" && \
-exec doconfd "${T}/${2}"

diff --git a/bin/ebuild-helpers/newconfd b/bin/ebuild-helpers/newconfd
new file mode 120000
index 0000000..59a0db2
--- /dev/null
+++ b/bin/ebuild-helpers/newconfd
@@ -0,0 +1 @@
+newins
\ No newline at end of file

diff --git a/bin/ebuild-helpers/newdoc b/bin/ebuild-helpers/newdoc
deleted file mode 100755
index df6fb1d..0000000
--- a/bin/ebuild-helpers/newdoc
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-
-if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-	helpers_die "${0##*/}: Need two arguments, old file and new file"
-	exit 1
-fi
-
-if [ ! -e "$1" ] ; then
-	helpers_die "!!! ${0##*/}: $1 does not exist"
-	exit 1
-fi
-
-(($#>2)) && \
-	eqawarn "QA Notice: ${0##*/} called with more than 2 arguments: ${@:3}"
-
-rm -rf "${T}/${2}" && \
-cp -f "${1}" "${T}/${2}" && \
-exec dodoc "${T}/${2}"

diff --git a/bin/ebuild-helpers/newdoc b/bin/ebuild-helpers/newdoc
new file mode 120000
index 0000000..59a0db2
--- /dev/null
+++ b/bin/ebuild-helpers/newdoc
@@ -0,0 +1 @@
+newins
\ No newline at end of file

diff --git a/bin/ebuild-helpers/newenvd b/bin/ebuild-helpers/newenvd
deleted file mode 100755
index c54af05..0000000
--- a/bin/ebuild-helpers/newenvd
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-
-if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-	helpers_die "${0##*/}: Need two arguments, old file and new file"
-	exit 1
-fi
-
-if [ ! -e "$1" ] ; then
-	helpers_die "!!! ${0##*/}: $1 does not exist"
-	exit 1
-fi
-
-(($#>2)) && \
-	eqawarn "QA Notice: ${0##*/} called with more than 2 arguments: ${@:3}"
-
-rm -rf "${T}/${2}" && \
-cp -f "${1}" "${T}/${2}" && \
-exec doenvd "${T}/${2}"

diff --git a/bin/ebuild-helpers/newenvd b/bin/ebuild-helpers/newenvd
new file mode 120000
index 0000000..59a0db2
--- /dev/null
+++ b/bin/ebuild-helpers/newenvd
@@ -0,0 +1 @@
+newins
\ No newline at end of file

diff --git a/bin/ebuild-helpers/newexe b/bin/ebuild-helpers/newexe
deleted file mode 100755
index 9bcf64b..0000000
--- a/bin/ebuild-helpers/newexe
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-
-if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-	helpers_die "${0##*/}: Need two arguments, old file and new file"
-	exit 1
-fi
-
-if [ ! -e "$1" ] ; then
-	helpers_die "!!! ${0##*/}: $1 does not exist"
-	exit 1
-fi
-
-(($#>2)) && \
-	eqawarn "QA Notice: ${0##*/} called with more than 2 arguments: ${@:3}"
-
-rm -rf "${T}/${2}" && \
-cp -f "${1}" "${T}/${2}" && \
-exec doexe "${T}/${2}"

diff --git a/bin/ebuild-helpers/newexe b/bin/ebuild-helpers/newexe
new file mode 120000
index 0000000..59a0db2
--- /dev/null
+++ b/bin/ebuild-helpers/newexe
@@ -0,0 +1 @@
+newins
\ No newline at end of file

diff --git a/bin/ebuild-helpers/newinitd b/bin/ebuild-helpers/newinitd
deleted file mode 100755
index 03bbe68..0000000
--- a/bin/ebuild-helpers/newinitd
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-
-if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-	helpers_die "${0##*/}: Need two arguments, old file and new file"
-	exit 1
-fi
-
-if [ ! -e "$1" ] ; then
-	helpers_die "!!! ${0##*/}: $1 does not exist"
-	exit 1
-fi
-
-(($#>2)) && \
-	eqawarn "QA Notice: ${0##*/} called with more than 2 arguments: ${@:3}"
-
-rm -rf "${T}/${2}" && \
-cp -f "${1}" "${T}/${2}" && \
-exec doinitd "${T}/${2}"

diff --git a/bin/ebuild-helpers/newinitd b/bin/ebuild-helpers/newinitd
new file mode 120000
index 0000000..59a0db2
--- /dev/null
+++ b/bin/ebuild-helpers/newinitd
@@ -0,0 +1 @@
+newins
\ No newline at end of file

diff --git a/bin/ebuild-helpers/newlib.a b/bin/ebuild-helpers/newlib.a
deleted file mode 100755
index 7ff8195..0000000
--- a/bin/ebuild-helpers/newlib.a
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-
-if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-	helpers_die "${0##*/}: Need two arguments, old file and new file"
-	exit 1
-fi
-
-if [ ! -e "$1" ] ; then
-	helpers_die "!!! ${0##*/}: $1 does not exist"
-	exit 1
-fi
-
-(($#>2)) && \
-	eqawarn "QA Notice: ${0##*/} called with more than 2 arguments: ${@:3}"
-
-rm -rf "${T}/${2}" && \
-cp -f "${1}" "${T}/${2}" && \
-exec dolib.a "${T}/${2}"

diff --git a/bin/ebuild-helpers/newlib.a b/bin/ebuild-helpers/newlib.a
new file mode 120000
index 0000000..59a0db2
--- /dev/null
+++ b/bin/ebuild-helpers/newlib.a
@@ -0,0 +1 @@
+newins
\ No newline at end of file

diff --git a/bin/ebuild-helpers/newlib.so b/bin/ebuild-helpers/newlib.so
deleted file mode 100755
index fd4c097..0000000
--- a/bin/ebuild-helpers/newlib.so
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-
-if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-	helpers_die "${0##*/}: Need two arguments, old file and new file"
-	exit 1
-fi
-
-if [ ! -e "$1" ] ; then
-	helpers_die "!!! ${0##*/}: $1 does not exist"
-	exit 1
-fi
-
-(($#>2)) && \
-	eqawarn "QA Notice: ${0##*/} called with more than 2 arguments: ${@:3}"
-
-rm -rf "${T}/${2}" && \
-cp -f "${1}" "${T}/${2}" && \
-exec dolib.so "${T}/${2}"

diff --git a/bin/ebuild-helpers/newlib.so b/bin/ebuild-helpers/newlib.so
new file mode 120000
index 0000000..59a0db2
--- /dev/null
+++ b/bin/ebuild-helpers/newlib.so
@@ -0,0 +1 @@
+newins
\ No newline at end of file

diff --git a/bin/ebuild-helpers/newman b/bin/ebuild-helpers/newman
deleted file mode 100755
index 889e0f9..0000000
--- a/bin/ebuild-helpers/newman
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-
-if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-	helpers_die "${0##*/}: Need two arguments, old file and new file"
-	exit 1
-fi
-
-if [ ! -e "$1" ] ; then
-	helpers_die "!!! ${0##*/}: $1 does not exist"
-	exit 1
-fi
-
-(($#>2)) && \
-	eqawarn "QA Notice: ${0##*/} called with more than 2 arguments: ${@:3}"
-
-rm -rf "${T}/${2}" && \
-cp -f "${1}" "${T}/${2}" && \
-exec doman "${T}/${2}"

diff --git a/bin/ebuild-helpers/newman b/bin/ebuild-helpers/newman
new file mode 120000
index 0000000..59a0db2
--- /dev/null
+++ b/bin/ebuild-helpers/newman
@@ -0,0 +1 @@
+newins
\ No newline at end of file

diff --git a/bin/ebuild-helpers/newsbin b/bin/ebuild-helpers/newsbin
deleted file mode 100755
index 9df0af2..0000000
--- a/bin/ebuild-helpers/newsbin
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-
-if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-	helpers_die "${0##*/}: Need two arguments, old file and new file"
-	exit 1
-fi
-
-if [ ! -e "$1" ] ; then
-	helpers_die "!!! ${0##*/}: $1 does not exist"
-	exit 1
-fi
-
-(($#>2)) && \
-	eqawarn "QA Notice: ${0##*/} called with more than 2 arguments: ${@:3}"
-
-rm -rf "${T}/${2}" && \
-cp -f "${1}" "${T}/${2}" && \
-exec dosbin "${T}/${2}"

diff --git a/bin/ebuild-helpers/newsbin b/bin/ebuild-helpers/newsbin
new file mode 120000
index 0000000..59a0db2
--- /dev/null
+++ b/bin/ebuild-helpers/newsbin
@@ -0,0 +1 @@
+newins
\ No newline at end of file


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-08-25 19:46 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-08-25 19:46 UTC (permalink / raw
  To: gentoo-commits

commit:     a60b86d4af93b066345c8c8cea5c5c91ab26ce44
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 25 19:42:28 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Aug 25 19:42:28 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a60b86d4

newins: become generic so new* can be symlinks

---
 bin/ebuild-helpers/newins |   39 ++++++++++++++++++++-------------------
 1 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/bin/ebuild-helpers/newins b/bin/ebuild-helpers/newins
index b5b3ff6..345c229 100755
--- a/bin/ebuild-helpers/newins
+++ b/bin/ebuild-helpers/newins
@@ -4,35 +4,36 @@
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
+helper=${0##*/}
+
 if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
-	helpers_die "${0##*/}: Need two arguments, old file and new file"
+	helpers_die "${helper}: Need two arguments, old file and new file"
 	exit 1
 fi
 
 if [ ! -e "$1" ] ; then
-	helpers_die "!!! ${0##*/}: $1 does not exist"
+	helpers_die "!!! ${helper}: $1 does not exist"
 	exit 1
 fi
 
 (($#>2)) && \
-	eqawarn "QA Notice: ${0##*/} called with more than 2 arguments: ${@:3}"
+	eqawarn "QA Notice: ${helper} called with more than 2 arguments: ${@:3}"
+
+cp_args="-f"
+if [[ ${helper} == newins ]] ; then
+	case "${EAPI}" in
+		0|1|2|3)
+			;;
+		*)
+			cp_args+=" -P"
+			;;
+	esac
+fi
 
-rm -rf "${T}/${2}" || exit $?
-case "$EAPI" in
-	0|1|2|3)
-		cp "$1" "$T/$2" || exit $?
-		;;
-	*)
-		cp -P "$1" "$T/$2"
-		ret=$?
-		if [[ $ret -ne 0 ]] ; then
-			helpers_die "${0##*/} failed"
-			exit $ret
-		fi
-		;;
-esac
-doins "${T}/${2}"
+rm -rf "${T}/$2" && \
+cp ${cp_args} "$1" "${T}/$2" && \
+do${helper#new} "${T}/$2"
 ret=$?
 rm -rf "${T}/${2}"
-[[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
+[[ $ret -ne 0 ]] && helpers_die "${helper} failed"
 exit $ret


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-08-25 20:01 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-08-25 20:01 UTC (permalink / raw
  To: gentoo-commits

commit:     ffe2a5b5f70be05565b5a3038637805319088743
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 25 20:00:51 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Aug 25 20:00:51 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ffe2a5b5

EAPI 5: new* commands can read from stdin, bug 263565.

---
 bin/ebuild-helpers/newins |   55 +++++++++++++++++++++++++++++++-------------
 1 files changed, 39 insertions(+), 16 deletions(-)

diff --git a/bin/ebuild-helpers/newins b/bin/ebuild-helpers/newins
index 345c229..cf6436b 100755
--- a/bin/ebuild-helpers/newins
+++ b/bin/ebuild-helpers/newins
@@ -11,27 +11,50 @@ if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
 	exit 1
 fi
 
-if [ ! -e "$1" ] ; then
-	helpers_die "!!! ${helper}: $1 does not exist"
-	exit 1
-fi
-
 (($#>2)) && \
 	eqawarn "QA Notice: ${helper} called with more than 2 arguments: ${@:3}"
 
-cp_args="-f"
-if [[ ${helper} == newins ]] ; then
-	case "${EAPI}" in
-		0|1|2|3)
-			;;
-		*)
-			cp_args+=" -P"
-			;;
-	esac
+stdin=
+case ${EAPI} in
+	0|1|2|3|4|4-python|4-slot-abi) ;;
+	*) [[ $1 = "-" ]] && stdin=yes ;;
+ esac
+
+rm -rf "${T}/$2"
+
+if [[ ${stdin} ]] ; then
+	if [[ -t 0 ]] ; then
+		helpers_die "!!! ${helper}: Input is from a terminal"
+		exit 1
+	fi
+	cat > "${T}/$2"
+	ret=$?
+else
+	if [[ ! -e $1 ]] ; then
+		helpers_die "!!! ${helper}: $1 does not exist"
+		exit 1
+	fi
+
+	cp_args="-f"
+	if [[ ${helper} == newins ]] ; then
+		case "${EAPI}" in
+			0|1|2|3)
+				;;
+			*)
+				cp_args+=" -P"
+				;;
+		esac
+	fi
+
+	cp ${cp_args} "$1" "${T}/$2"
+	ret=$?
+fi
+
+if [[ ${ret} -ne 0 ]] ; then
+	helpers_die "${0##*/} failed"
+	exit ${ret}
 fi
 
-rm -rf "${T}/$2" && \
-cp ${cp_args} "$1" "${T}/$2" && \
 do${helper#new} "${T}/$2"
 ret=$?
 rm -rf "${T}/${2}"


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-08-25 21:13 Ulrich Mueller
  0 siblings, 0 replies; 114+ messages in thread
From: Ulrich Mueller @ 2012-08-25 21:13 UTC (permalink / raw
  To: gentoo-commits

commit:     e5034a4ec9153047c756923d49c0969fb4fb8ed0
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 25 21:21:12 2012 +0000
Commit:     Ulrich Mueller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Aug 25 21:21:12 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e5034a4e

Whitespace.

---
 bin/ebuild-helpers/newins |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/newins b/bin/ebuild-helpers/newins
index cf6436b..2dc041d 100755
--- a/bin/ebuild-helpers/newins
+++ b/bin/ebuild-helpers/newins
@@ -18,7 +18,7 @@ stdin=
 case ${EAPI} in
 	0|1|2|3|4|4-python|4-slot-abi) ;;
 	*) [[ $1 = "-" ]] && stdin=yes ;;
- esac
+esac
 
 rm -rf "${T}/$2"
 


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-08-31 15:21 Ulrich Mueller
  0 siblings, 0 replies; 114+ messages in thread
From: Ulrich Mueller @ 2012-08-31 15:21 UTC (permalink / raw
  To: gentoo-commits

commit:     e7e4c3720582a7ab938266e50e53d162f5248488
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 31 15:10:16 2012 +0000
Commit:     Ulrich Mueller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Aug 31 15:20:16 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e7e4c372

EAPI 5: doheader and newheader helper functions

See bug #21310.

---
 bin/ebuild-helpers/doheader  |   21 +++++++++++++++++++++
 bin/ebuild-helpers/newheader |    1 +
 2 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/bin/ebuild-helpers/doheader b/bin/ebuild-helpers/doheader
new file mode 100755
index 0000000..9bbe5bc
--- /dev/null
+++ b/bin/ebuild-helpers/doheader
@@ -0,0 +1,21 @@
+#!/bin/bash
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+
+case ${EAPI} in
+	0|1|2|3|4|4-python|4-slot-abi)
+		die "${0##*/} is not supported in EAPI ${EAPI}"
+		;;
+esac
+
+if [[ $# -lt 1 ]] ; then
+	helpers_die "${0##*/}: at least one argument needed"
+	exit 1
+fi
+
+exec \
+env \
+INSDESTTREE="/usr/include/" \
+doins "$@"

diff --git a/bin/ebuild-helpers/newheader b/bin/ebuild-helpers/newheader
new file mode 120000
index 0000000..59a0db2
--- /dev/null
+++ b/bin/ebuild-helpers/newheader
@@ -0,0 +1 @@
+newins
\ No newline at end of file


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-09-01 22:51 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-09-01 22:51 UTC (permalink / raw
  To: gentoo-commits

commit:     0b657f683f8498de59cf254dfb016bf313930b1d
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  1 22:51:25 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Sep  1 22:51:25 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0b657f68

ebuild-helpers/sed: use -ef to check recursion

---
 bin/ebuild-helpers/sed |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/ebuild-helpers/sed b/bin/ebuild-helpers/sed
index b21e856..cc44769 100755
--- a/bin/ebuild-helpers/sed
+++ b/bin/ebuild-helpers/sed
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2007 Gentoo Foundation
+# Copyright 2007-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 scriptpath=${BASH_SOURCE[0]}
@@ -14,8 +14,8 @@ else
 	IFS=":"
  
 	for path in $PATH; do
-		[[ ${path}/${scriptname} == ${scriptpath} ]] && continue
 		if [[ -x ${path}/${scriptname} ]]; then
+			[[ ${path}/${scriptname} -ef ${scriptpath} ]] && continue
 			exec ${path}/${scriptname} "$@"
 			exit 0
 		fi


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-09-17  1:27 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-09-17  1:27 UTC (permalink / raw
  To: gentoo-commits

commit:     087fc47e7c98f1c49ab5b873f3b476f8c1e00a17
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 17 01:27:32 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Sep 17 01:27:32 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=087fc47e

doheader: don't count -r as required arg

---
 bin/ebuild-helpers/doheader |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/doheader b/bin/ebuild-helpers/doheader
index fa11564..db3a02d 100755
--- a/bin/ebuild-helpers/doheader
+++ b/bin/ebuild-helpers/doheader
@@ -10,7 +10,7 @@ case "${EAPI}" in
 		;;
 esac
 
-if [[ $# -lt 1 ]] ; then
+if [[ $# -lt 1 ]] || [[ $1 == -r && $# -lt 2 ]] ; then
 	__helpers_die "${0##*/}: at least one argument needed"
 	exit 1
 fi


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-09-26 21:43 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-09-26 21:43 UTC (permalink / raw
  To: gentoo-commits

commit:     690fe8571a827cbe0e807b9c396f0d134d35481e
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 26 21:43:13 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Sep 26 21:43:13 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=690fe857

dodoc: source isolated-functions.sh earlier

This is needed since commit ab46499322311c1faa710c63d0a5339e49a9061a.

---
 bin/ebuild-helpers/dodoc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/ebuild-helpers/dodoc b/bin/ebuild-helpers/dodoc
index bba7903..c551735 100755
--- a/bin/ebuild-helpers/dodoc
+++ b/bin/ebuild-helpers/dodoc
@@ -2,6 +2,8 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+
 if ___eapi_dodoc_supports_-r; then
 	exec \
 	env \
@@ -9,8 +11,6 @@ if ___eapi_dodoc_supports_-r; then
 	doins "$@"
 fi
 
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-
 if [ $# -lt 1 ] ; then
 	__helpers_die "${0##*/}: at least one argument needed"
 	exit 1 	


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-09-27  2:05 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-09-27  2:05 UTC (permalink / raw
  To: gentoo-commits

commit:     d0089063c457ef2adc7b01e7296c4988edb709a6
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 27 02:04:59 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Sep 27 02:04:59 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d0089063

prepalldocs: fix inverted eapi_has_docompress

This broke in commit ab46499322311c1faa710c63d0a5339e49a9061a.

---
 bin/ebuild-helpers/prepalldocs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/prepalldocs b/bin/ebuild-helpers/prepalldocs
index b76f084..3094661 100755
--- a/bin/ebuild-helpers/prepalldocs
+++ b/bin/ebuild-helpers/prepalldocs
@@ -4,7 +4,7 @@
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
-if ! ___eapi_has_docompress; then
+if ___eapi_has_docompress; then
 	die "'${0##*/}' has been banned for EAPI '$EAPI'"
 	exit 1
 fi


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-11-05  2:51 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-11-05  2:51 UTC (permalink / raw
  To: gentoo-commits

commit:     74b7c9d452c97a948852416e1456a3117deec2dc
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  5 02:51:20 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Nov  5 02:51:20 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=74b7c9d4

prepstrip: account for new inode created by strip

Since strip creates a new inode, we need to know the initial set of
inodes in advance, so that we can avoid interference due to trying
to strip the same (hardlinked) file multiple times in parallel.
See bug #421099.

---
 bin/ebuild-helpers/prepstrip |   60 ++++++++++++++++++++++++++++++------------
 1 files changed, 43 insertions(+), 17 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 0d1ce5a..c6bf60e 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -94,7 +94,6 @@ save_elf_sources() {
 	fi
 
 	local x=$1
-	[[ -f $(inode_file_link "${x}") ]] && return 0
 
 	# since we're editing the ELF here, we should recompute the build-id
 	# (the -i flag below).  save that output so we don't need to recompute
@@ -115,7 +114,8 @@ save_elf_debug() {
 	# twice in this path) in order for gdb's debug-file-directory
 	# lookup to work correctly.
 	local x=$1
-	local splitdebug=$2
+	local inode_debug=$2
+	local splitdebug=$3
 	local y=${ED}usr/lib/debug/${x:${#D}}.debug
 
 	# dont save debug info twice
@@ -123,9 +123,8 @@ save_elf_debug() {
 
 	mkdir -p "${y%/*}"
 
-	local inode=$(inode_file_link "${x}")
-	if [[ -f ${inode} ]] ; then
-		ln "${inode}" "${y}"
+	if [ -f "${inode_debug}" ] ; then
+		ln "${inode_debug}" "${y}" || die "ln failed unexpectedly"
 	else
 		if [[ -n ${splitdebug} ]] ; then
 			mv "${splitdebug}" "${y}"
@@ -138,7 +137,7 @@ save_elf_debug() {
 		local args="a-x,o-w"
 		[[ -g ${x} || -u ${x} ]] && args+=",go-r"
 		chmod ${args} "${y}"
-		ln "${y}" "${inode}"
+		ln "${y}" "${inode_debug}" || die "ln failed unexpectedly"
 	fi
 
 	# if we don't already have build-id from debugedit, look it up
@@ -158,7 +157,8 @@ save_elf_debug() {
 
 # Usage: process_elf <elf>
 process_elf() {
-	local x=$1 strip_flags=${*:2}
+	local x=$1 inode_link=$2 strip_flags=${*:3}
+	local already_stripped lockfile
 
 	__vecho "   ${x:${#ED}}"
 
@@ -167,15 +167,17 @@ process_elf() {
 	# So, use a lockfile to prevent interference (easily observed with
 	# dev-vcs/git which creates ~111 hardlinks to one file in
 	# /usr/libexec/git-core).
-	local lockfile=$(inode_file_link "${x}")_lockfile
-	if ! ln "${x}" "${lockfile}" 2>/dev/null ; then
+	lockfile=${inode_link}_lockfile
+	if ! ln "${inode_link}" "${lockfile}" 2>/dev/null ; then
 		while [[ -f ${lockfile} ]] ; do
 			sleep 1
 		done
 		unset lockfile
 	fi
 
-	save_elf_sources "${x}"
+	[ -f "${inode_link}_stripped" ] && already_stripped=true || already_stripped=false
+
+	${already_stripped} || save_elf_sources "${x}"
 
 	if ${strip_this} ; then
 
@@ -183,17 +185,26 @@ process_elf() {
 		if [[ -n ${SPLIT_STRIP_FLAGS} ]] ; then
 			local shortname="${x##*/}.debug"
 			local splitdebug="${tmpdir}/splitdebug/${shortname}.${BASHPID}"
+			${already_stripped} || \
 			${STRIP} ${strip_flags} \
 				-f "${splitdebug}" \
 				-F "${shortname}" \
 				"${x}"
-			save_elf_debug "${x}" "${splitdebug}"
+			save_elf_debug "${x}" "${inode_link}_debug" "${splitdebug}"
 		else
-			save_elf_debug "${x}"
+			save_elf_debug "${x}" "${inode_link}_debug"
+			${already_stripped} || \
 			${STRIP} ${strip_flags} "${x}"
 		fi
 	fi
 
+	if ${already_stripped} ; then
+		rm -f "${x}" || die "rm failed unexpectedly"
+		ln "${inode_link}_stripped" "${x}" || die "ln failed unexpectedly"
+	else
+		ln "${x}" "${inode_link}_stripped" || die "ln failed unexpectedly"
+	fi
+
 	[[ -n ${lockfile} ]] && rm -f "${lockfile}"
 }
 
@@ -232,11 +243,24 @@ if ! ${RESTRICT_binchecks} && ! ${RESTRICT_strip} ; then
 	__multijob_post_fork
 fi
 
+# Since strip creates a new inode, we need to know the initial set of
+# inodes in advance, so that we can avoid interference due to trying
+# to strip the same (hardlinked) file multiple times in parallel.
+# See bug #421099.
+while read -r x ; do
+	inode_link=$(inode_file_link "${x}")
+	echo "${x}" >> "${inode_link}" || die "echo failed"
+done < <(
+	scanelf -yqRBF '#k%F' -k '.symtab' "$@"
+	find "$@" -type f ! -type l -name '*.a'
+)
+
 # Now we look for unstripped binaries.
-for x in \
-	$(scanelf -yqRBF '#k%F' -k '.symtab' "$@") \
-	$(find "$@" -type f -name '*.a')
+cd "${tmpdir}/inodes" || die "cd failed"
+for inode_link in * ; do
+while read -r x
 do
+
 	if ! ${banner} ; then
 		__vecho "strip: ${STRIP} ${PORTAGE_STRIP_FLAGS}"
 		banner=true
@@ -284,9 +308,9 @@ do
 			${STRIP} -g "${x}"
 		fi
 	elif [[ ${f} == *"SB executable"* || ${f} == *"SB shared object"* ]] ; then
-		process_elf "${x}" ${PORTAGE_STRIP_FLAGS}
+		process_elf "${x}" "${inode_link}" ${PORTAGE_STRIP_FLAGS}
 	elif [[ ${f} == *"SB relocatable"* ]] ; then
-		process_elf "${x}" ${SAFE_STRIP_FLAGS}
+		process_elf "${x}" "${inode_link}" ${SAFE_STRIP_FLAGS}
 	fi
 
 	if ${was_not_writable} ; then
@@ -294,6 +318,8 @@ do
 	fi
 	) &
 	__multijob_post_fork
+
+done < "${inode_link}"
 done
 
 # With a bit more work, we could run the rsync processes below in


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-11-06  5:42 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-11-06  5:42 UTC (permalink / raw
  To: gentoo-commits

commit:     29d8da5f467bc1eaa5320003a8be27a4143a557a
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Nov  6 05:42:18 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Nov  6 05:42:18 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=29d8da5f

prepstrip: handle empty inode list

---
 bin/ebuild-helpers/prepstrip |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index c6bf60e..c0a8e98 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -257,7 +257,7 @@ done < <(
 
 # Now we look for unstripped binaries.
 cd "${tmpdir}/inodes" || die "cd failed"
-for inode_link in * ; do
+for inode_link in $(ls) ; do
 while read -r x
 do
 


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-11-06  6:14 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-11-06  6:14 UTC (permalink / raw
  To: gentoo-commits

commit:     764e86e21c907e4bc402a7e65e7b846781b02dbe
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Nov  6 05:42:18 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Nov  6 06:14:10 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=764e86e2

prepstrip: handle empty inode list

---
 bin/ebuild-helpers/prepstrip |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index c6bf60e..57dbc0f 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -257,7 +257,7 @@ done < <(
 
 # Now we look for unstripped binaries.
 cd "${tmpdir}/inodes" || die "cd failed"
-for inode_link in * ; do
+for inode_link in $(shopt -s nullglob; echo *) ; do
 while read -r x
 do
 


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-11-06  8:28 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-11-06  8:28 UTC (permalink / raw
  To: gentoo-commits

commit:     4ade44bb3c75422d02046e2328a02224cd265404
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Nov  6 08:28:40 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Nov  6 08:28:40 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4ade44bb

prepstrip: check USERLAND outside of loop

---
 bin/ebuild-helpers/prepstrip |   21 ++++++++-------------
 1 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 57dbc0f..575001c 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -70,16 +70,6 @@ tmpdir="${T}/prepstrip"
 rm -rf "${tmpdir}"
 mkdir -p "${tmpdir}"/{inodes,splitdebug,sources}
 
-# Usage: inode_var_name: <file>
-inode_file_link() {
-	echo -n "${tmpdir}/inodes/"
-	if  [[ ${USERLAND} == "BSD" ]] ; then
-		stat -f '%i' "$1"
-	else
-		stat -c '%i' "$1"
-	fi
-}
-
 # Usage: save_elf_sources <elf>
 save_elf_sources() {
 	${FEATURES_installsources} || return 0
@@ -247,16 +237,21 @@ fi
 # inodes in advance, so that we can avoid interference due to trying
 # to strip the same (hardlinked) file multiple times in parallel.
 # See bug #421099.
+if  [[ ${USERLAND} == BSD ]] ; then
+	get_inode_number() { stat -f '%i' "$1"; }
+else
+	get_inode_number() { stat -c '%i' "$1"; }
+fi
+cd "${tmpdir}/inodes" || die "cd failed unexpectedly"
 while read -r x ; do
-	inode_link=$(inode_file_link "${x}")
-	echo "${x}" >> "${inode_link}" || die "echo failed"
+	inode_link=$(get_inode_number "${x}") || die "stat failed unexpectedly"
+	echo "${x}" >> "${inode_link}" || die "echo failed unexpectedly"
 done < <(
 	scanelf -yqRBF '#k%F' -k '.symtab' "$@"
 	find "$@" -type f ! -type l -name '*.a'
 )
 
 # Now we look for unstripped binaries.
-cd "${tmpdir}/inodes" || die "cd failed"
 for inode_link in $(shopt -s nullglob; echo *) ; do
 while read -r x
 do


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-12-01  3:37 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-12-01  3:37 UTC (permalink / raw
  To: gentoo-commits

commit:     bba20c632e79426cd006dd2b732fcaed079ac43a
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  1 03:37:12 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Dec  1 03:37:12 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=bba20c63

prepstrip: avoid duplicates for bug #445336

This prevents us from trying to hardlink duplicate splitdebug files,
avoiding ln "File exists" failure as reported in bug #445336.

---
 bin/ebuild-helpers/prepstrip |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 575001c..408060a 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -249,7 +249,7 @@ while read -r x ; do
 done < <(
 	scanelf -yqRBF '#k%F' -k '.symtab' "$@"
 	find "$@" -type f ! -type l -name '*.a'
-)
+) | LC_ALL=C sort -u
 
 # Now we look for unstripped binaries.
 for inode_link in $(shopt -s nullglob; echo *) ; do


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-12-01 21:19 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-12-01 21:19 UTC (permalink / raw
  To: gentoo-commits

commit:     05827f3b3bcdbb134633e39b1226715c8e4b3a8b
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  1 21:14:56 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Dec  1 21:14:56 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=05827f3b

Revert "prepstrip: avoid duplicates for bug #445336"

This reverts commit bba20c632e79426cd006dd2b732fcaed079ac43a.
The sort needs to be inside the subshell in order for it to
work as intended. A correct patch will follow.

---
 bin/ebuild-helpers/prepstrip |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 408060a..575001c 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -249,7 +249,7 @@ while read -r x ; do
 done < <(
 	scanelf -yqRBF '#k%F' -k '.symtab' "$@"
 	find "$@" -type f ! -type l -name '*.a'
-) | LC_ALL=C sort -u
+)
 
 # Now we look for unstripped binaries.
 for inode_link in $(shopt -s nullglob; echo *) ; do


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-12-01 21:19 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-12-01 21:19 UTC (permalink / raw
  To: gentoo-commits

commit:     f930e2fafd14705e548637330cfc2d848c102cfa
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  1 21:17:14 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Dec  1 21:17:14 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f930e2fa

prepstrip: avoid duplicates for bug #445336

This prevents us from trying to hardlink duplicate splitdebug files,
avoiding ln "File exists" failure as reported in bug #445336.

---
 bin/ebuild-helpers/prepstrip |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 575001c..99acefb 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -247,8 +247,10 @@ while read -r x ; do
 	inode_link=$(get_inode_number "${x}") || die "stat failed unexpectedly"
 	echo "${x}" >> "${inode_link}" || die "echo failed unexpectedly"
 done < <(
-	scanelf -yqRBF '#k%F' -k '.symtab' "$@"
-	find "$@" -type f ! -type l -name '*.a'
+	(
+		scanelf -yqRBF '#k%F' -k '.symtab' "$@"
+		find "$@" -type f ! -type l -name '*.a'
+	) | LC_ALL=C sort -u
 )
 
 # Now we look for unstripped binaries.


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-12-01 21:41 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-12-01 21:41 UTC (permalink / raw
  To: gentoo-commits

commit:     d86595e92193fd6b2b76365d01a13147c21bf75f
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  1 21:41:37 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Dec  1 21:41:37 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d86595e9

prepstrip: add comment for bug #445336

---
 bin/ebuild-helpers/prepstrip |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 99acefb..dd88052 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -247,6 +247,7 @@ while read -r x ; do
 	inode_link=$(get_inode_number "${x}") || die "stat failed unexpectedly"
 	echo "${x}" >> "${inode_link}" || die "echo failed unexpectedly"
 done < <(
+	# Use sort -u to eliminate duplicates for bug #445336.
 	(
 		scanelf -yqRBF '#k%F' -k '.symtab' "$@"
 		find "$@" -type f ! -type l -name '*.a'


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-12-10 22:05 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-12-10 22:05 UTC (permalink / raw
  To: gentoo-commits

commit:     d08f5efd56c19afab3e4538baf91fe4d6d7ecb1b
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 10 22:05:09 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Dec 10 22:05:09 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d08f5efd

prepstrip: handle objcopy failure, bug #446774

---
 bin/ebuild-helpers/prepstrip |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index dd88052..6a09ff4 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -124,10 +124,14 @@ save_elf_debug() {
 			${OBJCOPY} ${objcopy_flags} "${x}" "${y}"
 			${OBJCOPY} --add-gnu-debuglink="${y}" "${x}"
 		fi
-		local args="a-x,o-w"
-		[[ -g ${x} || -u ${x} ]] && args+=",go-r"
-		chmod ${args} "${y}"
-		ln "${y}" "${inode_debug}" || die "ln failed unexpectedly"
+		# Only do the following if the debug file was
+		# successfully created (see bug #446774).
+		if [ $? -eq 0 ] ; then
+			local args="a-x,o-w"
+			[[ -g ${x} || -u ${x} ]] && args+=",go-r"
+			chmod ${args} "${y}"
+			ln "${y}" "${inode_debug}" || die "ln failed unexpectedly"
+		fi
 	fi
 
 	# if we don't already have build-id from debugedit, look it up


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2012-12-11  9:00 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2012-12-11  9:00 UTC (permalink / raw
  To: gentoo-commits

commit:     9b1de87419bbb283717a4e73eab1c98645014906
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 11 09:00:25 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Dec 11 09:00:25 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9b1de874

prepstrip: preserve xattrs, bug #446420

---
 bin/ebuild-helpers/prepstrip |   36 +++++++++++++++++++++++++++++++++---
 1 files changed, 33 insertions(+), 3 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 6a09ff4..fb20777 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -15,7 +15,7 @@ exp_tf() {
 		eval ${var}_${flag}=$(tf has ${flag} ${!var})
 	done
 }
-exp_tf FEATURES compressdebug installsources nostrip splitdebug
+exp_tf FEATURES compressdebug installsources nostrip splitdebug xattr
 exp_tf RESTRICT binchecks installsources strip
 
 if ! ___eapi_has_prefix_variables; then
@@ -30,6 +30,28 @@ if ${RESTRICT_strip} || ${FEATURES_nostrip} ; then
 	${FEATURES_installsources} || exit 0
 fi
 
+PRESERVE_XATTR=false
+if [[ ${KERNEL} == linux ]] && ${FEATURES_xattr} ; then
+	PRESERVE_XATTR=true
+	if type -P getfattr >/dev/null && type -P setfattr >/dev/null ; then
+		dump_xattrs() {
+			getfattr -d --absolute-names "$1"
+		}
+		restore_xattrs() {
+			setfattr --restore=-
+		}
+	else
+		dump_xattrs() {
+			"${PORTAGE_PYTHON:-/usr/bin/python}" \
+			"${PORTAGE_BIN_PATH}/xattr-helper.py" --dump < <(echo -n "$1")
+		}
+		restore_xattrs() {
+			"${PORTAGE_PYTHON:-/usr/bin/python}" \
+			"${PORTAGE_BIN_PATH}/xattr-helper.py" --restore
+		}
+	fi
+fi
+
 # look up the tools we might be using
 for t in STRIP:strip OBJCOPY:objcopy READELF:readelf ; do
 	v=${t%:*} # STRIP
@@ -152,7 +174,7 @@ save_elf_debug() {
 # Usage: process_elf <elf>
 process_elf() {
 	local x=$1 inode_link=$2 strip_flags=${*:3}
-	local already_stripped lockfile
+	local already_stripped lockfile xt_data
 
 	__vecho "   ${x:${#ED}}"
 
@@ -171,7 +193,12 @@ process_elf() {
 
 	[ -f "${inode_link}_stripped" ] && already_stripped=true || already_stripped=false
 
-	${already_stripped} || save_elf_sources "${x}"
+	if ! ${already_stripped} ; then
+		if ${PRESERVE_XATTR} ; then
+			xt_data=$(dump_xattrs "${x}")
+		fi
+		save_elf_sources "${x}"
+	fi
 
 	if ${strip_this} ; then
 
@@ -197,6 +224,9 @@ process_elf() {
 		ln "${inode_link}_stripped" "${x}" || die "ln failed unexpectedly"
 	else
 		ln "${x}" "${inode_link}_stripped" || die "ln failed unexpectedly"
+		if [[ ${xt_data} ]] ; then
+			restore_xattrs <<< "${xt_data}"
+		fi
 	fi
 
 	[[ -n ${lockfile} ]] && rm -f "${lockfile}"


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2013-02-15 23:40 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2013-02-15 23:40 UTC (permalink / raw
  To: gentoo-commits

commit:     d0d62ba0ea6375d53db8843eb938f74613583455
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 15 23:39:57 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Feb 15 23:39:57 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d0d62ba0

preplib: remove for bug #102297

---
 bin/ebuild-helpers/preplib |   32 --------------------------------
 1 files changed, 0 insertions(+), 32 deletions(-)

diff --git a/bin/ebuild-helpers/preplib b/bin/ebuild-helpers/preplib
deleted file mode 100755
index 764261d..0000000
--- a/bin/ebuild-helpers/preplib
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
-
-eqawarn "QA Notice: Deprecated call to 'preplib'"
-
-if ! ___eapi_has_prefix_variables; then
-	ED=${D}
-fi
-
-LIBDIR_VAR="LIBDIR_${ABI}"
-if [ -n "${ABI}" -a -n "${!LIBDIR_VAR}" ]; then
-	CONF_LIBDIR="${!LIBDIR_VAR}"
-fi
-unset LIBDIR_VAR
-
-if [ -z "${CONF_LIBDIR}" ]; then
-	# we need this to default to lib so that things dont break
-	CONF_LIBDIR="lib"
-fi
-
-if [ -z "$1" ] ; then
-	z="${ED}usr/${CONF_LIBDIR}"
-else
-	z="${ED}$1/${CONF_LIBDIR}"
-fi
-
-if [ -d "${z}" ] ; then
-	ldconfig -n -N "${z}"
-fi


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2013-03-14  3:30 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2013-03-14  3:30 UTC (permalink / raw
  To: gentoo-commits

commit:     f87e325263df8c134e4b4cfe3837ae732bc9da2b
Author:     Alphat-PC <AlphatPC <AT> gmail <DOT> com>
AuthorDate: Thu Mar 14 03:26:44 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Mar 14 03:26:44 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f87e3252

prepstrip: strip .note.gnu.gold-version sections

---
 bin/ebuild-helpers/prepstrip |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index d791a11..38faaef 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -74,7 +74,7 @@ case $(${STRIP} --version 2>/dev/null) in
 	# We'll leave out -R .note for now until we can check out the relevance
 	# of the section when it has the ALLOC flag set on it ...
 	SAFE_STRIP_FLAGS="--strip-unneeded"
-	DEF_STRIP_FLAGS="-R .comment -R .GCC.command.line"
+	DEF_STRIP_FLAGS="-R .comment -R .GCC.command.line -R .note.gnu.gold-version"
 	SPLIT_STRIP_FLAGS=
 	;;
 esac


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2013-03-14  3:30 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2013-03-14  3:30 UTC (permalink / raw
  To: gentoo-commits

commit:     c37c809c89a0ce0ccaef1a38599bc00afbca1179
Author:     Alphat-PC <AlphatPC <AT> gmail <DOT> com>
AuthorDate: Thu Mar 14 03:23:58 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Mar 14 03:23:58 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c37c809c

prepstrip: fix readelf Build ID for bug #460510

---
 bin/ebuild-helpers/prepstrip |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index fb20777..d791a11 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -159,8 +159,7 @@ save_elf_debug() {
 	# if we don't already have build-id from debugedit, look it up
 	if [[ -z ${buildid} ]] ; then
 		# convert the readelf output to something useful
-		buildid=$(${READELF} -x .note.gnu.build-id "${x}" 2>/dev/null \
-			| awk '$NF ~ /GNU/ { getline; printf $2$3$4$5; getline; print $2 }')
+		buildid=$(${READELF} -n "${x}" 2>/dev/null | awk '/Build ID:/{ print $NF; exit }')
 	fi
 	if [[ -n ${buildid} ]] ; then
 		local buildid_dir="${ED}usr/lib/debug/.build-id/${buildid:0:2}"


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2013-03-14  3:30 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2013-03-14  3:30 UTC (permalink / raw
  To: gentoo-commits

commit:     c1015ee592de1804c1100b5c0d70865579c72b6e
Author:     Alphat-PC <AlphatPC <AT> gmail <DOT> com>
AuthorDate: Thu Mar 14 03:29:23 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Mar 14 03:29:23 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c1015ee5

prepstrip: skip redundant build ID ln -s calls

---
 bin/ebuild-helpers/prepstrip |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 38faaef..eda2212 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -165,8 +165,8 @@ save_elf_debug() {
 		local buildid_dir="${ED}usr/lib/debug/.build-id/${buildid:0:2}"
 		local buildid_file="${buildid_dir}/${buildid:2}"
 		mkdir -p "${buildid_dir}"
-		ln -s "../../${x:${#D}}.debug" "${buildid_file}.debug"
-		ln -s "/${x:${#D}}" "${buildid_file}"
+		[ -L "${buildid_file}".debug ] || ln -s "../../${x:${#D}}.debug" "${buildid_file}.debug"
+		[ -L "${buildid_file}" ] || ln -s "/${x:${#D}}" "${buildid_file}"
 	fi
 }
 


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2013-03-20  8:33 Mike Frysinger
  0 siblings, 0 replies; 114+ messages in thread
From: Mike Frysinger @ 2013-03-20  8:33 UTC (permalink / raw
  To: gentoo-commits

commit:     c4d0a6bb0a246cc6decf35504dd285aee186d03f
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 20 08:29:23 2013 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Mar 20 08:29:23 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c4d0a6bb

prepallman: avoid temp file indirection

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

---
 bin/ebuild-helpers/prepallman |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/bin/ebuild-helpers/prepallman b/bin/ebuild-helpers/prepallman
index 7c78324..5331eaf 100755
--- a/bin/ebuild-helpers/prepallman
+++ b/bin/ebuild-helpers/prepallman
@@ -13,11 +13,10 @@ fi
 
 ret=0
 
-find "${ED}" -type d -name man > "${T}"/prepallman.filelist
-while read -r mandir ; do
+while IFS= read -r -d '' mandir ; do
 	mandir=${mandir#${ED}}
 	prepman "${mandir%/man}"
 	((ret|=$?))
-done < "${T}"/prepallman.filelist
+done < <(find "${ED}" -type d -name man -print0)
 
 exit ${ret}


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2013-03-20 19:16 Mike Frysinger
  0 siblings, 0 replies; 114+ messages in thread
From: Mike Frysinger @ 2013-03-20 19:16 UTC (permalink / raw
  To: gentoo-commits

commit:     b47ea7a91220d72b78547721cedb8a4ca6cec39e
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 20 08:29:44 2013 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Mar 20 08:29:44 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b47ea7a9

prepman: do not compress files <=128 bytes

The vast majority of these small files do not compress better than
their inputs, and they're just .so redirection.  Omit compression
on them to save disk and cpu and speed things up.

URL: http://bugs.gentoo.org/169260
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

---
 bin/ebuild-helpers/ecompressdir |   33 ++++++++++++++++++++++++++-------
 bin/ebuild-helpers/prepman      |    5 ++++-
 2 files changed, 30 insertions(+), 8 deletions(-)

diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir
index 75f3e3a..0f05c27 100755
--- a/bin/ebuild-helpers/ecompressdir
+++ b/bin/ebuild-helpers/ecompressdir
@@ -13,7 +13,9 @@ if ! ___eapi_has_prefix_variables; then
 	ED=${D} EPREFIX=
 fi
 
-case $1 in
+SIZE_LIMIT=''
+while [[ $# -gt 0 ]] ; do
+	case $1 in
 	--ignore)
 		shift
 		for skip in "$@" ; do
@@ -28,7 +30,8 @@ case $1 in
 		set -- "${@/#/${ED}}"
 		ret=0
 		for x in "$@" ; do
-			>> "$x"
+			# Stash the limit in the .dir file so we can reload it later.
+			printf "${SIZE_LIMIT}" > "${x}"
 			((ret|=$?))
 		done
 		[[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
@@ -42,29 +45,44 @@ case $1 in
 		find "${ED}" -name '*.ecompress.skip' -print0 | ${XARGS} -0 rm -f
 		exit 0
 		;;
+	--limit)
+		SIZE_LIMIT=$2
+		shift
+		;;
 	--*)
 		__helpers_die "${0##*/}: unknown arguments '$*'"
 		exit 1
 		;;
-esac
+	*)
+		break
+		;;
+	esac
+	shift
+done
 
 # figure out the new suffix
 suffix=$(ecompress --suffix)
 
-# funk_up_dir(action, suffix, binary)
+# funk_up_dir(action, suffix, binary, [size_limit])
 #	- action: compress or decompress
 #	- suffix: the compression suffix to work with
 #	- binary: the program to execute that'll compress/decompress
+#   - size_limit: if compressing, skip files smaller than this
 # The directory we act on is implied in the ${dir} variable
 funk_up_dir() {
-	local act=$1 suffix=$2 binary=$3
+	local act=$1 suffix=$2 binary=$3 size_limit=$4
 
 	local negate=""
 	[[ ${act} == "compress" ]] && negate="!"
 
 	local ret=0
 	# first we act on all the files
-	find "${dir}" -type f ${negate} -iname '*'${suffix} -print0 | ${XARGS} -0 ${binary}
+	local args=(
+		-type f
+		${negate} -iname "*${suffix}"
+	)
+	[[ -n ${size_limit} ]] && args+=( -size "+${size_limit}c" )
+	find "${dir}" "${args[@]}" -print0 | ${XARGS} -0 ${binary}
 	((ret|=$?))
 
 	while read -r -d $'\0' brokenlink ; do
@@ -152,6 +170,7 @@ for dir in "$@" ; do
 
 	# since we've been requested to compress the whole dir,
 	# delete any individual queued requests
+	size_limit=${SIZE_LIMIT:-$(<"${actual_dir}.ecompress.dir")}
 	rm -f "${actual_dir}.ecompress.dir"
 	find "${dir}" -type f -name '*.ecompress.file' -print0 | ${XARGS} -0 rm -f
 
@@ -179,7 +198,7 @@ for dir in "$@" ; do
 	# now lets do our work
 	if [[ -n ${suffix} ]] ; then
 		__vecho "${0##*/}: $(ecompress --bin) /${actual_dir#${ED}}"
-		funk_up_dir "compress" "${suffix}" "ecompress"
+		funk_up_dir "compress" "${suffix}" "ecompress" "${size_limit}"
 		: $(( ret |= $? ))
 	fi
 

diff --git a/bin/ebuild-helpers/prepman b/bin/ebuild-helpers/prepman
index 55a9483..fb5dcb4 100755
--- a/bin/ebuild-helpers/prepman
+++ b/bin/ebuild-helpers/prepman
@@ -2,6 +2,9 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
+# Do not compress man pages which are smaller than this (in bytes). #169260
+SIZE_LIMIT='128'
+
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if ! ___eapi_has_prefix_variables; then
@@ -31,6 +34,6 @@ for subdir in "${mandir}"/man* "${mandir}"/*/man* ; do
 	[[ -d ${subdir} ]] && really_is_mandir=1 && break
 done
 
-[[ ${really_is_mandir} == 1 ]] && exec ecompressdir --queue "${mandir#${ED}}"
+[[ ${really_is_mandir} == 1 ]] && exec ecompressdir --limit ${SIZE_LIMIT} --queue "${mandir#${ED}}"
 
 exit 0


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2013-04-01  7:22 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2013-04-01  7:22 UTC (permalink / raw
  To: gentoo-commits

commit:     700a5b19b310e805800dcef5730e8244115e774f
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  1 07:22:18 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Apr  1 07:22:18 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=700a5b19

ecompressdir: fix decompress, bug #462936

This array index variables have been broken in this code ever since it
was added in commit 76939c46aa2817bdbcea703432c52e5aa04160f9.

---
 bin/ebuild-helpers/ecompressdir |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir
index 0f05c27..40079c0 100755
--- a/bin/ebuild-helpers/ecompressdir
+++ b/bin/ebuild-helpers/ecompressdir
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/helper-functions.sh
@@ -175,7 +175,7 @@ for dir in "$@" ; do
 	find "${dir}" -type f -name '*.ecompress.file' -print0 | ${XARGS} -0 rm -f
 
 	# not uncommon for packages to compress doc files themselves
-	for (( d = 0; d < ${#decompressors[@]}; d += 2 )) ; do
+	for (( i = 0; i < ${#decompressors[@]}; i += 2 )) ; do
 		# It's faster to parallelize at this stage than to try to
 		# parallelize the compressors.  This is because the find|xargs
 		# ends up launching less compressors overall, so the overhead


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2013-05-12 20:52 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2013-05-12 20:52 UTC (permalink / raw
  To: gentoo-commits

commit:     2ffea0a3b302642eeacae38059b06181006d2573
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun May 12 20:52:06 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun May 12 20:52:06 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2ffea0a3

dohtml: restore cwd for __helpers_die

---
 bin/ebuild-helpers/dohtml |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild-helpers/dohtml b/bin/ebuild-helpers/dohtml
index 4be9bc2..fd9efd2 100755
--- a/bin/ebuild-helpers/dohtml
+++ b/bin/ebuild-helpers/dohtml
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2009-2010 Gentoo Foundation
+# Copyright 2009-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
@@ -13,5 +13,7 @@ PYTHONPATH=$PORTAGE_PYM_PATH${PYTHONPATH:+:}$PYTHONPATH \
 	"${PORTAGE_PYTHON:-/usr/bin/python}" "$PORTAGE_BIN_PATH/dohtml.py" "$@"
 
 ret=$?
+# Restore cwd for display by __helpers_die
+cd "${__PORTAGE_HELPER_CWD}"
 [[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"
 exit $ret


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2013-05-21 21:37 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2013-05-21 21:37 UTC (permalink / raw
  To: gentoo-commits

commit:     4c5b4a1df363a61ecb0590d64adc12e167903006
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue May 21 21:37:13 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue May 21 21:37:13 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4c5b4a1d

ecompressdir: indirect symlinks, bug #470916

---
 bin/ebuild-helpers/ecompressdir |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir
index 40079c0..eca5888 100755
--- a/bin/ebuild-helpers/ecompressdir
+++ b/bin/ebuild-helpers/ecompressdir
@@ -85,6 +85,11 @@ funk_up_dir() {
 	find "${dir}" "${args[@]}" -print0 | ${XARGS} -0 ${binary}
 	((ret|=$?))
 
+	# Repeat until nothing changes, in order to handle multiple
+	# levels of indirection (see bug #470916).
+	local -i indirection=0
+	while true ; do
+	local something_changed=
 	while read -r -d $'\0' brokenlink ; do
 		[[ -e ${brokenlink} ]] && continue
 		olddest=$(readlink "${brokenlink}")
@@ -110,12 +115,22 @@ funk_up_dir() {
 		else
 			[[ -f "${dir}/${brokenlink%/*}/${newdest}" ]] || continue
 		fi
+		something_changed=${brokenlink}
 		rm -f "${brokenlink}"
 		[[ ${act} == "compress" ]] \
 			&& ln -snf "${newdest}" "${brokenlink}${suffix}" \
 			|| ln -snf "${newdest}" "${brokenlink%${suffix}}"
 		((ret|=$?))
 	done < <(find "${dir}" -type l -print0)
+	[[ -n ${something_changed} ]] || break
+	(( indirection++ ))
+	if (( indirection >= 100 )) ; then
+		# Protect against possibility of a bug triggering an endless loop.
+		eerror "ecompressdir: too many levels of indirection for" \
+			"'${actual_dir#${ED}}/${something_changed#./}'"
+		break
+	fi
+	done
 	return ${ret}
 }
 


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2013-08-02 17:42 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2013-08-02 17:42 UTC (permalink / raw
  To: gentoo-commits

commit:     5f682400890735071f58bb834d1c95372578a18f
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  2 17:41:45 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Aug  2 17:41:45 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5f682400

prepstrip: PORTAGE_PYTHONPATH for xattr-helper.py

---
 bin/ebuild-helpers/prepstrip | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 66aa734..9b2d47c 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -1,7 +1,8 @@
 #!/bin/bash
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
+PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/helper-functions.sh
 
 # avoid multiple calls to `has`.  this creates things like:
@@ -42,10 +43,12 @@ if [[ ${KERNEL} == linux ]] && ${FEATURES_xattr} ; then
 		}
 	else
 		dump_xattrs() {
+			PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
 			"${PORTAGE_PYTHON:-/usr/bin/python}" \
 			"${PORTAGE_BIN_PATH}/xattr-helper.py" --dump < <(echo -n "$1")
 		}
 		restore_xattrs() {
+			PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
 			"${PORTAGE_PYTHON:-/usr/bin/python}" \
 			"${PORTAGE_BIN_PATH}/xattr-helper.py" --restore
 		}


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2013-08-21 19:21 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2013-08-21 19:21 UTC (permalink / raw
  To: gentoo-commits

commit:     83ac345bb227dc1752a895d53037fce36c9c7966
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 20 14:02:14 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Aug 21 19:20:59 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=83ac345b

dodoc: Add a QA warning when called with no arguments.

See bug #481664 and bug #480892.

---
 bin/ebuild-helpers/doins | 1 +
 1 file changed, 1 insertion(+)

diff --git a/bin/ebuild-helpers/doins b/bin/ebuild-helpers/doins
index 4679e83..bdcef48 100755
--- a/bin/ebuild-helpers/doins
+++ b/bin/ebuild-helpers/doins
@@ -11,6 +11,7 @@ if [[ ${helper} == dodoc ]] ; then
 		# default_src_install may call dodoc with no arguments
 		# when DOC is defined but empty, so simply return
 		# sucessfully in this case.
+		eqawarn "QA Notice: dodoc called with no arguments"
 		exit 0
 	fi
 	export INSOPTIONS=-m0644


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2013-09-09 17:11 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2013-09-09 17:11 UTC (permalink / raw
  To: gentoo-commits

commit:     74197ee20c4c4d85c3db1334c70f029e342d7bb0
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Sep  9 17:10:22 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Sep  9 17:10:22 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=74197ee2

doins: use mktemp for private files, bug #484332

---
 bin/ebuild-helpers/doins | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/ebuild-helpers/doins b/bin/ebuild-helpers/doins
index bdcef48..c60e057 100755
--- a/bin/ebuild-helpers/doins
+++ b/bin/ebuild-helpers/doins
@@ -49,7 +49,7 @@ else
 	PRESERVE_SYMLINKS=n
 fi
 
-export TMP=$T/.doins_tmp
+export TMP=$(mktemp -d "${T}/.doins_tmp_XXXXXX")
 # Use separate directories to avoid potential name collisions.
 mkdir -p "$TMP"/{1,2}
 


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2013-09-09 17:44 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2013-09-09 17:44 UTC (permalink / raw
  To: gentoo-commits

commit:     00b56f2ddc85542a277e83513bc9b09f63fca551
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Sep  9 17:42:54 2013 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Sep  9 17:42:54 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=00b56f2d

doexe/newins: mktemp for bug #484332

---
 bin/ebuild-helpers/doexe  |  3 +--
 bin/ebuild-helpers/newins | 10 +++++-----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/bin/ebuild-helpers/doexe b/bin/ebuild-helpers/doexe
index aa050e9..c34fcae 100755
--- a/bin/ebuild-helpers/doexe
+++ b/bin/ebuild-helpers/doexe
@@ -17,8 +17,7 @@ if [[ ! -d ${ED}${_E_EXEDESTTREE_} ]] ; then
 	install -d "${ED}${_E_EXEDESTTREE_}"
 fi
 
-TMP=$T/.doexe_tmp
-mkdir "$TMP"
+TMP=$(mktemp -d "${T}/.doexe_tmp_XXXXXX")
 
 ret=0
 

diff --git a/bin/ebuild-helpers/newins b/bin/ebuild-helpers/newins
index 3538f70..0335985 100755
--- a/bin/ebuild-helpers/newins
+++ b/bin/ebuild-helpers/newins
@@ -19,14 +19,15 @@ if ___eapi_newins_supports_reading_from_standard_input && [[ $1 == "-" ]]; then
 	stdin=yes
 fi
 
-rm -rf "${T}/$2"
+TMP=$(mktemp -d "${T}/.newins_tmp_XXXXXX")
+trap 'rm -rf "${TMP}"' EXIT
 
 if [[ ${stdin} ]] ; then
 	if [[ -t 0 ]] ; then
 		__helpers_die "!!! ${helper}: Input is from a terminal"
 		exit 1
 	fi
-	cat > "${T}/$2"
+	cat > "${TMP}/$2"
 	ret=$?
 else
 	if [[ ! -e $1 ]] ; then
@@ -41,7 +42,7 @@ else
 		fi
 	fi
 
-	cp ${cp_args} "$1" "${T}/$2"
+	cp ${cp_args} "$1" "${TMP}/$2"
 	ret=$?
 fi
 
@@ -50,8 +51,7 @@ if [[ ${ret} -ne 0 ]] ; then
 	exit ${ret}
 fi
 
-do${helper#new} "${T}/$2"
+do${helper#new} "${TMP}/$2"
 ret=$?
-rm -rf "${T}/${2}"
 [[ $ret -ne 0 ]] && __helpers_die "${helper} failed"
 exit $ret


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2014-01-05 14:42 Mike Frysinger
  0 siblings, 0 replies; 114+ messages in thread
From: Mike Frysinger @ 2014-01-05 14:42 UTC (permalink / raw
  To: gentoo-commits

commit:     6dcc94c83bfcfd642d12558bf294e3c6ac0a81da
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  5 14:38:59 2014 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Jan  5 14:40:29 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=6dcc94c8

prepstrip: do no strip static libs when FEATURES=splitdebug

When people have splitdebug enabled, they want debugging info to be
available to them.  Unfortunately, splitdebug doesn't work with static
archives, so we have to leave it in.  Stripping of that will be delayed
to when the final ELF is linked.

---
 bin/ebuild-helpers/prepstrip | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 64ea80d..2332388 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -339,8 +339,13 @@ do
 	if [[ ${f} == *"current ar archive"* ]] ; then
 		__vecho "   ${x:${#ED}}"
 		if ${strip_this} ; then
-			# hmm, can we split debug/sources for .a ?
-			${STRIP} -g "${x}"
+			# If we have split debug enabled, then do not strip this.
+			# There is no concept of splitdebug for objects not yet
+			# linked in (only for finally linked ELFs), so we have to
+			# retain the debug info in the archive itself.
+			if ! ${FEATURES_splitdebug} || ${RESTRICT_splitdebug} ; then
+				${STRIP} -g "${x}"
+			fi
 		fi
 	elif [[ ${f} == *"SB executable"* || ${f} == *"SB shared object"* ]] ; then
 		process_elf "${x}" "${inode_link}" ${PORTAGE_STRIP_FLAGS}


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2014-10-19 17:33 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2014-10-19 17:33 UTC (permalink / raw
  To: gentoo-commits

commit:     03cbe2762903601fe679ccd766456f6f6cba8ea2
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 11 04:32:54 2014 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Oct 19 17:32:23 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=03cbe276

bin/ebuild-helpers/portageq: fix bug #524964

Since commit 0cc4c1ac21a2ea94cfb1f6ff4b461a9e349d47df,
$PORTAGE_BIN_PATH/portageq no longer exists, which breaks
bin/ebuild-helpers/portageq. Note that has_version and best_version
rely on bin/ebuild-helpers/portageq if IPC is disabled, so breakage
extends beyond ebuilds that call portageq "illegally". Since
$PORTAGE_BIN_PATH no longer works, use PATH to locate the real
portageq python script.

Fixes: 0cc4c1ac21a2 ("Install Portage using setup.py")
X-Gento-Bug: 524964
X-Gentoo-URL: https://bugs.gentoo.org/show_bug.cgi?id=524964

---
 bin/ebuild-helpers/portageq | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/bin/ebuild-helpers/portageq b/bin/ebuild-helpers/portageq
index b67b03f..4151bac 100755
--- a/bin/ebuild-helpers/portageq
+++ b/bin/ebuild-helpers/portageq
@@ -2,9 +2,25 @@
 # Copyright 2009-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
+scriptpath=${BASH_SOURCE[0]}
+scriptname=${scriptpath##*/}
+
 PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}
 PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}
 # Use safe cwd, avoiding unsafe import for bug #469338.
 cd "${PORTAGE_PYM_PATH}"
-PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
-	exec "${PORTAGE_PYTHON:-/usr/bin/python}" "$PORTAGE_BIN_PATH/portageq" "$@"
+
+IFS=':'
+set -f # in case ${PATH} contains any shell glob characters
+
+for path in ${PATH}; do
+	[[ -x ${path}/${scriptname} ]] || 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


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2015-05-14  9:43 Mike Frysinger
  0 siblings, 0 replies; 114+ messages in thread
From: Mike Frysinger @ 2015-05-14  9:43 UTC (permalink / raw
  To: gentoo-commits

commit:     122465d2c507cd4904d940500dcf23eaab93954f
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu May 14 09:41:10 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu May 14 09:41:10 2015 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=122465d2

ebuild-helpers: avoid `env` indirection by setting the vars before the exec

Setting an env var on the same line as the exec will make bash export the
var to the program it execs.  That means these forms are practically equiv:
	FOO=val exec blah
	exec env FOO=val blah

The difference is that we now avoid execing env entirely.

 bin/ebuild-helpers/doconfd  | 5 +----
 bin/ebuild-helpers/dodoc    | 5 +----
 bin/ebuild-helpers/doenvd   | 5 +----
 bin/ebuild-helpers/doheader | 5 +----
 bin/ebuild-helpers/doinitd  | 5 +----
 bin/ebuild-helpers/dolib.a  | 3 +--
 bin/ebuild-helpers/dolib.so | 3 +--
 7 files changed, 7 insertions(+), 24 deletions(-)

diff --git a/bin/ebuild-helpers/doconfd b/bin/ebuild-helpers/doconfd
index a3c09a5..1baa3ed 100755
--- a/bin/ebuild-helpers/doconfd
+++ b/bin/ebuild-helpers/doconfd
@@ -8,7 +8,4 @@ if [[ $# -lt 1 ]] ; then
 	exit 1
 fi
 
-exec \
-env \
-INSDESTTREE="/etc/conf.d/" \
-doins "$@"
+INSDESTTREE='/etc/conf.d/' exec doins "$@"

diff --git a/bin/ebuild-helpers/dodoc b/bin/ebuild-helpers/dodoc
index 99122c4..6ccf0a4 100755
--- a/bin/ebuild-helpers/dodoc
+++ b/bin/ebuild-helpers/dodoc
@@ -5,10 +5,7 @@
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if ___eapi_dodoc_supports_-r; then
-	exec \
-	env \
-	__PORTAGE_HELPER="dodoc" \
-	doins "$@"
+	__PORTAGE_HELPER='dodoc' exec doins "$@"
 fi
 
 if [ $# -lt 1 ] ; then

diff --git a/bin/ebuild-helpers/doenvd b/bin/ebuild-helpers/doenvd
index 9287933..67bb934 100755
--- a/bin/ebuild-helpers/doenvd
+++ b/bin/ebuild-helpers/doenvd
@@ -8,7 +8,4 @@ if [[ $# -lt 1 ]] ; then
 	exit 1
 fi
 
-exec \
-env \
-INSDESTTREE="/etc/env.d/" \
-doins "$@"
+INSDESTTREE='/etc/env.d/' exec doins "$@"

diff --git a/bin/ebuild-helpers/doheader b/bin/ebuild-helpers/doheader
index 3795365..e4cae6a 100755
--- a/bin/ebuild-helpers/doheader
+++ b/bin/ebuild-helpers/doheader
@@ -13,7 +13,4 @@ if [[ $# -lt 1 ]] || [[ $1 == -r && $# -lt 2 ]] ; then
 	exit 1
 fi
 
-exec \
-env \
-INSDESTTREE="/usr/include/" \
-doins "$@"
+INSDESTTREE='/usr/include/' exec doins "$@"

diff --git a/bin/ebuild-helpers/doinitd b/bin/ebuild-helpers/doinitd
index 476b858..aa7b66c 100755
--- a/bin/ebuild-helpers/doinitd
+++ b/bin/ebuild-helpers/doinitd
@@ -8,7 +8,4 @@ if [[ $# -lt 1 ]] ; then
 	exit 1
 fi
 
-exec \
-env \
-_E_EXEDESTTREE_="/etc/init.d/" \
-doexe "$@"
+_E_EXEDESTTREE_='/etc/init.d/' exec doexe "$@"

diff --git a/bin/ebuild-helpers/dolib.a b/bin/ebuild-helpers/dolib.a
index d2279dc..61961e4 100755
--- a/bin/ebuild-helpers/dolib.a
+++ b/bin/ebuild-helpers/dolib.a
@@ -2,5 +2,4 @@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-exec env LIBOPTIONS="-m0644" \
-	dolib "$@"
+LIBOPTIONS='-m0644' exec dolib "$@"

diff --git a/bin/ebuild-helpers/dolib.so b/bin/ebuild-helpers/dolib.so
index 4bdbfab..eab8c91 100755
--- a/bin/ebuild-helpers/dolib.so
+++ b/bin/ebuild-helpers/dolib.so
@@ -2,5 +2,4 @@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-exec env LIBOPTIONS="-m0755" \
-	dolib "$@"
+LIBOPTIONS='-m0755' exec dolib "$@"


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2015-05-14 19:05 Brian Dolbec
  0 siblings, 0 replies; 114+ messages in thread
From: Brian Dolbec @ 2015-05-14 19:05 UTC (permalink / raw
  To: gentoo-commits

commit:     4eccd02bff2d8cf11176750087f29d372af0e71f
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu May 14 09:41:10 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu May 14 19:01:22 2015 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=4eccd02b

ebuild-helpers: avoid `env` indirection by setting the vars before the exec

Setting an env var on the same line as the exec will make bash export the
var to the program it execs.  That means these forms are practically equiv:
	FOO=val exec blah
	exec env FOO=val blah

The difference is that we now avoid execing env entirely.

 bin/ebuild-helpers/doconfd  | 5 +----
 bin/ebuild-helpers/dodoc    | 5 +----
 bin/ebuild-helpers/doenvd   | 5 +----
 bin/ebuild-helpers/doheader | 5 +----
 bin/ebuild-helpers/doinitd  | 5 +----
 bin/ebuild-helpers/dolib.a  | 3 +--
 bin/ebuild-helpers/dolib.so | 3 +--
 7 files changed, 7 insertions(+), 24 deletions(-)

diff --git a/bin/ebuild-helpers/doconfd b/bin/ebuild-helpers/doconfd
index a3c09a5..1baa3ed 100755
--- a/bin/ebuild-helpers/doconfd
+++ b/bin/ebuild-helpers/doconfd
@@ -8,7 +8,4 @@ if [[ $# -lt 1 ]] ; then
 	exit 1
 fi
 
-exec \
-env \
-INSDESTTREE="/etc/conf.d/" \
-doins "$@"
+INSDESTTREE='/etc/conf.d/' exec doins "$@"

diff --git a/bin/ebuild-helpers/dodoc b/bin/ebuild-helpers/dodoc
index 99122c4..6ccf0a4 100755
--- a/bin/ebuild-helpers/dodoc
+++ b/bin/ebuild-helpers/dodoc
@@ -5,10 +5,7 @@
 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
 
 if ___eapi_dodoc_supports_-r; then
-	exec \
-	env \
-	__PORTAGE_HELPER="dodoc" \
-	doins "$@"
+	__PORTAGE_HELPER='dodoc' exec doins "$@"
 fi
 
 if [ $# -lt 1 ] ; then

diff --git a/bin/ebuild-helpers/doenvd b/bin/ebuild-helpers/doenvd
index 9287933..67bb934 100755
--- a/bin/ebuild-helpers/doenvd
+++ b/bin/ebuild-helpers/doenvd
@@ -8,7 +8,4 @@ if [[ $# -lt 1 ]] ; then
 	exit 1
 fi
 
-exec \
-env \
-INSDESTTREE="/etc/env.d/" \
-doins "$@"
+INSDESTTREE='/etc/env.d/' exec doins "$@"

diff --git a/bin/ebuild-helpers/doheader b/bin/ebuild-helpers/doheader
index 3795365..e4cae6a 100755
--- a/bin/ebuild-helpers/doheader
+++ b/bin/ebuild-helpers/doheader
@@ -13,7 +13,4 @@ if [[ $# -lt 1 ]] || [[ $1 == -r && $# -lt 2 ]] ; then
 	exit 1
 fi
 
-exec \
-env \
-INSDESTTREE="/usr/include/" \
-doins "$@"
+INSDESTTREE='/usr/include/' exec doins "$@"

diff --git a/bin/ebuild-helpers/doinitd b/bin/ebuild-helpers/doinitd
index 476b858..aa7b66c 100755
--- a/bin/ebuild-helpers/doinitd
+++ b/bin/ebuild-helpers/doinitd
@@ -8,7 +8,4 @@ if [[ $# -lt 1 ]] ; then
 	exit 1
 fi
 
-exec \
-env \
-_E_EXEDESTTREE_="/etc/init.d/" \
-doexe "$@"
+_E_EXEDESTTREE_='/etc/init.d/' exec doexe "$@"

diff --git a/bin/ebuild-helpers/dolib.a b/bin/ebuild-helpers/dolib.a
index d2279dc..61961e4 100755
--- a/bin/ebuild-helpers/dolib.a
+++ b/bin/ebuild-helpers/dolib.a
@@ -2,5 +2,4 @@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-exec env LIBOPTIONS="-m0644" \
-	dolib "$@"
+LIBOPTIONS='-m0644' exec dolib "$@"

diff --git a/bin/ebuild-helpers/dolib.so b/bin/ebuild-helpers/dolib.so
index 4bdbfab..eab8c91 100755
--- a/bin/ebuild-helpers/dolib.so
+++ b/bin/ebuild-helpers/dolib.so
@@ -2,5 +2,4 @@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-exec env LIBOPTIONS="-m0755" \
-	dolib "$@"
+LIBOPTIONS='-m0755' exec dolib "$@"


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2017-04-20 17:21 Ulrich Müller
  0 siblings, 0 replies; 114+ messages in thread
From: Ulrich Müller @ 2017-04-20 17:21 UTC (permalink / raw
  To: gentoo-commits

commit:     c40c39537d584f57e449d3525e92fafbe85517fd
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 15 09:11:18 2017 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Thu Apr 20 17:20:04 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=c40c3953

dosym: Make implicit basename a fatal error.

The respective QA warning in the dosym helper is in place since 2011.
All known violations in the gentoo repository have been fixed.

Gentoo-Bug: 379899
Acked-by: Brian Dolbec <dolsen <AT> gentoo.org>

 bin/ebuild-helpers/dosym | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/bin/ebuild-helpers/dosym b/bin/ebuild-helpers/dosym
index 0bc8cc7be..b9c70ce9c 100755
--- a/bin/ebuild-helpers/dosym
+++ b/bin/ebuild-helpers/dosym
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
@@ -13,10 +13,9 @@ if ! ___eapi_has_prefix_variables; then
 	ED=${D}
 fi
 
-if [[ ${2} == */ ]] || \
-	[[ -d ${ED}${2} && ! -L ${ED}${2} ]] ; then
+if [[ ${2} == */ ]] || [[ -d ${ED}${2} && ! -L ${ED}${2} ]] ; then
 	# implicit basename not allowed by PMS (bug #379899)
-	eqawarn "QA Notice: dosym target omits basename: '${2}'"
+	__helpers_die "${0##*/}: dosym target omits basename: '${2}'"
 fi
 
 destdir=${2%/*}


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2017-04-20 20:40 Michał Górny
  0 siblings, 0 replies; 114+ messages in thread
From: Michał Górny @ 2017-04-20 20:40 UTC (permalink / raw
  To: gentoo-commits

commit:     18712aa6924862bbab5814c6199e7d7ab416d005
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 19 13:36:02 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Apr 20 20:39:51 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=18712aa6

dosym: protect Prefix hack from double EPREFIX

Add an additional conditional to the dosym Prefix hack to ensure that
the symlink is not using double Prefix when the ebuild uses ${EPREFIX}
explicitly. This ensures that Portage on Prefix systems is both
compatible with the ebuilds relying on the hack, and using dosym
in the PMS-defined manner.

Approved-by: Brian Dolbec <dolsen <AT> gentoo.org> (on IRC)
Approved-by: Ulrich Müller <ulm <AT> gentoo.org>

 bin/ebuild-helpers/dosym | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/bin/ebuild-helpers/dosym b/bin/ebuild-helpers/dosym
index b9c70ce9c..e96039146 100755
--- a/bin/ebuild-helpers/dosym
+++ b/bin/ebuild-helpers/dosym
@@ -20,9 +20,15 @@ fi
 
 destdir=${2%/*}
 [[ ! -d ${ED}${destdir} ]] && dodir "${destdir}"
-# when absolute, prefix with offset for Gentoo Prefix
 target="${1}"
-[[ ${target:0:1} == "/" ]] && target="${EPREFIX}${target}"
+# DEPRECATED HACK: when absolute, prefix with offset for Gentoo Prefix
+# (but only if ${EPREFIX} is not there already)
+# this will eventually be removed, #615594
+if [[ ${target:0:1} == "/" && ${target}/ != "${EPREFIX}"/* ]]; then
+	eqawarn "dosym: prepending EPREFIX to path implicitly. If this is desired,"
+	eqawarn "       please fix the ebuild to use \${EPREFIX} explicitly."
+	target="${EPREFIX}${target}"
+fi
 ln -snf "${target}" "${ED}${2}"
 
 ret=$?


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

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

commit:     6465e5a1d970d0d28a590a5958d7d61e7378d1c3
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jul  2 17:55:49 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jul  9 21:34:52 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=6465e5a1

doman: QA-complain on compressed files

Passing compressed files to doman is not permitted by the PMS. However,
Portage permitting it results in many developers repeatedly violating
this and arguing that it's permitted because nobody explicitly forbids
it. Add an explicit QA warning to Portage to cease it.

Reviewed-by: Brian Dolbec <dolsen <AT> gentoo.org>

 bin/ebuild-helpers/doman | 1 +
 1 file changed, 1 insertion(+)

diff --git a/bin/ebuild-helpers/doman b/bin/ebuild-helpers/doman
index da66ac335..43d29f22e 100755
--- a/bin/ebuild-helpers/doman
+++ b/bin/ebuild-helpers/doman
@@ -30,6 +30,7 @@ for x in "$@" ; do
 
 	# These will be automatically decompressed by ecompressdir.
 	if has ${suffix} Z gz bz2 ; then
+		eqawarn "QA Notice: doman argument '${x}' is compressed, this is not portable"
 		realname=${x%.*}
 		suffix=${realname##*.}
 	fi


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2017-10-16 17:16 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2017-10-16 17:16 UTC (permalink / raw
  To: gentoo-commits

commit:     234ad726ddc5d62eb0d956023de338dc488e2ea1
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 16 08:08:19 2017 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Oct 16 17:15:20 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=234ad726

prepstrip: use debugedit from rpm if necessary (bug 634378)

If debugedit is not found in PATH, then use debugedit
installed by app-arch/rpm (if available).

Suggested-by: Francesco Riosa <vivo75 <AT> gmail.com>
Bug: https://bugs.gentoo.org/634378
Acked-by: Brian Dolbec <dolsen <AT> gentoo.org>

 bin/ebuild-helpers/prepstrip | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 43caa29c7..ea5c0dc09 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -84,7 +84,19 @@ esac
 
 prepstrip_sources_dir=${EPREFIX}/usr/src/debug/${CATEGORY}/${PF}
 
-type -P debugedit >/dev/null && debugedit_found=true || debugedit_found=false
+debugedit=$(type -P debugedit)
+if [[ -z ${debugedit} ]]; then
+	debugedit_paths=(
+		"${EPREFIX}/usr/libexec/rpm/debugedit"
+	)
+	for x in "${debugedit_paths[@]}"; do
+		if [[ -x ${x} ]]; then
+			debugedit=${x}
+			break
+		fi
+	done
+fi
+[[ ${debugedit} ]] && debugedit_found=true || debugedit_found=false
 debugedit_warned=false
 
 __multijob_init
@@ -101,8 +113,8 @@ save_elf_sources() {
 	if ! ${debugedit_found} ; then
 		if ! ${debugedit_warned} ; then
 			debugedit_warned=true
-			ewarn "FEATURES=installsources is enabled but the debugedit binary could not"
-			ewarn "be found. This feature will not work unless debugedit is installed!"
+			ewarn "FEATURES=installsources is enabled but the debugedit binary could not be"
+			ewarn "found. This feature will not work unless debugedit or rpm is installed!"
 		fi
 		return 0
 	fi
@@ -112,7 +124,7 @@ save_elf_sources() {
 	# since we're editing the ELF here, we should recompute the build-id
 	# (the -i flag below).  save that output so we don't need to recompute
 	# it later on in the save_elf_debug step.
-	buildid=$(debugedit -i \
+	buildid=$("${debugedit}" -i \
 		-b "${WORKDIR}" \
 		-d "${prepstrip_sources_dir}" \
 		-l "${tmpdir}/sources/${x##*/}.${BASHPID:-$(__bashpid)}" \


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2017-12-15 21:07 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2017-12-15 21:07 UTC (permalink / raw
  To: gentoo-commits

commit:     7ae0c9d084bb1caf18c751cecb7fb98a619dfbcb
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 15 20:59:06 2017 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Dec 15 20:59:19 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=7ae0c9d0

bin/ebuild-helpers/doins: fix PYTHONPATH setting (bug 640934)

This makes the PYTHONPATH setting consistent with other helpers
like dohtml and xattr/install.

Fixes: d9522ba661b5 ("Rewrite doins in python (bug 624526)")
Bug: https://bugs.gentoo.org/640934

 bin/ebuild-helpers/doins | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/ebuild-helpers/doins b/bin/ebuild-helpers/doins
index c3a57890a..73c9d8b91 100755
--- a/bin/ebuild-helpers/doins
+++ b/bin/ebuild-helpers/doins
@@ -82,7 +82,7 @@ DOINS_ARGS+=(
 # If PYTHONPATH is empty (not unset), it means "add current working directory
 # to the import path" if the Python is prior to 3.4, which would cause
 # unexpected import. See also #469338.
-PYTHONPATH="${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}${PYTHONPATH:+:}${PYTHONPATH}" \
+PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \
 	"${PORTAGE_PYTHON:-/usr/bin/python}" \
 	"${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/doins.py \
 	"${DOINS_ARGS[@]}" -- "$@" || \


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2018-02-05  4:39 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2018-02-05  4:39 UTC (permalink / raw
  To: gentoo-commits

commit:     9215056d3eb9814b2ffee9bd7c7cc8a540fcc7ee
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Feb  5 04:38:09 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Feb  5 04:39:36 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=9215056d

bin/ebuild-helpers/newins: ${*:3} for explicit concatenation

Reported-by: R0b0t1 <r030t1 <AT> gmail.com>

 bin/ebuild-helpers/newins | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/ebuild-helpers/newins b/bin/ebuild-helpers/newins
index 8032a8f2f..30e54b7e5 100755
--- a/bin/ebuild-helpers/newins
+++ b/bin/ebuild-helpers/newins
@@ -12,7 +12,7 @@ if [[ -z ${T} ]] || [[ -z ${2} ]] ; then
 fi
 
 (($#>2)) && \
-	eqawarn "QA Notice: ${helper} called with more than 2 arguments: ${@:3}"
+	eqawarn "QA Notice: ${helper} called with more than 2 arguments: ${*:3}"
 
 stdin=
 if ___eapi_newins_supports_reading_from_standard_input && [[ $1 == "-" ]]; then


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2018-03-04  2:41 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2018-03-04  2:41 UTC (permalink / raw
  To: gentoo-commits

commit:     aff97baa3625cabdf71fea9a0256381282040860
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Sun Mar  4 02:33:44 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Mar  4 02:40:47 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=aff97baa

prepstrip: Preserve xattr outside of user namespace.

Pass '-m -' to getfattr for including all extended attributes, because
getfattr defaults to including only user.* extended attributes.

Bug: https://bugs.gentoo.org/649524

 bin/ebuild-helpers/prepstrip | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index ea5c0dc09..929547ae5 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -35,7 +35,7 @@ if [[ ${KERNEL} == linux ]] && ${FEATURES_xattr} ; then
 	PRESERVE_XATTR=true
 	if type -P getfattr >/dev/null && type -P setfattr >/dev/null ; then
 		dump_xattrs() {
-			getfattr -d --absolute-names "$1"
+			getfattr -d -m - --absolute-names "$1"
 		}
 		restore_xattrs() {
 			setfattr --restore=-


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2018-03-08 21:50 Michał Górny
  0 siblings, 0 replies; 114+ messages in thread
From: Michał Górny @ 2018-03-08 21:50 UTC (permalink / raw
  To: gentoo-commits

commit:     15b84985370820af47247eef7ca3fdb7676ab987
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  8 19:50:51 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Mar  8 21:49:45 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=15b84985

ebuild-helpers: Fix overriding 'insinto' directory

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

 bin/ebuild-helpers/doconfd  | 9 +++++++--
 bin/ebuild-helpers/doenvd   | 9 +++++++--
 bin/ebuild-helpers/doheader | 6 +++++-
 3 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/bin/ebuild-helpers/doconfd b/bin/ebuild-helpers/doconfd
index 38cf58234..15ad980f3 100755
--- a/bin/ebuild-helpers/doconfd
+++ b/bin/ebuild-helpers/doconfd
@@ -2,10 +2,15 @@
 # Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
+source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
+
 if [[ $# -lt 1 ]] ; then
-	source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
 	__helpers_die "${0##*/}: at least one argument needed"
 	exit 1
 fi
 
-_E_INSDESTTREE_='/etc/conf.d/' exec doins "$@"
+export _E_INSDESTTREE_='/etc/conf.d/'
+if ___eapi_has_DESTTREE_INSDESTTREE; then
+	export INSDESTTREE=${_E_INSDESTTREE_}
+fi
+exec doins "$@"

diff --git a/bin/ebuild-helpers/doenvd b/bin/ebuild-helpers/doenvd
index a15cec7f2..f14b95104 100755
--- a/bin/ebuild-helpers/doenvd
+++ b/bin/ebuild-helpers/doenvd
@@ -2,10 +2,15 @@
 # Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
+source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
+
 if [[ $# -lt 1 ]] ; then
-	source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
 	__helpers_die "${0##*/}: at least one argument needed"
 	exit 1
 fi
 
-_E_INSDESTTREE_='/etc/env.d/' exec doins "$@"
+export _E_INSDESTTREE_='/etc/env.d/'
+if ___eapi_has_DESTTREE_INSDESTTREE; then
+	export INSDESTTREE=${_E_INSDESTTREE_}
+fi
+exec doins "$@"

diff --git a/bin/ebuild-helpers/doheader b/bin/ebuild-helpers/doheader
index 03bf23b1c..aedc2322a 100755
--- a/bin/ebuild-helpers/doheader
+++ b/bin/ebuild-helpers/doheader
@@ -13,4 +13,8 @@ if [[ $# -lt 1 ]] || [[ $1 == -r && $# -lt 2 ]] ; then
 	exit 1
 fi
 
-_E_INSDESTTREE_='/usr/include/' exec doins "$@"
+export _E_INSDESTTREE_='/usr/include/'
+if ___eapi_has_DESTTREE_INSDESTTREE; then
+	export INSDESTTREE=${_E_INSDESTTREE_}
+fi
+exec doins "$@"


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2018-03-11 11:44 Michał Górny
  0 siblings, 0 replies; 114+ messages in thread
From: Michał Górny @ 2018-03-11 11:44 UTC (permalink / raw
  To: gentoo-commits

commit:     61667248130fcf279047472875d03fa65520d084
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 21 17:19:12 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Mar 11 11:43:41 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=61667248

nonfatal: Implement fallback executable for EAPI 7

EAPI 7 specifies that nonfatal has to be implemented both as a bash
function and a fallback executable, so that it can be used e.g. via
find/xargs.

Bug: https://bugs.gentoo.org/622894

 bin/ebuild-helpers/nonfatal | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/bin/ebuild-helpers/nonfatal b/bin/ebuild-helpers/nonfatal
new file mode 100755
index 000000000..5da07cc71
--- /dev/null
+++ b/bin/ebuild-helpers/nonfatal
@@ -0,0 +1,14 @@
+#!/bin/bash
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
+
+if ! ___eapi_has_nonfatal; then
+	die "${0##*/} not supported in this EAPI"
+fi
+if [[ $# -lt 1 ]]; then
+	die "${0##*/}: Missing argument"
+fi
+
+PORTAGE_NONFATAL=1 exec "$@"


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2018-03-14 17:04 Michał Górny
  0 siblings, 0 replies; 114+ messages in thread
From: Michał Górny @ 2018-03-14 17:04 UTC (permalink / raw
  To: gentoo-commits

commit:     c1a2ba57421a0a6fd0463e2a002fe1965f055efc
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 14 10:19:49 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Mar 14 17:04:28 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=c1a2ba57

prepstrip: Fix double slash in pre-stripped list

Fixes: 244a62a4f275e4282dc040be3c049e593c36c0ce
Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>

 bin/ebuild-helpers/prepstrip | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 9b895c60b..2136e0d4d 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -255,7 +255,7 @@ if ! ${RESTRICT_binchecks} && ! ${RESTRICT_strip} ; then
 	# and start stripping the files ourselves.  The log parsing can be done in
 	# parallel though.
 	log=${tmpdir}/scanelf-already-stripped.log
-	scanelf -yqRBF '#k%F' -k '!.symtab' "$@" | sed -e "s#^${ED%/}##" > "${log}"
+	scanelf -yqRBF '#k%F' -k '!.symtab' "$@" | sed -e "s#^${ED%/}/##" > "${log}"
 	(
 	__multijob_child_init
 	qa_var="QA_PRESTRIPPED_${ARCH/-/_}"


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2018-05-04 15:56 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2018-05-04 15:56 UTC (permalink / raw
  To: gentoo-commits

commit:     256bcb665fcd37356c02a08a3e2a12d415a5d656
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri May  4 15:55:59 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri May  4 15:55:59 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=256bcb66

ecompressdir: fix slash normalization (bug 654838)

This solves the following error, for EAPI 7 ebuilds using newdoc as shown:

mv: cannot move '/var/tmp/portage/portage-test/foo-1/temp/ecompress-skip/usr/share/doc/foo-1/html' to
'/var/tmp/portage/portage-test/foo-1/imageusr/share/doc/foo-1/html/html': Directory not empty

EAPI=7
src_install() {
	docinto html
	newdoc /dev/null null.html
}

Fixes: 244a62a4f275 ("Fix uses of D/ED to account for no trailing slash")

 bin/ebuild-helpers/ecompressdir | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir
index fb4c39f2b..dacb857be 100755
--- a/bin/ebuild-helpers/ecompressdir
+++ b/bin/ebuild-helpers/ecompressdir
@@ -139,7 +139,7 @@ funk_up_dir() {
 # Move all files and directories we want to skip running compression
 # on from srctree to dsttree.
 _relocate_skip_dirs() {
-	local srctree="$1" dsttree="$2"
+	local srctree="${1%/}" dsttree="${2%/}"
 
 	[[ -d ${srctree} ]] || return 0
 
@@ -213,7 +213,7 @@ for dir in "$@" ; do
 
 	# now lets do our work
 	if [[ -n ${suffix} ]] ; then
-		__vecho "${0##*/}: $(ecompress --bin) /${actual_dir#${ED%/}}"
+		__vecho "${0##*/}: $(ecompress --bin) /${actual_dir#${ED%/}/}"
 		funk_up_dir "compress" "${suffix}" "ecompress" "${size_limit}"
 		: $(( ret |= $? ))
 	fi


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2018-09-17  6:45 Michał Górny
  0 siblings, 0 replies; 114+ messages in thread
From: Michał Górny @ 2018-09-17  6:45 UTC (permalink / raw
  To: gentoo-commits

commit:     1f8eedc8a6d030f5a4fa204fe68b693961e5e7c3
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 22 20:35:17 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Sep 17 06:44:55 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=1f8eedc8

Ban prepallinfo for ebuild scope use

Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>

 bin/ebuild-helpers/prepall     | 4 ++--
 bin/ebuild-helpers/prepallinfo | 9 ++-------
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/bin/ebuild-helpers/prepall b/bin/ebuild-helpers/prepall
index bc77af4a1..c2d879f37 100755
--- a/bin/ebuild-helpers/prepall
+++ b/bin/ebuild-helpers/prepall
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
@@ -17,7 +17,7 @@ if has chflags $FEATURES ; then
 fi
 
 prepallman
-prepallinfo
+[[ -d ${ED%/}/usr/share/info ]] && prepinfo
 
 ___eapi_has_dostrip || prepallstrip
 

diff --git a/bin/ebuild-helpers/prepallinfo b/bin/ebuild-helpers/prepallinfo
index 34d6a74b7..e23a6d410 100755
--- a/bin/ebuild-helpers/prepallinfo
+++ b/bin/ebuild-helpers/prepallinfo
@@ -4,10 +4,5 @@
 
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
 
-if ! ___eapi_has_prefix_variables; then
-	ED=${D}
-fi
-
-[[ -d ${ED%/}/usr/share/info ]] || exit 0
-
-exec prepinfo
+die "'${0##*/}' is not allowed in ebuild scope"
+exit 1


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2018-09-17  6:45 Michał Górny
  0 siblings, 0 replies; 114+ messages in thread
From: Michał Górny @ 2018-09-17  6:45 UTC (permalink / raw
  To: gentoo-commits

commit:     be5877962bfdf949f887a61f03e1754286dd5ffd
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 22 20:59:59 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Sep 17 06:45:11 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=be587796

Ban prepalldocs in ebuild scope

Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>

 bin/ebuild-helpers/prepalldocs | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)

diff --git a/bin/ebuild-helpers/prepalldocs b/bin/ebuild-helpers/prepalldocs
index 6cdceb318..e23a6d410 100755
--- a/bin/ebuild-helpers/prepalldocs
+++ b/bin/ebuild-helpers/prepalldocs
@@ -4,20 +4,5 @@
 
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
 
-if ___eapi_has_docompress; then
-	die "'${0##*/}' has been banned for EAPI '$EAPI'"
-	exit 1
-fi
-
-if [[ -n $1 ]] ; then
-	__vecho "${0##*/}: invalid usage; takes no arguments" 1>&2
-fi
-
-if ! ___eapi_has_prefix_variables; then
-	ED=${D}
-fi
-
-[[ -d ${ED%/}/usr/share/doc ]] || exit 0
-
-ecompressdir --ignore /usr/share/doc/${PF}/html
-ecompressdir --queue /usr/share/doc
+die "'${0##*/}' is not allowed in ebuild scope"
+exit 1


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2018-09-17  6:45 Michał Górny
  0 siblings, 0 replies; 114+ messages in thread
From: Michał Górny @ 2018-09-17  6:45 UTC (permalink / raw
  To: gentoo-commits

commit:     efee1fa6e50aab511c42d995d2fd2f89d9cdecd6
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 22 20:36:59 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Sep 17 06:45:09 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=efee1fa6

Ban prepallman in ebuild scope

Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>

 bin/ebuild-helpers/prepall    |  7 ++++++-
 bin/ebuild-helpers/prepallman | 20 +++-----------------
 2 files changed, 9 insertions(+), 18 deletions(-)

diff --git a/bin/ebuild-helpers/prepall b/bin/ebuild-helpers/prepall
index c2d879f37..87e1ca20c 100755
--- a/bin/ebuild-helpers/prepall
+++ b/bin/ebuild-helpers/prepall
@@ -16,7 +16,12 @@ if has chflags $FEATURES ; then
 	chflags -R nosunlnk,nouunlnk "${ED}" 2>/dev/null
 fi
 
-prepallman
+if ! ___eapi_has_docompress; then
+	while IFS= read -r -d '' mandir ; do
+		mandir=${mandir#${ED}}
+		prepman "${mandir%/man}"
+	done < <(find "${ED}" -type d -name man -print0)
+fi
 [[ -d ${ED%/}/usr/share/info ]] && prepinfo
 
 ___eapi_has_dostrip || prepallstrip

diff --git a/bin/ebuild-helpers/prepallman b/bin/ebuild-helpers/prepallman
index 03b10a8da..e23a6d410 100755
--- a/bin/ebuild-helpers/prepallman
+++ b/bin/ebuild-helpers/prepallman
@@ -1,22 +1,8 @@
 #!/bin/bash
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
 
-# replaced by controllable compression in EAPI 4
-___eapi_has_docompress && exit 0
-
-if ! ___eapi_has_prefix_variables; then
-	ED=${D}
-fi
-
-ret=0
-
-while IFS= read -r -d '' mandir ; do
-	mandir=${mandir#${ED}}
-	prepman "${mandir%/man}"
-	((ret|=$?))
-done < <(find "${ED}" -type d -name man -print0)
-
-exit ${ret}
+die "'${0##*/}' is not allowed in ebuild scope"
+exit 1


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2018-09-17 18:18 Michał Górny
  0 siblings, 0 replies; 114+ messages in thread
From: Michał Górny @ 2018-09-17 18:18 UTC (permalink / raw
  To: gentoo-commits

commit:     a90bafde1cab2db1f4d6fc65e7bf1b66df680449
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 23 08:18:20 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Sep 17 18:16:33 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=a90bafde

f{owners,perms}: Warn when using relative path

Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>
Closes: https://github.com/gentoo/portage/pull/364

 bin/ebuild-helpers/fowners | 15 +++++++++++++++
 bin/ebuild-helpers/fperms  | 15 +++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/bin/ebuild-helpers/fowners b/bin/ebuild-helpers/fowners
index 68004210b..0eda73e58 100755
--- a/bin/ebuild-helpers/fowners
+++ b/bin/ebuild-helpers/fowners
@@ -8,6 +8,21 @@ if ! ___eapi_has_prefix_variables; then
 	EPREFIX= ED=${D}
 fi
 
+got_owner=
+for arg; do
+	[[ ${arg} == -* ]] && continue
+	if [[ ! ${got_owner} ]]; then
+		got_owner=1
+		continue
+	fi
+	if [[ ${arg} != /* ]]; then
+		eqawarn "Relative path passed to '${0##*/}': ${arg}"
+		eqawarn "This is unsupported. Please use 'chown' when you need to work on files"
+		eqawarn "outside the installation image (\${ED})."
+	fi
+done
+
+
 # we can't prefix all arguments because
 # chown takes random options
 slash="/"

diff --git a/bin/ebuild-helpers/fperms b/bin/ebuild-helpers/fperms
index c63a6abc3..f98560039 100755
--- a/bin/ebuild-helpers/fperms
+++ b/bin/ebuild-helpers/fperms
@@ -8,6 +8,21 @@ if ! ___eapi_has_prefix_variables; then
 	ED=${D}
 fi
 
+got_mode=
+for arg; do
+	# - can either be an option or a mode string
+	[[ ${arg} == -* && ${arg} != -[ugorwxXst] ]] && continue
+	if [[ ! ${got_mode} ]]; then
+		got_mode=1
+		continue
+	fi
+	if [[ ${arg} != /* ]]; then
+		eqawarn "Relative path passed to '${0##*/}': ${arg}"
+		eqawarn "This is unsupported. Please use 'chmod' when you need to work on files"
+		eqawarn "outside the installation image (\${ED})."
+	fi
+done
+
 # we can't prefix all arguments because
 # chmod takes random options
 slash="/"


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2018-12-22  0:08 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2018-12-22  0:08 UTC (permalink / raw
  To: gentoo-commits

commit:     daeb75b345c4433218ab9e7a5319e8914092f048
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 20 16:43:13 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Dec 22 00:07:32 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=daeb75b3

bin/ebuild-helpers/portageq: match against portage/bin/ebuild-helpers

In case PORTAGE_OVERRIDE_EPREFIX is modified in the environment,
the actual ebuild-helpers PATH will not match PORTAGE_OVERRIDE_EPREFIX.

Closes: https://github.com/gentoo/portage/pull/389
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 bin/ebuild-helpers/portageq | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/ebuild-helpers/portageq b/bin/ebuild-helpers/portageq
index b314bce9f..45fa85d86 100755
--- a/bin/ebuild-helpers/portageq
+++ b/bin/ebuild-helpers/portageq
@@ -13,7 +13,7 @@ set -f # in case ${PATH} contains any shell glob characters
 
 for path in ${PATH}; do
 	[[ -x ${path}/${scriptname} ]] || continue
-	[[ ${path} == ${PORTAGE_OVERRIDE_EPREFIX}/usr/lib*/portage/* ]] && continue
+	[[ ${path} == */portage/*/ebuild-helpers* ]] && continue
 	[[ ${path} == */._portage_reinstall_.* ]] && continue
 	[[ ${path}/${scriptname} -ef ${scriptpath} ]] && continue
 	PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2019-10-02 22:22 Ulrich Müller
  0 siblings, 0 replies; 114+ messages in thread
From: Ulrich Müller @ 2019-10-02 22:22 UTC (permalink / raw
  To: gentoo-commits

commit:     87193bc3da112b8bdb42a2698514fcb047cf6989
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Oct  2 10:07:09 2019 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Oct  2 22:19:17 2019 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=87193bc3

doins: Fix directory install options when called as dodoc.

PMS does not mention that diropts should be respected when dodoc -r
creates directories recursively. This is consistent with the behaviour
for regular files, where insopts isn't respected either.

A parallel patch for further clarification of the PMS wording has been
sent to the gentoo-pms mailing list for review.

Acked-by: Zac Medico <zmedico <AT> gentoo.org>
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 bin/ebuild-helpers/doins | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bin/ebuild-helpers/doins b/bin/ebuild-helpers/doins
index fb5fc7c7c..24fe48121 100755
--- a/bin/ebuild-helpers/doins
+++ b/bin/ebuild-helpers/doins
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
@@ -15,6 +15,7 @@ if [[ ${helper} == dodoc ]] ; then
 		exit 0
 	fi
 	export INSOPTIONS=-m0644
+	export DIROPTIONS=""
 	export _E_INSDESTTREE_=usr/share/doc/${PF}/${_E_DOCDESTTREE_}
 else
 	if ! ___eapi_has_DESTTREE_INSDESTTREE; then


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2020-01-23  5:58 Zac Medico
  0 siblings, 0 replies; 114+ messages in thread
From: Zac Medico @ 2020-01-23  5:58 UTC (permalink / raw
  To: gentoo-commits

commit:     dfeae52bdb90763b9144cbb6a82ffc3b8b49d0f6
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 19 18:40:56 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jan 23 05:58:04 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=dfeae52b

dosym: revert deprecated prefix compat (bug 615594)

According to PMS, dosym callers need to explicitly prefix the first
argument with ${EPREFIX} if that's desired.

https://bugs.gentoo.org/615594
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 bin/ebuild-helpers/dosym | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/bin/ebuild-helpers/dosym b/bin/ebuild-helpers/dosym
index d5a651bf5..abd4da4f0 100755
--- a/bin/ebuild-helpers/dosym
+++ b/bin/ebuild-helpers/dosym
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
@@ -20,16 +20,7 @@ fi
 
 destdir=${2%/*}
 [[ ! -d ${ED%/}/${destdir#/} ]] && dodir "${destdir}"
-target="${1}"
-# DEPRECATED HACK: when absolute, prefix with offset for Gentoo Prefix
-# (but only if ${EPREFIX} is not there already)
-# this will eventually be removed, #615594
-if [[ ${target:0:1} == "/" && ${target}/ != "${EPREFIX}"/* ]]; then
-	eqawarn "dosym: prepending EPREFIX to path implicitly. If this is desired,"
-	eqawarn "       please fix the ebuild to use \${EPREFIX} explicitly."
-	target="${EPREFIX}${target}"
-fi
-ln -snf "${target}" "${ED%/}/${2#/}"
+ln -snf "${1}" "${ED%/}/${2#/}"
 
 ret=$?
 [[ $ret -ne 0 ]] && __helpers_die "${0##*/} failed"


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2022-06-26 18:08 Mike Gilbert
  0 siblings, 0 replies; 114+ messages in thread
From: Mike Gilbert @ 2022-06-26 18:08 UTC (permalink / raw
  To: gentoo-commits

commit:     d24c2a0fa03b8bf226cab97f681dc152beaf3040
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 26 16:53:00 2022 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Jun 26 17:29:26 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=d24c2a0f

dosym: fix EAPI check for -r flag

Fixes: dfa50503f76f3e70bac50f959a9c7248e6ea880d
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 bin/ebuild-helpers/dosym | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/ebuild-helpers/dosym b/bin/ebuild-helpers/dosym
index 69d38956f..9672ed722 100755
--- a/bin/ebuild-helpers/dosym
+++ b/bin/ebuild-helpers/dosym
@@ -5,7 +5,7 @@
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
 
 option_r=
-if [[ ___eapi_has_dosym_r && $1 == -r ]]; then
+if ___eapi_has_dosym_r && [[ $1 == -r ]]; then
 	option_r=t
 	shift
 fi


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2022-07-27 19:05 Fabian Groffen
  0 siblings, 0 replies; 114+ messages in thread
From: Fabian Groffen @ 2022-07-27 19:05 UTC (permalink / raw
  To: gentoo-commits

commit:     adcabc001024f6398625145e99261f8e216c0e2e
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 26 18:36:29 2022 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Jul 27 19:04:48 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=adcabc00

bin/ebuild-helpers/doins: fix D check, add EPREFIX check

ED = D/EPREFIX, so checking for ED includes EPREFIX, which when this is
absent fails to check for D.  Simply check for D instead, which catches
both the case for D and ED.

Add check for usage of EPREFIX, like for using D with helpers.

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 bin/ebuild-helpers/doins | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/bin/ebuild-helpers/doins b/bin/ebuild-helpers/doins
index 6c6be31bb..a5fc224a9 100755
--- a/bin/ebuild-helpers/doins
+++ b/bin/ebuild-helpers/doins
@@ -42,7 +42,7 @@ if ! ___eapi_has_prefix_variables; then
 	export ED="${D}"
 fi
 
-if [[ ${_E_INSDESTTREE_#${ED}} != "${_E_INSDESTTREE_}" ]]; then
+if [[ ${_E_INSDESTTREE_#${D}} != "${_E_INSDESTTREE_}" ]]; then
 	__vecho "-------------------------------------------------------" 1>&2
 	__vecho "You should not use \${D} or \${ED} with helpers." 1>&2
 	__vecho "  --> ${_E_INSDESTTREE_}" 1>&2
@@ -50,6 +50,16 @@ if [[ ${_E_INSDESTTREE_#${ED}} != "${_E_INSDESTTREE_}" ]]; then
 	__helpers_die "${helper} used with \${D} or \${ED}"
 	exit 1
 fi
+if [[ -n ${EPREFIX} && \
+		${_E_INSDESTTREE_#${EPREFIX}} != "${_E_INSDESTTREE_}" ]]
+then
+	__vecho "-------------------------------------------------------" 1>&2
+	__vecho "You should not use \${EPREFIX} with helpers." 1>&2
+	__vecho "  --> ${_E_INSDESTTREE_}" 1>&2
+	__vecho "-------------------------------------------------------" 1>&2
+	__helpers_die "${helper} used with \${EPREFIX}"
+	exit 1
+fi
 
 if ___eapi_doins_and_newins_preserve_symlinks; then
 	DOINS_ARGS+=( --preserve_symlinks )


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2023-04-06  8:08 Ulrich Müller
  0 siblings, 0 replies; 114+ messages in thread
From: Ulrich Müller @ 2023-04-06  8:08 UTC (permalink / raw
  To: gentoo-commits

commit:     5e58a0d413d4154262f966759d05fe952075c965
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Apr  5 16:36:49 2023 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Apr  5 16:36:49 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=5e58a0d4

prepinfo: Deprecate

According to PMS, calling prepinfo from ebuilds was never allowed.
Last usage in Gentoo repository has been removed on 2018-11-22.

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

 bin/ebuild-helpers/prepinfo | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bin/ebuild-helpers/prepinfo b/bin/ebuild-helpers/prepinfo
index 14fa38226..af5ae9f08 100755
--- a/bin/ebuild-helpers/prepinfo
+++ b/bin/ebuild-helpers/prepinfo
@@ -1,9 +1,11 @@
 #!/usr/bin/env bash
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
 
+eqawarn "QA Notice: '${0##*/}' is not allowed in ebuild scope"
+
 if ! ___eapi_has_prefix_variables ; then
 	ED=${D}
 fi


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2023-04-06  8:08 Ulrich Müller
  0 siblings, 0 replies; 114+ messages in thread
From: Ulrich Müller @ 2023-04-06  8:08 UTC (permalink / raw
  To: gentoo-commits

commit:     1cd31f6e6d243153b3901678cf83aef634722181
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Apr  5 16:37:45 2023 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Apr  5 16:37:45 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=1cd31f6e

prepman: Deprecate

According to PMS, calling prepman from ebuilds was never allowed.
Last usage in Gentoo repository has been removed on 2019-04-14.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 bin/ebuild-helpers/prepman | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/bin/ebuild-helpers/prepman b/bin/ebuild-helpers/prepman
index 871fd589b..0c0a7e812 100755
--- a/bin/ebuild-helpers/prepman
+++ b/bin/ebuild-helpers/prepman
@@ -1,8 +1,12 @@
 #!/usr/bin/env bash
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # Note: this really does nothing these days. It's going to be banned
 # when the last consumers are gone.
 
+source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
+
+eqawarn "QA Notice: '${0##*/}' is not allowed in ebuild scope"
+
 exit 0


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2023-04-30 19:31 Ulrich Müller
  0 siblings, 0 replies; 114+ messages in thread
From: Ulrich Müller @ 2023-04-30 19:31 UTC (permalink / raw
  To: gentoo-commits

commit:     f979b313a858358d77b2c67eb1036cb9b7b9a571
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 30 07:31:38 2023 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Apr 30 18:13:10 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=f979b313

fowners, fperms: Restore QA warning

Suggested-by: Michał Górny <mgorny <AT> gentoo.org>
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 bin/ebuild-helpers/fowners | 6 ++++++
 bin/ebuild-helpers/fperms  | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/bin/ebuild-helpers/fowners b/bin/ebuild-helpers/fowners
index a6409e40d..fa4e3c0d7 100755
--- a/bin/ebuild-helpers/fowners
+++ b/bin/ebuild-helpers/fowners
@@ -19,6 +19,12 @@ for arg; do
 		args+=( "${arg}" )
 	else
 		args+=( "${ED%/}/${arg#/}" )
+		# remove the QA warning after 2024-12-31
+		if [[ ${arg:0:1} != / ]]; then
+			eqawarn "${0##*/}: Path '${arg}' does not start with '/'."
+			eqawarn "This is unsupported. Add a slash for a path in \${ED},"
+			eqawarn "or use 'chown' for a path relative to the working dir."
+		fi
 	fi
 done
 

diff --git a/bin/ebuild-helpers/fperms b/bin/ebuild-helpers/fperms
index 989075eb7..d52f5a767 100755
--- a/bin/ebuild-helpers/fperms
+++ b/bin/ebuild-helpers/fperms
@@ -20,6 +20,12 @@ for arg; do
 		args+=( "${arg}" )
 	else
 		args+=( "${ED%/}/${arg#/}" )
+		# remove the QA warning after 2024-12-31
+		if [[ ${arg:0:1} != / ]]; then
+			eqawarn "${0##*/}: Path '${arg}' does not start with '/'."
+			eqawarn "This is unsupported. Add a slash for a path in \${ED},"
+			eqawarn "or use 'chmod' for a path relative to the working dir."
+		fi
 	fi
 done
 


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2023-04-30 19:31 Ulrich Müller
  0 siblings, 0 replies; 114+ messages in thread
From: Ulrich Müller @ 2023-04-30 19:31 UTC (permalink / raw
  To: gentoo-commits

commit:     412a0443b3d0520ef66cd9c217d166dde7d0d55f
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 28 11:32:32 2023 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Apr 30 07:54:34 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=412a0443

fowners: Drop unused EPREFIX variable

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 bin/ebuild-helpers/fowners | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/ebuild-helpers/fowners b/bin/ebuild-helpers/fowners
index ca847cd26..a6409e40d 100755
--- a/bin/ebuild-helpers/fowners
+++ b/bin/ebuild-helpers/fowners
@@ -5,7 +5,7 @@
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
 
 if ! ___eapi_has_prefix_variables; then
-	EPREFIX= ED=${D}
+	ED=${D}
 fi
 
 args=()


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

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

commit:     ab538e7750fb85d57a3eb9d9b440848c1f2c074a
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Thu May 11 17:27:51 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu May 11 20:15:46 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=ab538e77

ebuild-helpers/portageq: Deprecate

Calling portageq from ebuilds was never allowed.
Last usage was removed from Gentoo repository on 2019-03-14.

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

 bin/ebuild-helpers/portageq | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/bin/ebuild-helpers/portageq b/bin/ebuild-helpers/portageq
index 7d14f54c2..0df0cd273 100755
--- a/bin/ebuild-helpers/portageq
+++ b/bin/ebuild-helpers/portageq
@@ -1,10 +1,14 @@
 #!/usr/bin/env bash
-# Copyright 2009-2015 Gentoo Foundation
+# 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
 


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

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

commit:     63d6f2e8985de480c21a5c2f09bba1547c7de6b8
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Thu May 11 17:30:27 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu May 11 20:15:47 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=63d6f2e8

prep{,all}strip: Deprecate in all EAPIs

Calling these commands from ebuilds was never allowed.
Last usage was removed from Gentoo repository on 2019-04-14.

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

 bin/ebuild-helpers/prepallstrip | 4 +++-
 bin/ebuild-helpers/prepstrip    | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/bin/ebuild-helpers/prepallstrip b/bin/ebuild-helpers/prepallstrip
index 2f9c0f70e..f22483a53 100755
--- a/bin/ebuild-helpers/prepallstrip
+++ b/bin/ebuild-helpers/prepallstrip
@@ -1,5 +1,5 @@
 #!/usr/bin/env bash
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
@@ -8,6 +8,8 @@ if ___eapi_has_dostrip; then
 	die "${0##*/}: ${0##*/} has been banned for EAPI '${EAPI}'; use 'dostrip' instead"
 fi
 
+eqawarn "QA Notice: '${0##*/}' is not allowed in ebuild scope"
+
 if ! ___eapi_has_prefix_variables; then
 	ED=${D}
 fi

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index 789296050..0da4c6516 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -1,5 +1,5 @@
 #!/usr/bin/env bash
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
@@ -8,4 +8,6 @@ if ___eapi_has_dostrip; then
 	die "${0##*/}: ${0##*/} has been banned for EAPI '${EAPI}'; use 'dostrip' instead"
 fi
 
+eqawarn "QA Notice: '${0##*/}' is not allowed in ebuild scope"
+
 __PORTAGE_HELPER=prepstrip exec "${PORTAGE_BIN_PATH}"/estrip "${@}"


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2023-06-07  7:16 Ulrich Müller
  0 siblings, 0 replies; 114+ messages in thread
From: Ulrich Müller @ 2023-06-07  7:16 UTC (permalink / raw
  To: gentoo-commits

commit:     5fc12989359ff6698ede5dc67e69ccf740aa4f4c
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  7 07:06:10 2023 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Jun  7 07:06:10 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=5fc12989

dosym: Don't add a spurious newline to the path

Bash's <<< operator will append a newline to the string, therefore use
echo -n instead.

Fixes: 65bb6ae01f359d82be453bf01a9e8f49171d8436
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 bin/ebuild-helpers/dosym | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/ebuild-helpers/dosym b/bin/ebuild-helpers/dosym
index 9ed27b8ce..c87cf42b2 100755
--- a/bin/ebuild-helpers/dosym
+++ b/bin/ebuild-helpers/dosym
@@ -33,7 +33,7 @@ if [[ ${option_r} ]]; then
 	dosym_canonicalize() {
 		local path slash i prev out IFS=/
 
-		read -r -d '' -a path <<< "${1}"
+		read -r -d '' -a path < <(echo -n "${1}")
 		[[ ${1} == /* ]] && slash=/
 
 		while true; do


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2023-06-07  9:02 Ulrich Müller
  0 siblings, 0 replies; 114+ messages in thread
From: Ulrich Müller @ 2023-06-07  9:02 UTC (permalink / raw
  To: gentoo-commits

commit:     5461ae06e8cdfe7a6b275713ed5226258b528af1
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  7 08:44:38 2023 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Jun  7 08:56:55 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=5461ae06

dosym: Fix another corner case of strange input

echo doesn't work as expected when the first argument is "-e".
Thanks to tirnanog in #gentoo-portage for pointing this out.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 bin/ebuild-helpers/dosym | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/ebuild-helpers/dosym b/bin/ebuild-helpers/dosym
index c87cf42b2..89ee66a96 100755
--- a/bin/ebuild-helpers/dosym
+++ b/bin/ebuild-helpers/dosym
@@ -33,7 +33,7 @@ if [[ ${option_r} ]]; then
 	dosym_canonicalize() {
 		local path slash i prev out IFS=/
 
-		read -r -d '' -a path < <(echo -n "${1}")
+		read -r -d '' -a path < <(printf '%s\0' "${1}")
 		[[ ${1} == /* ]] && slash=/
 
 		while true; do
@@ -58,7 +58,7 @@ if [[ ${option_r} ]]; then
 		done
 
 		out="${slash}${path[*]}"
-		echo "${out:-.}"
+		printf "%s\n" "${out:-.}"
 	}
 
 	# Expansion makes sense only for an absolute target path


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

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

commit:     f6e0fae115190d28957f8a7653a4118c4d3aed31
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri May 12 17:28:49 2023 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Oct 21 08:01:24 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=f6e0fae1

prepman: Ban in ebuild scope

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 bin/ebuild-helpers/prepman | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/bin/ebuild-helpers/prepman b/bin/ebuild-helpers/prepman
index 0c0a7e8122..80fcecba60 100755
--- a/bin/ebuild-helpers/prepman
+++ b/bin/ebuild-helpers/prepman
@@ -2,11 +2,7 @@
 # Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-# Note: this really does nothing these days. It's going to be banned
-# when the last consumers are gone.
-
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
 
-eqawarn "QA Notice: '${0##*/}' is not allowed in ebuild scope"
-
-exit 0
+die "'${0##*/}' is not allowed in ebuild scope"
+exit 1


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

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

commit:     76a7c3c61f6e3779452b6b3675c32bda02c8c88c
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri May 12 17:34:59 2023 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Oct 21 08:01:25 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=76a7c3c6

portageq: Ban in ebuild scope

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

 bin/ebuild-helpers/portageq | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/ebuild-helpers/portageq b/bin/ebuild-helpers/portageq
index e3926e11af..bd9d6b0442 100755
--- a/bin/ebuild-helpers/portageq
+++ b/bin/ebuild-helpers/portageq
@@ -4,5 +4,5 @@
 
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
 
-eqawarn "QA Notice: '${0##*/}' is not allowed in ebuild scope"
-exec "${PORTAGE_BIN_PATH}"/portageq-wrapper "$@"
+die "'${0##*/}' is not allowed in ebuild scope"
+exit 1


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

* [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/
@ 2023-10-26 17:08 Ulrich Müller
  0 siblings, 0 replies; 114+ messages in thread
From: Ulrich Müller @ 2023-10-26 17:08 UTC (permalink / raw
  To: gentoo-commits

commit:     6903a68f1e0d57d866b46fe0ed3ccaf8c487c119
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 26 16:03:16 2023 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Thu Oct 26 16:44:22 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=6903a68f

prep*: Symlink banned helpers to prepall

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 bin/ebuild-helpers/prepall      | 2 +-
 bin/ebuild-helpers/prepalldocs  | 9 +--------
 bin/ebuild-helpers/prepallinfo  | 9 +--------
 bin/ebuild-helpers/prepallman   | 9 +--------
 bin/ebuild-helpers/prepallstrip | 9 +--------
 bin/ebuild-helpers/prepinfo     | 9 +--------
 bin/ebuild-helpers/prepman      | 9 +--------
 bin/ebuild-helpers/prepstrip    | 9 +--------
 8 files changed, 8 insertions(+), 57 deletions(-)

diff --git a/bin/ebuild-helpers/prepall b/bin/ebuild-helpers/prepall
index 6af94db030..80fcecba60 100755
--- a/bin/ebuild-helpers/prepall
+++ b/bin/ebuild-helpers/prepall
@@ -1,5 +1,5 @@
 #!/usr/bin/env bash
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1

diff --git a/bin/ebuild-helpers/prepalldocs b/bin/ebuild-helpers/prepalldocs
deleted file mode 100755
index 6af94db030..0000000000
--- a/bin/ebuild-helpers/prepalldocs
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
-
-die "'${0##*/}' is not allowed in ebuild scope"
-exit 1

diff --git a/bin/ebuild-helpers/prepalldocs b/bin/ebuild-helpers/prepalldocs
new file mode 120000
index 0000000000..87292339f4
--- /dev/null
+++ b/bin/ebuild-helpers/prepalldocs
@@ -0,0 +1 @@
+prepall
\ No newline at end of file

diff --git a/bin/ebuild-helpers/prepallinfo b/bin/ebuild-helpers/prepallinfo
deleted file mode 100755
index 6af94db030..0000000000
--- a/bin/ebuild-helpers/prepallinfo
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
-
-die "'${0##*/}' is not allowed in ebuild scope"
-exit 1

diff --git a/bin/ebuild-helpers/prepallinfo b/bin/ebuild-helpers/prepallinfo
new file mode 120000
index 0000000000..87292339f4
--- /dev/null
+++ b/bin/ebuild-helpers/prepallinfo
@@ -0,0 +1 @@
+prepall
\ No newline at end of file

diff --git a/bin/ebuild-helpers/prepallman b/bin/ebuild-helpers/prepallman
deleted file mode 100755
index 6af94db030..0000000000
--- a/bin/ebuild-helpers/prepallman
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
-
-die "'${0##*/}' is not allowed in ebuild scope"
-exit 1

diff --git a/bin/ebuild-helpers/prepallman b/bin/ebuild-helpers/prepallman
new file mode 120000
index 0000000000..87292339f4
--- /dev/null
+++ b/bin/ebuild-helpers/prepallman
@@ -0,0 +1 @@
+prepall
\ No newline at end of file

diff --git a/bin/ebuild-helpers/prepallstrip b/bin/ebuild-helpers/prepallstrip
deleted file mode 100755
index 80fcecba60..0000000000
--- a/bin/ebuild-helpers/prepallstrip
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
-
-die "'${0##*/}' is not allowed in ebuild scope"
-exit 1

diff --git a/bin/ebuild-helpers/prepallstrip b/bin/ebuild-helpers/prepallstrip
new file mode 120000
index 0000000000..87292339f4
--- /dev/null
+++ b/bin/ebuild-helpers/prepallstrip
@@ -0,0 +1 @@
+prepall
\ No newline at end of file

diff --git a/bin/ebuild-helpers/prepinfo b/bin/ebuild-helpers/prepinfo
deleted file mode 100755
index 80fcecba60..0000000000
--- a/bin/ebuild-helpers/prepinfo
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
-
-die "'${0##*/}' is not allowed in ebuild scope"
-exit 1

diff --git a/bin/ebuild-helpers/prepinfo b/bin/ebuild-helpers/prepinfo
new file mode 120000
index 0000000000..87292339f4
--- /dev/null
+++ b/bin/ebuild-helpers/prepinfo
@@ -0,0 +1 @@
+prepall
\ No newline at end of file

diff --git a/bin/ebuild-helpers/prepman b/bin/ebuild-helpers/prepman
deleted file mode 100755
index 80fcecba60..0000000000
--- a/bin/ebuild-helpers/prepman
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
-
-die "'${0##*/}' is not allowed in ebuild scope"
-exit 1

diff --git a/bin/ebuild-helpers/prepman b/bin/ebuild-helpers/prepman
new file mode 120000
index 0000000000..87292339f4
--- /dev/null
+++ b/bin/ebuild-helpers/prepman
@@ -0,0 +1 @@
+prepall
\ No newline at end of file

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
deleted file mode 100755
index 80fcecba60..0000000000
--- a/bin/ebuild-helpers/prepstrip
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1
-
-die "'${0##*/}' is not allowed in ebuild scope"
-exit 1

diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
new file mode 120000
index 0000000000..87292339f4
--- /dev/null
+++ b/bin/ebuild-helpers/prepstrip
@@ -0,0 +1 @@
+prepall
\ No newline at end of file


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

end of thread, other threads:[~2023-10-26 17:08 UTC | newest]

Thread overview: 114+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-23 22:29 [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/ Zac Medico
  -- strict thread matches above, loose matches on Subject: below --
2023-10-26 17:08 Ulrich Müller
2023-10-21 19:23 Ulrich Müller
2023-10-21 19:23 Ulrich Müller
2023-06-07  9:02 Ulrich Müller
2023-06-07  7:16 Ulrich Müller
2023-05-11 20:19 Sam James
2023-05-11 20:19 Sam James
2023-04-30 19:31 Ulrich Müller
2023-04-30 19:31 Ulrich Müller
2023-04-06  8:08 Ulrich Müller
2023-04-06  8:08 Ulrich Müller
2022-07-27 19:05 Fabian Groffen
2022-06-26 18:08 Mike Gilbert
2020-01-23  5:58 Zac Medico
2019-10-02 22:22 Ulrich Müller
2018-12-22  0:08 Zac Medico
2018-09-17 18:18 Michał Górny
2018-09-17  6:45 Michał Górny
2018-09-17  6:45 Michał Górny
2018-09-17  6:45 Michał Górny
2018-05-04 15:56 Zac Medico
2018-03-14 17:04 Michał Górny
2018-03-11 11:44 Michał Górny
2018-03-08 21:50 Michał Górny
2018-03-04  2:41 Zac Medico
2018-02-05  4:39 Zac Medico
2017-12-15 21:07 Zac Medico
2017-10-16 17:16 Zac Medico
2017-07-09 21:35 Michał Górny
2017-04-20 20:40 Michał Górny
2017-04-20 17:21 Ulrich Müller
2015-05-14 19:05 Brian Dolbec
2015-05-14  9:43 Mike Frysinger
2014-10-19 17:33 Zac Medico
2014-01-05 14:42 Mike Frysinger
2013-09-09 17:44 Zac Medico
2013-09-09 17:11 Zac Medico
2013-08-21 19:21 Zac Medico
2013-08-02 17:42 Zac Medico
2013-05-21 21:37 Zac Medico
2013-05-12 20:52 Zac Medico
2013-04-01  7:22 Zac Medico
2013-03-20 19:16 Mike Frysinger
2013-03-20  8:33 Mike Frysinger
2013-03-14  3:30 Zac Medico
2013-03-14  3:30 Zac Medico
2013-03-14  3:30 Zac Medico
2013-02-15 23:40 Zac Medico
2012-12-11  9:00 Zac Medico
2012-12-10 22:05 Zac Medico
2012-12-01 21:41 Zac Medico
2012-12-01 21:19 Zac Medico
2012-12-01 21:19 Zac Medico
2012-12-01  3:37 Zac Medico
2012-11-06  8:28 Zac Medico
2012-11-06  6:14 Zac Medico
2012-11-06  5:42 Zac Medico
2012-11-05  2:51 Zac Medico
2012-09-27  2:05 Zac Medico
2012-09-26 21:43 Zac Medico
2012-09-17  1:27 Zac Medico
2012-09-01 22:51 Zac Medico
2012-08-31 15:21 Ulrich Mueller
2012-08-25 21:13 Ulrich Mueller
2012-08-25 20:01 Zac Medico
2012-08-25 19:46 Zac Medico
2012-08-25 19:46 Zac Medico
2012-08-11 19:11 Zac Medico
2012-07-15 21:29 Zac Medico
2012-06-02  4:06 Zac Medico
2012-06-02  2:45 Zac Medico
2012-06-02  2:37 Zac Medico
2012-06-02  2:28 Zac Medico
2012-05-14 22:56 Zac Medico
2012-05-14 22:38 Zac Medico
2012-05-14 22:03 Zac Medico
2012-05-14 21:11 Zac Medico
2012-05-14 20:53 Zac Medico
2012-05-14 20:20 Mike Frysinger
2012-05-14 20:13 Zac Medico
2012-05-14 18:51 Mike Frysinger
2012-05-14 18:51 Mike Frysinger
2012-05-14  8:42 Zac Medico
2012-05-14  8:29 Zac Medico
2012-03-29 22:26 Zac Medico
2012-03-29 22:12 Zac Medico
2012-03-29 22:03 Zac Medico
2012-02-22 20:51 Zac Medico
2012-01-21 21:33 Zac Medico
2012-01-14 21:37 Mike Frysinger
2011-12-22 22:17 Zac Medico
2011-12-21 19:30 Zac Medico
2011-12-20  0:00 Zac Medico
2011-11-08 19:25 Zac Medico
2011-11-07  8:14 Zac Medico
2011-10-11 17:29 Mike Frysinger
2011-10-11 14:24 Mike Frysinger
2011-10-11 14:24 Mike Frysinger
2011-10-11  2:28 Mike Frysinger
2011-10-10  6:27 Zac Medico
2011-10-10  6:04 Zac Medico
2011-10-10  2:29 Mike Frysinger
2011-10-10  2:29 Mike Frysinger
2011-10-10  2:29 Mike Frysinger
2011-08-22 17:35 Zac Medico
2011-08-22 16:06 Zac Medico
2011-06-30  8:18 Zac Medico
2011-06-30  8:07 Zac Medico
2011-05-04 16:41 Zac Medico
2011-04-11 23:29 Zac Medico
2011-03-02  4:53 Zac Medico
2011-02-25 20:33 Zac Medico
2011-02-25 20:11 Zac Medico

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