From: "Michael Haubenwallner" <haubi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/prefix:master commit in: sys-apps/portage/files/, sys-apps/portage/
Date: Fri, 13 May 2016 11:39:38 +0000 (UTC) [thread overview]
Message-ID: <1463139564.5fc496c38e3464658a258557d31849ebd9598109.haubi@gentoo> (raw)
commit: 5fc496c38e3464658a258557d31849ebd9598109
Author: Michael Haubenwallner <michael.haubenwallner <AT> ssi-schaefer <DOT> com>
AuthorDate: Fri May 13 11:38:53 2016 +0000
Commit: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
CommitDate: Fri May 13 11:39:24 2016 +0000
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=5fc496c3
+sys-apps/portage-2.2.28-r4: bump ebuildshell patch to bug#155161 comment#36
Package-Manager: portage-2.2.28-prefix
.../portage/files/portage-2.2.28-ebuildshell.patch | 50 +++++++++++++++-------
...e-2.2.28-r3.ebuild => portage-2.2.28-r4.ebuild} | 0
2 files changed, 35 insertions(+), 15 deletions(-)
diff --git a/sys-apps/portage/files/portage-2.2.28-ebuildshell.patch b/sys-apps/portage/files/portage-2.2.28-ebuildshell.patch
index 69373f6..4674506 100644
--- a/sys-apps/portage/files/portage-2.2.28-ebuildshell.patch
+++ b/sys-apps/portage/files/portage-2.2.28-ebuildshell.patch
@@ -1,19 +1,19 @@
-From 3ae829681363c032c9863d4e5a41a762af89f93e Mon Sep 17 00:00:00 2001
+From 5e3167845640624f328969355db2e7f16cad2c83 Mon Sep 17 00:00:00 2001
From: Michael Haubenwallner <michael.haubenwallner@salomon.at>
Date: Wed, 6 Nov 2013 12:40:05 +0100
Subject: [PATCH] Add ebuildshell feature, bug#155161.
---
- bin/ebuild.sh | 123 ++++++++++++++++++++++++++++++++++-
- bin/filter-bash-environment.py | 57 +++++++++++-----
+ bin/ebuild.sh | 143 ++++++++++++++++++++++++++++++++++-
+ bin/filter-bash-environment.py | 57 ++++++++++----
bin/save-ebuild-env.sh | 2 +-
man/make.conf.5 | 6 ++
pym/_emerge/AbstractEbuildProcess.py | 1 +
pym/portage/const.py | 1 +
- 6 files changed, 172 insertions(+), 18 deletions(-)
+ 6 files changed, 192 insertions(+), 18 deletions(-)
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
-index f1586b2..8231a98 100755
+index f1586b2..d42ffd4 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -130,7 +130,7 @@ __qa_source() {
@@ -25,7 +25,7 @@ index f1586b2..8231a98 100755
retval=$?
set +e
[[ $shopts != $(shopt) ]] &&
-@@ -537,6 +537,127 @@ if [[ -n ${QA_INTERCEPTORS} ]] ; then
+@@ -537,6 +537,147 @@ if [[ -n ${QA_INTERCEPTORS} ]] ; then
unset BIN_PATH BIN BODY FUNC_SRC
fi
@@ -46,6 +46,19 @@ index f1586b2..8231a98 100755
+ local __ebuildshell_tmpf="${T}/ebuildshell.${__ebuildshell_pid}"
+ rm -f "${__ebuildshell_tmpf}."{ebuild,return}-{env,rovars}
+ (
++ cat <<-EOE
++ # local variables of functions using recursive ebuildshell are
++ # visible to the EXIT trap of that recursive ebuildshell. To
++ # keep them local, we have to filter them from that recursive
++ # ebuildshell's return-env. As 'declare -p' is unable to tell
++ # local-ity of variables, we abuse the trace attribute for local
++ # variables to filter them from the return-env. So we need the
++ # local alias active before declaring any functions.
++ # On a sidehand, this allows for copy&paste of function body
++ # lines including the local keyword.
++ alias local='declare -t'
++ shopt -s expand_aliases
++ EOE
+ (
+ declare -p
+ declare -fp
@@ -62,6 +75,17 @@ index f1586b2..8231a98 100755
+ "${__ebuildshell_bash_i_vars}" \
+ || die "filter-bash-environment.py failed"
+ )
++ # 'declare -g' is available since bash-4.2,
++ # https://bugs.gentoo.org/show_bug.cgi?id=155161#c35
++ if (( ${BASH_VERSINFO[0]} > 4 )) ||
++ (( ${BASH_VERSINFO[0]} == 4 && ${BASH_VERSINFO[1]} >= 2 ))
++ then
++ __ebuildshell_bash42_true=
++ __ebuildshell_bash42_false='#bash-4.2#'
++ else
++ __ebuildshell_bash42_true='#bash-4.2#'
++ __ebuildshell_bash42_false=
++ fi
+ # The already readonly variables, without bash maintained ones:
+ __ebuildshell_ro_ebuild_vars=$(<"${__ebuildshell_tmpf}.ebuild-rovars")
+ cat <<-EOE
@@ -72,6 +96,7 @@ index f1586b2..8231a98 100755
+ # be informative about what to do
+ PS1="EBUILD ${PN} $1 \$ "
+ type $1
++ ${__ebuildshell_bash42_false}echo 'warning: preserving variables across phases requires bash-4.2'
+ echo "WANTED: \$@"
+ echo "or use: \"\\\$@\""
+ # use bash history, but not the 'user's real one
@@ -79,12 +104,6 @@ index f1586b2..8231a98 100755
+ # but do not use history-expansion with '!',
+ # for copy&paste of function body lines containing: !
+ set +H
-+ # For copy&paste of function body lines, we want the 'local'
-+ # keyword available at the shell prompt as well. So we alias
-+ # the 'local' keyword to 'declare -t', to identify local
-+ # variables by their trace attribute.
-+ alias local='declare -t'
-+ shopt -s expand_aliases
+ # this is a debugging shell already
+ shopt -u extdebug
+ trap - DEBUG
@@ -97,16 +116,17 @@ index f1586b2..8231a98 100755
+ (
+ # declare -p does not tell the -g flag,
+ # so we add it by aliasing declare.
-+ echo \"alias declare='declare -g'\"
++ ${__ebuildshell_bash42_true}echo \"alias declare='declare -g'\"
+ declare -p
-+ echo \"unalias declare\"
++ ${__ebuildshell_bash42_true}echo \"unalias declare\"
+ declare -fp
+ shopt -p | grep -v '\\(expand_aliases\\|extdebug\\)$'
+ $([[ ${BASH_VERSINFO[0]} == 3 ]] && echo export)
+ ) |
+ (
+ # We may have more readonly variables now, yet we
-+ # need to filter variables that are readonly already.
++ # need to filter variables that were readonly before.
++ # And filter local variables by their trace attribute.
+ 2>'${__ebuildshell_tmpf}.return-rovars' \\
+ '${PORTAGE_PYTHON:-/tools/haubi/gentoo/s01en24/usr/bin/python}' \\
+ '${PORTAGE_BIN_PATH}'/filter-bash-environment.py \\
diff --git a/sys-apps/portage/portage-2.2.28-r3.ebuild b/sys-apps/portage/portage-2.2.28-r4.ebuild
similarity index 100%
rename from sys-apps/portage/portage-2.2.28-r3.ebuild
rename to sys-apps/portage/portage-2.2.28-r4.ebuild
next reply other threads:[~2016-05-13 11:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-13 11:39 Michael Haubenwallner [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-12-03 10:19 [gentoo-commits] repo/proj/prefix:master commit in: sys-apps/portage/files/, sys-apps/portage/ Fabian Groffen
2023-11-24 20:57 Fabian Groffen
2020-12-04 11:44 Fabian Groffen
2020-08-02 11:43 Fabian Groffen
2018-06-25 8:41 Fabian Groffen
2018-06-22 14:34 Michael Haubenwallner
2018-05-28 16:44 Michael Haubenwallner
2017-12-29 13:06 Fabian Groffen
2017-09-29 8:19 Michael Haubenwallner
2017-09-18 14:08 Michael Haubenwallner
2016-05-03 15:33 Michael Haubenwallner
2016-05-02 11:15 Michael Haubenwallner
2016-04-18 7:36 Fabian Groffen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1463139564.5fc496c38e3464658a258557d31849ebd9598109.haubi@gentoo \
--to=haubi@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox