public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-02-14  4:31 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-02-14  4:31 UTC (permalink / raw
  To: gentoo-commits

commit:     f514515a6b85286dcc84011143f9f550d96dc15a
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 13 08:33:51 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Feb 14 04:26:54 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f514515a

egencache: don't ignore as much with --tolerant

Errors returned from --update-use-local-desc and --update-changelogs
are no longer ignored with --tolerant. This will fix part of
bug #354687.

---
 bin/egencache |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/bin/egencache b/bin/egencache
index 76dd900..89d2fde 100755
--- a/bin/egencache
+++ b/bin/egencache
@@ -791,7 +791,10 @@ def egencache_main(args):
 			max_load=options.load_average,
 			rsync=options.rsync)
 		gen_cache.run()
-		ret.append(gen_cache.returncode)
+		if options.tolerant:
+			ret.append(os.EX_OK)
+		else:
+			ret.append(gen_cache.returncode)
 
 	if options.update_use_local_desc:
 		gen_desc = GenUseLocalDesc(portdb,
@@ -805,8 +808,6 @@ def egencache_main(args):
 		gen_clogs.run()
 		ret.append(gen_clogs.returncode)
 
-	if options.tolerant:
-		return ret[0]
 	return max(ret)
 
 if __name__ == "__main__":



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     907c7003b583ea9b14ec7886b2cdc4d94244515e
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon May 23 07:05:05 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 04:26:01 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=907c7003

repoman: pass type_name to Package constructor

---
 bin/repoman |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bin/repoman b/bin/repoman
index 2b62e8f..f59a34c 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -1166,7 +1166,7 @@ for x in scanlist:
 				fails["EAPI.unsupported"].append(os.path.join(x, y))
 				continue
 			pkgs[pf] = Package(cpv=cpv, metadata=myaux,
-				root_config=root_config)
+				root_config=root_config, type_name="ebuild")
 
 	# Sort ebuilds in ascending order for the KEYWORDS.dropped check.
 	pkgsplits = {}



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-05-26  6:18 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-05-26  6:18 UTC (permalink / raw
  To: gentoo-commits

commit:     56ec0cb6c960f55d974691e7f7944d5bd3a1a236
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed May 18 03:46:36 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May 26 03:12:19 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=56ec0cb6

etc-update: clear term when appropriate

This solves an issue like bug #142508, but involving etc-update instead
of dispatch-conf. This is also relevant to bug #70668, which is the
same issue, though the reporter suggested to use colors to delimit the
output instead of using clear.

---
 bin/etc-update |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/bin/etc-update b/bin/etc-update
index 03e9dc9..73a1f5d 100755
--- a/bin/etc-update
+++ b/bin/etc-update
@@ -149,6 +149,7 @@ sel_file() {
 		elif [ "${DELETE_ALL}" == "yes" ]; then
 			input=0
 		else
+			clear
 			if [[ ${mode} == 0 ]] ; then
 				echo "The following is the list of files which need updating, each
 configuration file is followed by a list of possible replacement files."
@@ -316,6 +317,7 @@ do_cfg() {
 		elif [[ "${DELETE_ALL}" == "yes" ]] && ! user_special "${ofile}"; then
 			my_input=2
 		else
+			clear
 			if [ "${using_editor}" == 0 ]; then
 				(
 					echo "Showing differences between ${ofile} and ${file}"
@@ -418,7 +420,9 @@ Please select from the menu above (-1 to exit, losing this merge): "
 				   rm ${rm_opts} "${file}"
 				   return 255
 				   ;;
-				2)	if [ "${using_editor}" == 0 ]; then
+				2)
+					clear
+					if [ "${using_editor}" == 0 ]; then
 						(
 							echo "Showing differences between ${ofile} and ${mfile}"
 							diff_command "${ofile}" "${mfile}"



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-05-05  6:48 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-05-05  6:48 UTC (permalink / raw
  To: gentoo-commits

commit:     fa46a260f42479f109696d526d7659404b2fa13c
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu May  5 06:44:48 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu May  5 06:44:48 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=fa46a260

repoman: make virtual.oldstyle a warning for now

This will give third-party repoman users some time to migrate their
repos away old-style virtuals.

---
 bin/repoman |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/bin/repoman b/bin/repoman
index 96cfdcd..2b62e8f 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -413,6 +413,7 @@ qawarnings = set((
 "portage.internal",
 "usage.obsolete",
 "upstream.workaround",
+"virtual.oldstyle",
 "LIVEVCS.stable",
 "LIVEVCS.unmasked",
 ))



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-05-04 20:03 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-05-04 20:03 UTC (permalink / raw
  To: gentoo-commits

commit:     8d113a9300bbdf94157529036eafd2902c810e07
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Gentoo <DOT> Org>
AuthorDate: Mon May  2 20:17:15 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed May  4 19:54:19 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=8d113a93

Avoid evaluation of values of variables in set_unless_changed().

---
 bin/ebuild.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index b610342..f3349ae 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -1654,7 +1654,7 @@ set_unless_changed() {
 		variable="${argument%%=*}"
 		value="${argument#*=}"
 		if eval "[[ \${${variable}} == \$(env -u ${variable} portageq envvar ${variable}) ]]"; then
-			eval "${variable}=\"${value}\""
+			eval "${variable}=\"\${value}\""
 		fi
 	done
 }



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-05-04 20:03 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-05-04 20:03 UTC (permalink / raw
  To: gentoo-commits

commit:     5a54ef28e31fc71a18e100d9af97bd30a3c9cab7
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon May  2 17:56:51 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed May  4 19:51:38 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5a54ef28

ebuild.sh: make INHERITED independent of phase

When EBUILD_PHASE != depend, INHERITED comes pre-initialized
from cache. In order to make INHERITED content independent of
EBUILD_PHASE during inherit() calls, we unset INHERITED after
we make a backup copy for QA checks.

---
 bin/ebuild.sh |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 6593755..b610342 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -1359,7 +1359,7 @@ inherit() {
 			# This is disabled in the *rm phases because they frequently give
 			# false alarms due to INHERITED in /var/db/pkg being outdated
 			# in comparison the the eclasses from the portage tree.
-			if ! hasq $ECLASS $INHERITED; then
+			if ! hasq $ECLASS $INHERITED $__INHERITED_QA_CACHE ; then
 				eqawarn "QA Notice: ECLASS '$ECLASS' inherited illegally in $CATEGORY/$PF $EBUILD_PHASE"
 			fi
 		fi
@@ -2023,11 +2023,18 @@ if ! hasq "$EBUILD_PHASE" clean cleanrm ; then
 		# during sourcing of ebuilds and eclasses.
 		source_all_bashrcs
 
+		# When EBUILD_PHASE != depend, INHERITED comes pre-initialized
+		# from cache. In order to make INHERITED content independent of
+		# EBUILD_PHASE during inherit() calls, we unset INHERITED after
+		# we make a backup copy for QA checks.
+		__INHERITED_QA_CACHE=$INHERITED
+
 		# *DEPEND and IUSE will be set during the sourcing of the ebuild.
 		# In order to ensure correct interaction between ebuilds and
 		# eclasses, they need to be unset before this process of
 		# interaction begins.
-		unset DEPEND RDEPEND PDEPEND IUSE REQUIRED_USE
+		unset DEPEND RDEPEND PDEPEND INHERITED IUSE REQUIRED_USE \
+			ECLASS E_IUSE E_REQUIRED_USE E_DEPEND E_RDEPEND E_PDEPEND
 
 		if [[ $PORTAGE_DEBUG != 1 || ${-/x/} != $- ]] ; then
 			source "$EBUILD" || die "error sourcing ebuild"
@@ -2057,7 +2064,8 @@ if ! hasq "$EBUILD_PHASE" clean cleanrm ; then
 		PDEPEND="${PDEPEND} ${E_PDEPEND}"
 		REQUIRED_USE="${REQUIRED_USE} ${E_REQUIRED_USE}"
 		
-		unset ECLASS E_IUSE E_REQUIRED_USE E_DEPEND E_RDEPEND E_PDEPEND 
+		unset ECLASS E_IUSE E_REQUIRED_USE E_DEPEND E_RDEPEND E_PDEPEND \
+			__INHERITED_QA_CACHE
 
 		# alphabetically ordered by $EBUILD_PHASE value
 		case "$EAPI" in



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-05-04 20:03 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-05-04 20:03 UTC (permalink / raw
  To: gentoo-commits

commit:     fdb5ea2d56c800fdefbec49f602f78158e388f64
Author:     David James <davidjames <AT> google <DOT> com>
AuthorDate: Sat Apr 30 00:21:58 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed May  4 19:47:39 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=fdb5ea2d

Check for references to ${ROOT} in install_qa_checks.

When ROOT != /, binaries that reference ROOT will load their
dependencies from ROOT first rather than from the system-configured
path. This is a problem because the ROOT will be / on the target
system.

Besides the above, this patch also fixes incorrect parsing of scanelf
output, where we would treat the RPATHs returned by scanelf as the
names of binaries.

TEST=When "stricter" FEATURE is enabled, verify that emerge
fails when an ebuild references broken rpaths referencing
ROOT. When "stricter" FEATURE is not enabled, verify that such
references are automatically fixed. Also verify that ebuilds
with non-broken RPATHs (e.g. RPATHs referencing $ORIGIN/../lib)
are not touched by the change.

BUG=chromium-os:14271

Change-Id: I4f29cc4ea9195a1255f080284da1f676e4a2c26b

Review URL: http://codereview.chromium.org/6903153

---
 bin/misc-functions.sh |   34 ++++++++++++++++++++++++++--------
 1 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index af0cc27..c310998 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -184,16 +184,37 @@ install_qa_check() {
 			unset PORTAGE_QUIET
 		fi
 
-		# Make sure we disallow insecure RUNPATH/RPATHs
-		# Don't want paths that point to the tree where the package was built
-		# (older, broken libtools would do this).  Also check for null paths
-		# because the loader will search $PWD when it finds null paths.
-		f=$(scanelf -qyRF '%r %p' "${D}" | grep -E "(${PORTAGE_BUILDDIR}|: |::|^:|^ )")
+		# Make sure we disallow insecure RUNPATH/RPATHs.
+		#   1) References to PORTAGE_BUILDDIR are banned because it's a
+		#      security risk. We don't want to load files from a
+		#      temporary directory.
+		#   2) If ROOT != "/", references to ROOT are banned because
+		#      that directory won't exist on the target system.
+		#   3) Null paths are banned because the loader will search $PWD when
+		#      it finds null paths.
+		local forbidden_dirs="${PORTAGE_BUILDDIR}"
+		if [[ -n "$ROOT" ]] && [[ "$ROOT" != "/" ]]; then
+			forbidden_dirs="${forbidden_dirs} ${ROOT}"
+		fi
+		local dir="" rpath_files=$(scanelf -F '%F:%r' -qBR "${D}")
+		f=""
+		for dir in ${forbidden_dirs}; do
+			for l in $(echo "${rpath_files}" | grep -E ":${dir}|::|: "); do
+				f+="  ${l%%:*}\n"
+				if ! has stricter ${FEATURES}; then
+					vecho "Auto fixing rpaths for ${l%%:*}"
+					TMPDIR="${dir}" scanelf -BXr "${l%%:*}" -o /dev/null
+				fi
+			done
+		done
+
 		# Reject set*id binaries with $ORIGIN in RPATH #260331
 		x=$(
 			find "${D}" -type f \( -perm -u+s -o -perm -g+s \) -print0 | \
 			xargs -0 scanelf -qyRF '%r %p' | grep '$ORIGIN'
 		)
+
+		# Print QA notice.
 		if [[ -n ${f}${x} ]] ; then
 			vecho -ne '\n'
 			eqawarn "QA Notice: The following files contain insecure RUNPATHs"
@@ -203,9 +224,6 @@ install_qa_check() {
 			vecho -ne '\n'
 			if [[ -n ${x} ]] || has stricter ${FEATURES} ; then
 				insecure_rpath=1
-			else
-				vecho "Auto fixing rpaths for ${f}"
-				TMPDIR=${PORTAGE_BUILDDIR} scanelf -BXr ${f} -o /dev/null
 			fi
 		fi
 



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-05-04 20:03 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-05-04 20:03 UTC (permalink / raw
  To: gentoo-commits

commit:     537dd5662c9e62a9546e35cbab826c52173c3fa6
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Gentoo <DOT> Org>
AuthorDate: Sat Apr 30 16:30:29 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed May  4 19:47:54 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=537dd566

install_qa_check(): Simplify code and make 'l' a local variable.

---
 bin/misc-functions.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index c310998..b28b73f 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -193,10 +193,10 @@ install_qa_check() {
 		#   3) Null paths are banned because the loader will search $PWD when
 		#      it finds null paths.
 		local forbidden_dirs="${PORTAGE_BUILDDIR}"
-		if [[ -n "$ROOT" ]] && [[ "$ROOT" != "/" ]]; then
-			forbidden_dirs="${forbidden_dirs} ${ROOT}"
+		if [[ -n "${ROOT}" && "${ROOT}" != "/" ]]; then
+			forbidden_dirs+=" ${ROOT}"
 		fi
-		local dir="" rpath_files=$(scanelf -F '%F:%r' -qBR "${D}")
+		local dir l rpath_files=$(scanelf -F '%F:%r' -qBR "${D}")
 		f=""
 		for dir in ${forbidden_dirs}; do
 			for l in $(echo "${rpath_files}" | grep -E ":${dir}|::|: "); do



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-05-04 20:03 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-05-04 20:03 UTC (permalink / raw
  To: gentoo-commits

commit:     93f76d6a50383ef1976626ac6e371dba302c751a
Author:     Ryan Hill <dirtyepic <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 26 21:16:20 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed May  4 19:26:50 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=93f76d6a

Bug #364467 - handle gcc-4.6-style QA warnings

---
 bin/misc-functions.sh |   36 ++++++++++++++++++------------------
 1 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index ae4cc9e..4c5b61a 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -549,23 +549,23 @@ install_qa_check() {
 			reset_debug=1
 		fi
 		local m msgs=(
-			": warning: dereferencing type-punned pointer will break strict-aliasing rules$"
-			": warning: dereferencing pointer .* does break strict-aliasing rules$"
-			": warning: implicit declaration of function "
-			": warning: incompatible implicit declaration of built-in function "
-			": warning: is used uninitialized in this function$" # we'll ignore "may" and "might"
-			": warning: comparisons like X<=Y<=Z do not have their mathematical meaning$"
-			": warning: null argument where non-null required "
-			": warning: array subscript is below array bounds$"
-			": warning: array subscript is above array bounds$"
+			": warning: dereferencing type-punned pointer will break strict-aliasing rules"
+			": warning: dereferencing pointer .* does break strict-aliasing rules"
+			": warning: implicit declaration of function"
+			": warning: incompatible implicit declaration of built-in function"
+			": warning: is used uninitialized in this function" # we'll ignore "may" and "might"
+			": warning: comparisons like X<=Y<=Z do not have their mathematical meaning"
+			": warning: null argument where non-null required"
+			": warning: array subscript is below array bounds"
+			": warning: array subscript is above array bounds"
 			": warning: attempt to free a non-heap object"
-			": warning: .* called with .*bigger.* than .* destination buffer$"
-			": warning: call to .* will always overflow destination buffer$"
-			": warning: assuming pointer wraparound does not occur when comparing "
-			": warning: hex escape sequence out of range$"
-			": warning: [^ ]*-hand operand of comma .*has no effect$"
+			": warning: .* called with .*bigger.* than .* destination buffer"
+			": warning: call to .* will always overflow destination buffer"
+			": warning: assuming pointer wraparound does not occur when comparing"
+			": warning: hex escape sequence out of range"
+			": warning: [^ ]*-hand operand of comma .*has no effect"
 			": warning: converting to non-pointer type .* from NULL"
-			": warning: NULL used in arithmetic$"
+			": warning: NULL used in arithmetic"
 			": warning: passing NULL to non-pointer argument"
 			": warning: the address of [^ ]* will always evaluate as"
 			": warning: the address of [^ ]* will never be NULL"
@@ -574,9 +574,9 @@ install_qa_check() {
 			": warning: returning reference to temporary"
 			": warning: function returns address of local variable"
 			# this may be valid code :/
-			#": warning: multi-character character constant$"
+			#": warning: multi-character character constant"
 			# need to check these two ...
-			#": warning: assuming signed overflow does not occur when "
+			#": warning: assuming signed overflow does not occur when"
 			#": warning: comparison with string literal results in unspecified behav"
 			# yacc/lex likes to trigger this one
 			#": warning: extra tokens at end of .* directive"
@@ -598,7 +598,7 @@ install_qa_check() {
 				abort="yes"
 				# for now, don't make this fatal (see bug #337031)
 				#case "$m" in
-				#	": warning: call to .* will always overflow destination buffer$") always_overflow=yes ;;
+				#	": warning: call to .* will always overflow destination buffer") always_overflow=yes ;;
 				#esac
 				if [[ $always_overflow = yes ]] ; then
 					eerror



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-05-04 20:03 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-05-04 20:03 UTC (permalink / raw
  To: gentoo-commits

commit:     7f6e71973505462bee44ed81b11c99e94e770cef
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 23 15:41:07 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed May  4 19:26:13 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=7f6e7197

ebuild(1): fix env FEATURES overrides bug #364035

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

diff --git a/bin/ebuild b/bin/ebuild
index 58ab46f..60d0dad 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -248,11 +248,9 @@ if "test" in pargs:
 	# of problems such as masked "test" USE flag.
 	tmpsettings["EBUILD_FORCE_TEST"] = "1"
 	tmpsettings.backup_changes("EBUILD_FORCE_TEST")
-	tmpsettings["FEATURES"] = tmpsettings.get("FEATURES", "") + " " + "test"
-	tmpsettings.backup_changes("FEATURES")
+	tmpsettings.features.add("test")
 
-tmpsettings["FEATURES"] = tmpsettings.get("FEATURES", "") + " " + "-fail-clean"
-tmpsettings.backup_changes("FEATURES")
+tmpsettings.features.discard("fail-clean")
 
 # Apply package.env settings. This allows per-package FEATURES and other
 # variables (possibly PORTAGE_TMPDIR) to be available as soon as possible.



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-04-14  1:57 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-04-14  1:57 UTC (permalink / raw
  To: gentoo-commits

commit:     81035828fb9abdee32c881ffa17cc92117e2966b
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 14 01:54:30 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Apr 14 01:57:14 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=81035828

repoman: cleanup gpgsign

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

diff --git a/bin/repoman b/bin/repoman
index 56c4bf7..d6c26d6 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -66,7 +66,8 @@ import portage.checksum
 import portage.const
 from portage import cvstree, normalize_path
 from portage import util
-from portage.exception import FileNotFound, ParseError, PermissionDenied
+from portage.exception import (FileNotFound, MissingParameter,
+	ParseError, PermissionDenied)
 from portage.manifest import Manifest
 from portage.process import find_binary, spawn
 from portage.output import bold, create_color_func, \
@@ -2418,22 +2419,32 @@ else:
 
 	# Setup the GPG commands
 	def gpgsign(filename):
-		if "PORTAGE_GPG_KEY" not in repoman_settings and "${PORTAGE_GPG_KEY}" in repoman_settings["PORTAGE_GPG_SIGNING_COMMAND"]:
-			raise portage.exception.MissingParameter("PORTAGE_GPG_KEY is unset!")
-		if "PORTAGE_GPG_DIR" not in repoman_settings and "${PORTAGE_GPG_DIR}" in repoman_settings["PORTAGE_GPG_SIGNING_COMMAND"]:
-			repoman_settings["PORTAGE_GPG_DIR"] = os.path.expanduser("~/.gnupg")
-			logging.info("Automatically setting PORTAGE_GPG_DIR to '%s'" % repoman_settings["PORTAGE_GPG_DIR"])
-		if "${PORTAGE_GPG_DIR}" in repoman_settings["PORTAGE_GPG_SIGNING_COMMAND"]:
-			repoman_settings["PORTAGE_GPG_DIR"] = os.path.expanduser(repoman_settings["PORTAGE_GPG_DIR"])
+		gpgcmd = repoman_settings.get("PORTAGE_GPG_SIGNING_COMMAND")
+		if gpgcmd is None:
+			raise MissingParameter("PORTAGE_GPG_SIGNING_COMMAND is unset!" + \
+				" Is make.globals missing?")
+		if "${PORTAGE_GPG_KEY}" in gpgcmd and \
+			"PORTAGE_GPG_KEY" not in repoman_settings:
+			raise MissingParameter("PORTAGE_GPG_KEY is unset!")
+		if "${PORTAGE_GPG_DIR}" in gpgcmd:
+			if "PORTAGE_GPG_DIR" not in repoman_settings:
+				repoman_settings["PORTAGE_GPG_DIR"] = \
+					os.path.expanduser("~/.gnupg")
+				logging.info("Automatically setting PORTAGE_GPG_DIR to '%s'" \
+					% repoman_settings["PORTAGE_GPG_DIR"])
+			else:
+				repoman_settings["PORTAGE_GPG_DIR"] = \
+					os.path.expanduser(repoman_settings["PORTAGE_GPG_DIR"])
 			if not os.access(repoman_settings["PORTAGE_GPG_DIR"], os.X_OK):
 				raise portage.exception.InvalidLocation(
 					"Unable to access directory: PORTAGE_GPG_DIR='%s'" % \
 					repoman_settings["PORTAGE_GPG_DIR"])
 		gpgvars = {"FILE": filename}
-		for var in ("PORTAGE_GPG_DIR", "PORTAGE_GPG_KEY"):
-			if "${%s}" % var in repoman_settings["PORTAGE_GPG_SIGNING_COMMAND"]:
-				gpgvars[var] = repoman_settings[var]
-		gpgcmd = portage.util.varexpand(repoman_settings["PORTAGE_GPG_SIGNING_COMMAND"], mydict=gpgvars)
+		for k in ("PORTAGE_GPG_DIR", "PORTAGE_GPG_KEY"):
+			v = repoman_settings.get(k)
+			if v is not None:
+				gpgvars[k] = v
+		gpgcmd = portage.util.varexpand(gpgcmd, mydict=gpgvars)
 		if options.pretend:
 			print("("+gpgcmd+")")
 		else:



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-04-13  7:52 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-04-13  7:52 UTC (permalink / raw
  To: gentoo-commits

commit:     b3d2ac7510e82a0d21ba7aa99d067f4829ef6ecf
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  3 15:54:10 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Apr 13 07:49:21 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b3d2ac75

repoman: fix profiles.desc overlay path

Thanks to Alexey Shvetsov <alexxy <AT> gentoo.org> for reporting this issue
and testing the fix.

---
 bin/repoman |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bin/repoman b/bin/repoman
index 7236909..0c6f655 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -721,7 +721,7 @@ for path in portdb.porttrees:
 			elif arch[2] not in valid_profile_types:
 				err("invalid profile type: \"" + bad(arch[2]) + "\" in " + \
 					desc_path + " line %d" % (i+1, ))
-			profile_desc = ProfileDesc(arch[0], arch[2], arch[1], portdir)
+			profile_desc = ProfileDesc(arch[0], arch[2], arch[1], path)
 			if not os.path.isdir(profile_desc.abs_path):
 				logging.error(
 					"Invalid %s profile (%s) for arch %s in %s line %d",



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-04-13  7:52 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-04-13  7:52 UTC (permalink / raw
  To: gentoo-commits

commit:     2ab0fa496c6f923503744f7492e611ead8ce2682
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Gentoo <DOT> Org>
AuthorDate: Wed Mar 30 22:19:54 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Apr 13 07:40:48 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2ab0fa49

Minor improvements in gpgsign().
repoman_settings["PORTAGE_GPG_DIR"] is always set.

---
 bin/repoman |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/bin/repoman b/bin/repoman
index 0a480a5..7236909 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -2422,16 +2422,15 @@ else:
 			raise portage.exception.MissingParameter("PORTAGE_GPG_KEY is unset!")
 		if "PORTAGE_GPG_DIR" not in repoman_settings:
 			repoman_settings["PORTAGE_GPG_DIR"] = os.path.expanduser("~/.gnupg")
-			logging.info("Automatically setting PORTAGE_GPG_DIR to %s" % repoman_settings["PORTAGE_GPG_DIR"])
+			logging.info("Automatically setting PORTAGE_GPG_DIR to '%s'" % repoman_settings["PORTAGE_GPG_DIR"])
 		repoman_settings["PORTAGE_GPG_DIR"] = os.path.expanduser(repoman_settings["PORTAGE_GPG_DIR"])
 		if not os.access(repoman_settings["PORTAGE_GPG_DIR"], os.X_OK):
 			raise portage.exception.InvalidLocation(
 				"Unable to access directory: PORTAGE_GPG_DIR='%s'" % \
 				repoman_settings["PORTAGE_GPG_DIR"])
-		gpgcmd = "gpg --sign --clearsign --yes "
-		gpgcmd+= "--default-key "+repoman_settings["PORTAGE_GPG_KEY"]
-		if "PORTAGE_GPG_DIR" in repoman_settings:
-			gpgcmd += " --homedir "+repoman_settings["PORTAGE_GPG_DIR"]
+		gpgcmd = "gpg --sign --clearsign --yes"
+		gpgcmd += " --default-key " + repoman_settings["PORTAGE_GPG_KEY"]
+		gpgcmd += " --homedir " + repoman_settings["PORTAGE_GPG_DIR"]
 		if options.pretend:
 			print("("+gpgcmd+" "+filename+")")
 		else:



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-04-13  7:52 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-04-13  7:52 UTC (permalink / raw
  To: gentoo-commits

commit:     0fcb4e236b32ebe687a9807e4a4e65835d19ea31
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Gentoo <DOT> Org>
AuthorDate: Wed Mar 30 15:03:22 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Apr 13 07:40:21 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0fcb4e23

Use os.path.expanduser() to simplify code.

---
 bin/repoman |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/bin/repoman b/bin/repoman
index 8b1efc5..86eba81 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -2426,10 +2426,7 @@ else:
 				logging.info("Automatically setting PORTAGE_GPG_DIR to %s" % repoman_settings["PORTAGE_GPG_DIR"])
 			else:
 				raise portage.exception.MissingParameter("PORTAGE_GPG_DIR is unset!")
-		gpg_dir = repoman_settings["PORTAGE_GPG_DIR"]
-		if gpg_dir.startswith("~") and "HOME" in os.environ:
-			repoman_settings["PORTAGE_GPG_DIR"] = os.path.join(
-				os.environ["HOME"], gpg_dir[1:].lstrip(os.path.sep))
+		repoman_settings["PORTAGE_GPG_DIR"] = os.path.expanduser(repoman_settings["PORTAGE_GPG_DIR"])
 		if not os.access(repoman_settings["PORTAGE_GPG_DIR"], os.X_OK):
 			raise portage.exception.InvalidLocation(
 				"Unable to access directory: PORTAGE_GPG_DIR='%s'" % \



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-04-13  7:52 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-04-13  7:52 UTC (permalink / raw
  To: gentoo-commits

commit:     439baf280a7b927ce190c5f6fdc698731db37dfb
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Gentoo <DOT> Org>
AuthorDate: Wed Mar 30 20:32:45 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Apr 13 07:40:39 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=439baf28

Simplify calculation of repoman_settings["PORTAGE_GPG_DIR"] in gpgsign().
os.path.expanduser() works even when HOME environment variable is not set.

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

diff --git a/bin/repoman b/bin/repoman
index 86eba81..0a480a5 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -2421,11 +2421,8 @@ else:
 		if "PORTAGE_GPG_KEY" not in repoman_settings:
 			raise portage.exception.MissingParameter("PORTAGE_GPG_KEY is unset!")
 		if "PORTAGE_GPG_DIR" not in repoman_settings:
-			if "HOME" in os.environ:
-				repoman_settings["PORTAGE_GPG_DIR"] = os.path.join(os.environ["HOME"], ".gnupg")
-				logging.info("Automatically setting PORTAGE_GPG_DIR to %s" % repoman_settings["PORTAGE_GPG_DIR"])
-			else:
-				raise portage.exception.MissingParameter("PORTAGE_GPG_DIR is unset!")
+			repoman_settings["PORTAGE_GPG_DIR"] = os.path.expanduser("~/.gnupg")
+			logging.info("Automatically setting PORTAGE_GPG_DIR to %s" % repoman_settings["PORTAGE_GPG_DIR"])
 		repoman_settings["PORTAGE_GPG_DIR"] = os.path.expanduser(repoman_settings["PORTAGE_GPG_DIR"])
 		if not os.access(repoman_settings["PORTAGE_GPG_DIR"], os.X_OK):
 			raise portage.exception.InvalidLocation(



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-03-27 20:03 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-03-27 20:03 UTC (permalink / raw
  To: gentoo-commits

commit:     0c70d3a3ff2e122577cbebc1abdb0720f18bf106
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 27 20:01:10 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Mar 27 20:02:45 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0c70d3a3

emerge-webrsync: drop lzma support

The lzma snapshots have been replaced by xz snapshots, as discussed in
the "RFC: Remove .lzma in favor of .xz portage snapshots" thread on the
gentoo-dev ml:

http://archives.gentoo.org/gentoo-dev/msg_7de1b57ce531fdf33d33b5b070006436.xml

---
 bin/emerge-webrsync |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 8279242..69cfc96 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -64,7 +64,6 @@ do_tar() {
 	local decompressor
 	case ${file} in
 		*.xz)   decompressor="xzcat" ;;
-		*.lzma) decompressor="lzcat" ;;
 		*.bz2)  decompressor="bzcat" ;;
 		*.gz)   decompressor="zcat"  ;;
 		*)      decompressor="cat"   ;;
@@ -227,16 +226,15 @@ do_snapshot() {
 	local mirror
 
 	local compressions=""
-	# lzma is not supported in app-arch/tarsync, so use
+	# xz is not supported in app-arch/tarsync, so use
 	# bz2 format if we have tarsync.
 	if ! type -P tarsync > /dev/null ; then
 		type -P xzcat > /dev/null && compressions="${compressions} xz"
-		type -P lzcat > /dev/null && compressions="${compressions} lzma"
 	fi
 	type -P bzcat > /dev/null && compressions="${compressions} bz2"
 	type -P  zcat > /dev/null && compressions="${compressions} gz"
 	if [[ -z ${compressions} ]] ; then
-		eecho "unable to locate any decompressors (lzcat or bzcat or zcat)"
+		eecho "unable to locate any decompressors (xzcat or bzcat or zcat)"
 		exit 1
 	fi
 



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-03-26 19:31 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-03-26 19:31 UTC (permalink / raw
  To: gentoo-commits

commit:     fa3a5a04bc8eeb9e0eda44b21c7c8f3f49e00fa5
Author:     David James <davidjames <AT> google <DOT> com>
AuthorDate: Thu Mar 24 05:05:15 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Mar 26 19:20:52 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=fa3a5a04

Optimize ebuild.sh to cache preprocessing output.

Right now ebuild.sh runs preprocessing steps multiple times during the
same build. It processes the same environment and produces the same
output every time. This slows down the build unnecessarily.

This optimization cuts build time for 50 binary packages with 16 jobs
from 3m22 to 2m33 (33%).

Change-Id: I72ac84cce2eb60d17736cc5f5343d4a858ec86f4

Review URL: http://codereview.chromium.org/6733008

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

diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 59bf46e..c79d4c3 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -1826,14 +1826,14 @@ filter_readonly_variables() {
 # interfering with the current environment. This is useful when an existing
 # environment needs to be loaded from a binary or installed package.
 preprocess_ebuild_env() {
-	local _portage_filter_opts=""
-	if [ -f "${T}/environment.raw" ] ; then
-		# This is a signal from the python side, indicating that the
-		# environment may contain stale SANDBOX_{DENY,PREDICT,READ,WRITE}
-		# and FEATURES variables that should be filtered out. Between
-		# phases, these variables are normally preserved.
-		_portage_filter_opts+=" --filter-features --filter-locale --filter-path --filter-sandbox"
-	fi
+	local _portage_filter_opts="--filter-features --filter-locale --filter-path --filter-sandbox"
+
+	# If environment.raw is present, this is a signal from the python side,
+	# indicating that the environment may contain stale FEATURES and
+	# SANDBOX_{DENY,PREDICT,READ,WRITE} variables that should be filtered out.
+	# Otherwise, we don't need to filter the environment.
+	[ -f "${T}/environment.raw" ] || return 0
+
 	filter_readonly_variables $_portage_filter_opts < "${T}"/environment \
 		>> "$T/environment.filtered" || return $?
 	unset _portage_filter_opts



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-03-26 19:31 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-03-26 19:31 UTC (permalink / raw
  To: gentoo-commits

commit:     61cdc29e485fd55509f21ceb0b9fefdacd664849
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 20 17:41:24 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Mar 26 19:20:13 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=61cdc29e

portageq owners: list orphans via stderr

---
 bin/portageq |   26 +++++++++++++++++++++-----
 1 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/bin/portageq b/bin/portageq
index 2f254ca..069ece2 100755
--- a/bin/portageq
+++ b/bin/portageq
@@ -255,6 +255,8 @@ def owners(argv):
 		pass
 
 	files = []
+	orphan_abs_paths = set()
+	orphan_basenames = set()
 	for f in argv[1:]:
 		f = portage.normalize_path(f)
 		is_basename = os.sep not in f
@@ -271,8 +273,10 @@ def owners(argv):
 			return 2
 		if is_basename:
 			files.append(f)
+			orphan_basenames.add(f)
 		else:
 			files.append(f[len(root)-1:])
+			orphan_abs_paths.add(f)
 
 	owners = vardb._owners.get_owners(files)
 
@@ -281,16 +285,28 @@ def owners(argv):
 		cpv = pkg.mycpv
 		msg.append("%s\n" % cpv)
 		for f in sorted(owned_files):
-			msg.append("\t%s\n" % \
-				os.path.join(root, f.lstrip(os.path.sep)))
+			f_abs = os.path.join(root, f.lstrip(os.path.sep))
+			msg.append("\t%s\n" % (f_abs,))
+			orphan_abs_paths.discard(f_abs)
+			if orphan_basenames:
+				orphan_basenames.discard(os.path.basename(f_abs))
 
 	writemsg_stdout(''.join(msg), noiselevel=-1)
 
+	if orphan_abs_paths or orphan_basenames:
+		orphans = []
+		orphans.extend(orphan_abs_paths)
+		orphans.extend(orphan_basenames)
+		orphans.sort()
+		msg = []
+		msg.append("None of the installed packages claim these files:\n")
+		for f in orphans:
+			msg.append("\t%s\n" % (f,))
+		sys.stderr.write("".join(msg))
+		sys.stderr.flush()
+
 	if owners:
 		return 0
-
-	sys.stderr.write("None of the installed packages claim the file(s).\n")
-	sys.stderr.flush()
 	return 1
 
 owners.uses_root = True



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-03-18 21:12 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-03-18 21:12 UTC (permalink / raw
  To: gentoo-commits

commit:     768958c9d1504f72d2f252c1793a5bc48a2a4a85
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 17 21:12:13 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Mar 18 19:50:14 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=768958c9

ebuild-ipc: use non-blocking read

This makes it possible for the daemon to send a reply without blocking,
thereby improving performance and also making it possible for the
daemon to do a non-blocking write without a race condition.

This reverts part of commit 81fc303212b8379219cf5d463c8717359b972dba,
which probably didn't help portability anyway. Now, ebuild-ipc is using
non-blocking read with os.read and EAGAIN handling, just like
EbuildIpcDaemon since commit 7e5b81da12dd7bd59f6620840dc0d824e3f4d69a
(known compatible with FreeBSD).

---
 bin/ebuild-ipc.py |   54 ++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 41 insertions(+), 13 deletions(-)

diff --git a/bin/ebuild-ipc.py b/bin/ebuild-ipc.py
index d8e7e55..cb77171 100755
--- a/bin/ebuild-ipc.py
+++ b/bin/ebuild-ipc.py
@@ -134,23 +134,43 @@ class EbuildIpc(object):
 
 		return os.WEXITSTATUS(wait_retval[1])
 
-	def _receive_reply(self):
+	def _receive_reply(self, input_fd):
 
-		# File streams are in unbuffered mode since we do atomic
-		# read and write of whole pickles.
-		input_file = open(self.ipc_out_fifo, 'rb', 0)
-
-		# For maximum portability, use a single atomic read.
+		# Timeouts are handled by the parent process, so just
+		# block until input is available. For maximum portability,
+		# use a single atomic read.
 		buf = None
-		try:
-			buf = input_file.read(self._BUFSIZE)
-		except IOError as e:
-			if not buf:
+		while True:
+			try:
+				events = select.select([input_fd], [], [])
+			except select.error as e:
 				portage.util.writemsg_level(
-					"ebuild-ipc: %s\n" % (e,),
+					"ebuild-ipc: %s: %s\n" % \
+					(portage.localization._('during select for read'), e),
 					level=logging.ERROR, noiselevel=-1)
+				continue
 
-		input_file.close()
+			if events[0]:
+				# For maximum portability, use os.read() here since
+				# array.fromfile() and file.read() are both known to
+				# erroneously return an empty string from this
+				# non-blocking fifo stream on FreeBSD (bug #337465).
+				try:
+					buf = os.read(input_fd, self._BUFSIZE)
+				except OSError as e:
+					if e.errno != errno.EAGAIN:
+						portage.util.writemsg_level(
+							"ebuild-ipc: %s: %s\n" % \
+							(portage.localization._('read error'), e),
+							level=logging.ERROR, noiselevel=-1)
+						break
+					# Assume that another event will be generated
+					# if there's any relevant data.
+					continue
+
+				# Only one (atomic) read should be necessary.
+				if buf:
+					break
 
 		retval = 2
 
@@ -192,6 +212,13 @@ class EbuildIpc(object):
 			self._no_daemon_msg()
 			return 2
 
+		# Open the input fifo before the output fifo, in order to make it
+		# possible for the daemon to send a reply without blocking. This
+		# improves performance, and also makes it possible for the daemon
+		# to do a non-blocking write without a race condition.
+		input_fd = os.open(self.ipc_out_fifo,
+			os.O_RDONLY|os.O_NONBLOCK)
+
 		# Use forks so that the child process can handle blocking IO
 		# un-interrupted, while the parent handles all timeout
 		# considerations. This helps to avoid possible race conditions
@@ -231,12 +258,13 @@ class EbuildIpc(object):
 
 		if pid == 0:
 			os.close(pr)
-			retval = self._receive_reply()
+			retval = self._receive_reply(input_fd)
 			os._exit(retval)
 
 		os.close(pw)
 		retval = self._wait(pid, pr, portage.localization._('during read'))
 		os.close(pr)
+		os.close(input_fd)
 		return retval
 
 def ebuild_ipc_main(args):



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-03-18 21:12 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-03-18 21:12 UTC (permalink / raw
  To: gentoo-commits

commit:     ccdce6f2f8026a7b2478c0dfd5d5e51aba22422e
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 17 21:52:41 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Mar 18 19:50:44 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ccdce6f2

ebuild-ipc: import errno

---
 bin/ebuild-ipc.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/bin/ebuild-ipc.py b/bin/ebuild-ipc.py
index cb77171..68ad985 100755
--- a/bin/ebuild-ipc.py
+++ b/bin/ebuild-ipc.py
@@ -5,6 +5,7 @@
 # This is a helper which ebuild processes can use
 # to communicate with portage's main python process.
 
+import errno
 import logging
 import os
 import pickle



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-03-14 16:24 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-03-14 16:24 UTC (permalink / raw
  To: gentoo-commits

commit:     ef6643061e9c7f1447968d916cc876d91da59b76
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 10 22:49:47 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Mar 14 16:23:19 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=ef664306

ebuild-ipc: use plain file read instead of array

Array.fromfile() seems to be more error prone. For example, see
bug 337465.

---
 bin/ebuild-ipc.py |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/bin/ebuild-ipc.py b/bin/ebuild-ipc.py
index 45d7120..d8e7e55 100755
--- a/bin/ebuild-ipc.py
+++ b/bin/ebuild-ipc.py
@@ -1,11 +1,10 @@
 #!/usr/bin/python
-# Copyright 2010 Gentoo Foundation
+# Copyright 2010-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 #
 # This is a helper which ebuild processes can use
 # to communicate with portage's main python process.
 
-import array
 import logging
 import os
 import pickle
@@ -141,13 +140,11 @@ class EbuildIpc(object):
 		# read and write of whole pickles.
 		input_file = open(self.ipc_out_fifo, 'rb', 0)
 
-		# For maximum portability, us an array in order to force
-		# a single atomic read of a whole pickle (bug #337465).
-		buf = array.array('B')
-
+		# For maximum portability, use a single atomic read.
+		buf = None
 		try:
-			buf.fromfile(input_file, self._BUFSIZE)
-		except (EOFError, IOError) as e:
+			buf = input_file.read(self._BUFSIZE)
+		except IOError as e:
 			if not buf:
 				portage.util.writemsg_level(
 					"ebuild-ipc: %s\n" % (e,),
@@ -167,7 +164,7 @@ class EbuildIpc(object):
 		else:
 
 			try:
-				reply = pickle.loads(buf.tostring())
+				reply = pickle.loads(buf)
 			except SystemExit:
 				raise
 			except Exception as e:



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-03-02  0:56 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-03-02  0:56 UTC (permalink / raw
  To: gentoo-commits

commit:     451fc68241730f0bced468550992d5cd73c3ff95
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  2 00:53:25 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Mar  2 00:55:50 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=451fc682

ebuild(1): fix ebuild modification check

This has been broken since the setcpv call (triggering metadata
generation) was added before it in commit
0b39d24bb8270e5c89eaddfd1f5a4181cf9e31d3.

---
 bin/ebuild |   25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/bin/ebuild b/bin/ebuild
index 9d20a41..58ab46f 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -215,6 +215,19 @@ def discard_digests(myebuild, mysettings, mydbapi):
 		portage._doebuild_manifest_exempt_depend -= 1
 
 portage.settings.validate() # generate warning messages if necessary
+
+build_dir_phases = set(["setup", "unpack", "prepare", "configure", "compile",
+	"test", "install", "package", "rpm", "merge", "qmerge"])
+
+# If the current metadata is invalid then force the ebuild to be
+# sourced again even if $T/environment already exists.
+ebuild_changed = False
+if mytree == "porttree" and build_dir_phases.intersection(pargs):
+	metadata, st, emtime = \
+		portage.portdb._pull_valid_cache(cpv, ebuild, ebuild_portdir)
+	if metadata is None:
+		ebuild_changed = True
+
 tmpsettings = portage.config(clone=portage.settings)
 tmpsettings["PORTAGE_VERBOSE"] = "1"
 tmpsettings.backup_changes("PORTAGE_VERBOSE")
@@ -249,18 +262,6 @@ except KeyError:
 	# aux_get failure, message should have been shown on stderr.
 	sys.exit(1)
 
-build_dir_phases = set(["setup", "unpack", "prepare", "configure", "compile",
-	"test", "install", "package", "rpm", "merge", "qmerge"])
-
-# If the current metadata is invalid then force the ebuild to be
-# sourced again even if $T/environment already exists.
-ebuild_changed = False
-if mytree == "porttree" and build_dir_phases.intersection(pargs):
-	metadata, st, emtime = \
-		portage.portdb._pull_valid_cache(cpv, ebuild, ebuild_portdir)
-	if metadata is None:
-		ebuild_changed = True
-
 def stale_env_warning():
 	if "clean" not in pargs and \
 		"noauto" not in tmpsettings.features and \



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-03-01 20:55 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-03-01 20:55 UTC (permalink / raw
  To: gentoo-commits

commit:     5cd29d1ed4e38b583c87a56f77d725482c803401
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 28 18:57:53 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Mar  1 20:53:28 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5cd29d1e

ebuild(1): apply package.env earlier

This makes it possible to override PORTAGE_TMPDIR.

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

diff --git a/bin/ebuild b/bin/ebuild
index ab88d6a..9d20a41 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -218,20 +218,36 @@ portage.settings.validate() # generate warning messages if necessary
 tmpsettings = portage.config(clone=portage.settings)
 tmpsettings["PORTAGE_VERBOSE"] = "1"
 tmpsettings.backup_changes("PORTAGE_VERBOSE")
+
+if opts.skip_manifest:
+	tmpsettings["EBUILD_SKIP_MANIFEST"] = "1"
+	tmpsettings.backup_changes("EBUILD_SKIP_MANIFEST")
+
+if opts.skip_manifest or \
+	"digest" in tmpsettings.features or \
+	"digest" in pargs or \
+	"manifest" in pargs:
+	portage._doebuild_manifest_exempt_depend += 1
+
 if "test" in pargs:
 	# This variable is a signal to config.regenerate() to
 	# indicate that the test phase should be enabled regardless
 	# of problems such as masked "test" USE flag.
 	tmpsettings["EBUILD_FORCE_TEST"] = "1"
 	tmpsettings.backup_changes("EBUILD_FORCE_TEST")
-	tmpsettings.features.add("test")
+	tmpsettings["FEATURES"] = tmpsettings.get("FEATURES", "") + " " + "test"
+	tmpsettings.backup_changes("FEATURES")
 
-tmpsettings.features.discard('fail-clean')
+tmpsettings["FEATURES"] = tmpsettings.get("FEATURES", "") + " " + "-fail-clean"
+tmpsettings.backup_changes("FEATURES")
 
-if opts.skip_manifest:
-	tmpsettings["EBUILD_SKIP_MANIFEST"] = "1"
-	tmpsettings.backup_changes("EBUILD_SKIP_MANIFEST")
-	portage._doebuild_manifest_exempt_depend += 1
+# Apply package.env settings. This allows per-package FEATURES and other
+# variables (possibly PORTAGE_TMPDIR) to be available as soon as possible.
+try:
+	tmpsettings.setcpv(cpv, mydb=portage.db[portage.root][mytree].dbapi)
+except KeyError:
+	# aux_get failure, message should have been shown on stderr.
+	sys.exit(1)
 
 build_dir_phases = set(["setup", "unpack", "prepare", "configure", "compile",
 	"test", "install", "package", "rpm", "merge", "qmerge"])



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-02-22  3:14 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-02-22  3:14 UTC (permalink / raw
  To: gentoo-commits

commit:     4bd18a61c46c26496ffc80ef95e80d82dcc8500a
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 21 16:17:09 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Feb 22 03:12:36 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4bd18a61

ebuild.sh: remove unused PWORKDIR variable

---
 bin/ebuild.sh             |    6 ------
 bin/isolated-functions.sh |    2 +-
 2 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 1764da1..59bf46e 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -1152,9 +1152,6 @@ dyn_install() {
 	#our custom version of libtool uses $S and $D to fix
 	#invalid paths in .la files
 	export S D
-	#some packages uses an alternative to $S to build in, cause
-	#our libtool to create problematic .la files
-	export PWORKDIR="$WORKDIR"
 
 	# Reset exeinto(), docinto(), insinto(), and into() state variables
 	# in case the user is running the install phase multiple times
@@ -2244,9 +2241,6 @@ ebuild_main() {
 			#our custom version of libtool uses $S and $D to fix
 			#invalid paths in .la files
 			export S D
-			#some packages use an alternative to $S to build in, cause
-			#our libtool to create problematic .la files
-			export PWORKDIR=$WORKDIR
 
 			;;
 		esac

diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index f89c11e..b5bb73a 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -602,7 +602,7 @@ save_ebuild_env() {
 			PORTAGE_BASHRCS_SOURCED PORTAGE_NONFATAL PORTAGE_QUIET \
 			PORTAGE_SANDBOX_DENY PORTAGE_SANDBOX_PREDICT \
 			PORTAGE_SANDBOX_READ PORTAGE_SANDBOX_WRITE PREROOTPATH \
-			PWORKDIR QA_INTERCEPTORS \
+			QA_INTERCEPTORS \
 			RC_DEFAULT_INDENT RC_DOT_PATTERN RC_ENDCOL RC_INDENTATION  \
 			ROOT ROOTPATH RPMDIR TEMP TMP TMPDIR USE_EXPAND \
 			WARN XARGS _RC_GET_KV_CACHE



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-02-20  0:04 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-02-20  0:04 UTC (permalink / raw
  To: gentoo-commits

commit:     09fcb2f84258629b6befe8e9a4cc62f15bedfe08
Author:     Ulrich Mueller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 18 23:42:36 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Feb 20 00:03:15 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=09fcb2f8

docompress, prepcompress: Add missing quotes.

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

diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index ebe2c65..d0cf84d 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -916,7 +916,7 @@ docompress() {
 			f=$(strip_duplicate_slashes "${f}"); f=${f%/}
 			[[ ${f:0:1} = / ]] || f="/${f}"
 			for g in "${PORTAGE_DOCOMPRESS_SKIP[@]}"; do
-				[[ ${f} = ${g} ]] && continue 2
+				[[ ${f} = "${g}" ]] && continue 2
 			done
 			PORTAGE_DOCOMPRESS_SKIP[${#PORTAGE_DOCOMPRESS_SKIP[@]}]=${f}
 		done
@@ -925,7 +925,7 @@ docompress() {
 			f=$(strip_duplicate_slashes "${f}"); f=${f%/}
 			[[ ${f:0:1} = / ]] || f="/${f}"
 			for g in "${PORTAGE_DOCOMPRESS[@]}"; do
-				[[ ${f} = ${g} ]] && continue 2
+				[[ ${f} = "${g}" ]] && continue 2
 			done
 			PORTAGE_DOCOMPRESS[${#PORTAGE_DOCOMPRESS[@]}]=${f}
 		done

diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 46be501..e1e5df1 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -103,7 +103,7 @@ prepcompress() {
 			fi
 		done
 		for g in "${exclude[@]}"; do
-			if [[ ${f} = ${g} || ${f} == "${g%/}"/* ]]; then
+			if [[ ${f} = "${g}" || ${f} == "${g%/}"/* ]]; then
 				unset include[i]
 				continue 2
 			fi



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-02-20  0:04 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-02-20  0:04 UTC (permalink / raw
  To: gentoo-commits

commit:     7ef8b7dd49d103a6545d70a39398a56c2dbe138b
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 18 15:37:25 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Feb 20 00:02:25 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=7ef8b7dd

egencache: fix cmp_func for python3

---
 bin/egencache |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/bin/egencache b/bin/egencache
index e5685c4..5307cd5 100755
--- a/bin/egencache
+++ b/bin/egencache
@@ -455,6 +455,14 @@ class GenUseLocalDesc(object):
 		# since we don't want any confusion given that we never
 		# want to rely on the builtin cmp function.
 		def cmp_func(a, b):
+			if a is None or b is None:
+				# None can't be compared with other types in python3.
+				if a is None and b is None:
+					return 0
+				elif a is None:
+					return -1
+				else:
+					return 1
 			return (a > b) - (a < b)
 
 		for cp in self._portdb.cp_all():



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-02-14  4:31 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-02-14  4:31 UTC (permalink / raw
  To: gentoo-commits

commit:     8a3eb0eb28d761efd2607825445bfeef47735a48
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 13 14:18:00 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Feb 14 04:30:07 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=8a3eb0eb

egencache: --preserve-comments allow missing file

This will fix bug #354687.

---
 bin/egencache |   30 ++++++++++++++++++++++++++----
 1 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/bin/egencache b/bin/egencache
index 89d2fde..e5685c4 100755
--- a/bin/egencache
+++ b/bin/egencache
@@ -396,11 +396,33 @@ class GenUseLocalDesc(object):
 						mode='w', encoding=_encodings['repo.content'],
 						errors='replace')
 			except IOError as e:
+				if not self._preserve_comments or \
+					os.path.isfile(desc_path):
+					writemsg_level(
+						"ERROR: failed to open output file %s: %s\n" \
+						% (desc_path, e), level=logging.ERROR, noiselevel=-1)
+					self.returncode |= 2
+					return
+
+				# Open in r+b mode failed because the file doesn't
+				# exist yet. We can probably recover if we disable
+				# preserve_comments mode now.
 				writemsg_level(
-					"ERROR: failed to open output file %s: %s\n" % (desc_path,e,),
-					level=logging.ERROR, noiselevel=-1)
-				self.returncode |= 2
-				return
+					"WARNING: --preserve-comments enabled, but " + \
+					"output file not found: %s\n" % (desc_path,),
+					level=logging.WARNING, noiselevel=-1)
+				self._preserve_comments = False
+				try:
+					output = codecs.open(_unicode_encode(desc_path,
+						encoding=_encodings['fs'], errors='strict'),
+						mode='w', encoding=_encodings['repo.content'],
+						errors='replace')
+				except IOError as e:
+					writemsg_level(
+						"ERROR: failed to open output file %s: %s\n" \
+						% (desc_path, e), level=logging.ERROR, noiselevel=-1)
+					self.returncode |= 2
+					return
 		else:
 			output = sys.stdout
 



^ permalink raw reply related	[flat|nested] 28+ messages in thread
* [gentoo-commits] proj/portage:2.1.9 commit in: bin/
@ 2011-02-07  0:29 Zac Medico
  0 siblings, 0 replies; 28+ messages in thread
From: Zac Medico @ 2011-02-07  0:29 UTC (permalink / raw
  To: gentoo-commits

commit:     997e00c3ae05c543f03085e6f9d87cc062c67d8a
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Feb  6 23:00:47 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Feb  7 00:29:03 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=997e00c3

default_src_test: handle EAPI 4 emake failure

This will fix bug #353897.

---
 bin/ebuild.sh |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index a8ed745..ebe2c65 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -626,15 +626,21 @@ _eapi0_src_compile() {
 }
 
 _eapi0_src_test() {
-	if emake -j1 check -n &> /dev/null; then
+	# Since we don't want emake's automatic die
+	# support (EAPI 4 and later), and we also don't
+	# want the warning messages that it produces if
+	# we call it in 'nonfatal' mode, we use emake_cmd
+	# to emulate the desired parts of emake behavior.
+	local emake_cmd="${MAKE:-make} ${MAKEOPTS} ${EXTRA_EMAKE}"
+	if $emake_cmd -j1 check -n &> /dev/null; then
 		vecho ">>> Test phase [check]: ${CATEGORY}/${PF}"
-		if ! emake -j1 check; then
+		if ! $emake_cmd -j1 check; then
 			hasq test $FEATURES && die "Make check failed. See above for details."
 			hasq test $FEATURES || eerror "Make check failed. See above for details."
 		fi
-	elif emake -j1 test -n &> /dev/null; then
+	elif $emake_cmd -j1 test -n &> /dev/null; then
 		vecho ">>> Test phase [test]: ${CATEGORY}/${PF}"
-		if ! emake -j1 test; then
+		if ! $emake_cmd -j1 test; then
 			hasq test $FEATURES && die "Make test failed. See above for details."
 			hasq test $FEATURES || eerror "Make test failed. See above for details."
 		fi



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

end of thread, other threads:[~2011-05-26  6:26 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-14  4:31 [gentoo-commits] proj/portage:2.1.9 commit in: bin/ Zac Medico
  -- strict thread matches above, loose matches on Subject: below --
2011-05-26  6:18 Zac Medico
2011-05-26  6:18 Zac Medico
2011-05-05  6:48 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-05-04 20:03 Zac Medico
2011-04-14  1:57 Zac Medico
2011-04-13  7:52 Zac Medico
2011-04-13  7:52 Zac Medico
2011-04-13  7:52 Zac Medico
2011-04-13  7:52 Zac Medico
2011-03-27 20:03 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-26 19:31 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-18 21:12 Zac Medico
2011-03-14 16:24 Zac Medico
2011-03-02  0:56 Zac Medico
2011-03-01 20:55 Zac Medico
2011-02-22  3:14 Zac Medico
2011-02-20  0:04 Zac Medico
2011-02-20  0:04 Zac Medico
2011-02-14  4:31 Zac Medico
2011-02-07  0:29 Zac Medico

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