[gentoo-portage-dev] [PATCH] inherit: use local -x ECLASS (bug 676014)
Use local -x ECLASS. Bug: https://bugs.gentoo.org/656354 Bug: https://bugs.gentoo.org/676014 Signed-off-by: Zac Medico --- bin/ebuild.sh | 26 ++ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 820db50ca..64041dff9 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -242,21 +242,13 @@ inherit() { debug-print "*** Multiple Inheritence (Level: ${ECLASS_DEPTH})" fi - if [[ -n $ECLASS && -n ${!__export_funcs_var} ]] ; then - echo "QA Notice: EXPORT_FUNCTIONS is called before inherit in" \ - "$ECLASS.eclass. For compatibility with <=portage-2.1.6.7," \ - "only call EXPORT_FUNCTIONS after inherit(s)." \ - | fmt -w 75 | while read -r ; do eqawarn "$REPLY" ; done - fi - local repo_location local location local potential_location local x # These variables must be restored before returning. - local PECLASS=$ECLASS - local prev_export_funcs_var=$__export_funcs_var + local -x ECLASS local B_IUSE local B_REQUIRED_USE @@ -265,11 +257,19 @@ inherit() { local B_PDEPEND local B_HDEPEND local B_BDEPEND + + if [[ -n ${ECLASS} && -n ${!__export_funcs_var} ]] ; then + echo "QA Notice: EXPORT_FUNCTIONS is called before inherit in" \ + "${ECLASS}.eclass. For compatibility with <=portage-2.1.6.7," \ + "only call EXPORT_FUNCTIONS after inherit(s)." \ + | fmt -w 75 | while read -r ; do eqawarn "${REPLY}" ; done + fi + while [ "$1" ]; do location="" potential_location="" - export ECLASS="$1" + ECLASS="$1" __export_funcs_var=__export_functions_$ECLASS_DEPTH unset $__export_funcs_var @@ -379,12 +379,6 @@ inherit() { shift done ((--ECLASS_DEPTH)) # Returns 1 when ECLASS_DEPTH reaches 0. - if (( ECLASS_DEPTH > 0 )) ; then - export ECLASS=$PECLASS - __export_funcs_var=$prev_export_funcs_var - else - unset ECLASS __export_funcs_var - fi return 0 } -- 2.18.1
Re: [gentoo-dev] [RFC] Replacing binary-only SLOTs with separate packages
* Michał Górny schrieb am 19.01.19 um 17:25 Uhr: > On Sat, 2019-01-19 at 17:37 +0300, Andrew Savchenko wrote: > > I do not like the idea. Slots are very elegant and effective > > mechanism and is one of the points where Gentoo outruns other > > distributions. Proposed approach with compat packages will > > effectively disable slots for most cases. > > You haven't brought a single argument as to how slots are better than > compat packages. In fact, it's not even clear if you're talking about > the same use of slots that I am. One was, that you have one package (ebuild directory) for each piece of software. Unlike other distributions which have lots of different packages all for the same source an many cases. So I'd agree that its the more gentooish way to have it all in one ebuild directory. That having said I agree that current use of compat slots might be somewhat confusing even to developers. So why not improve usability here? I think it would increase the understanding of compat slots if we changed the naming of thoss slots. How about this: dev-libs/openssl (0.9.8-compat) 0.9.8u 0.9.8v 0.9.8w 0.9.8x ~0.9.8y 0.9.8z_p8-r1 (0)1.0.0h 1.0.0i […] [M]~1.1.1a [M]~1.1.1a-r1 (1.0.0-compat) ~1.0.2q-r200 I can imagine that this might improve the situation a lot. Of cource thet woult still be the job to fix ebuilds where dependencies are wrong. -Marc -- 0xCA3E7BF67F979BE5 - F7FB 78F7 7CC3 79F6 DF07 6E9E CA3E 7BF6 7F97 9BE5 signature.asc Description: PGP signature
Re: [gentoo-dev] ant-tasks.eclass patch proposal
hi, i just committed the changes to the eclass: commit f14e39de0e2eaa3d3011918e9febd89bfe98f7ee (HEAD -> master, origin/master, origin/HEAD) Author: Miroslav Šulc Date: Mon Jan 21 09:45:29 2019 +0100 ant-tasks.eclass: cleanup and improvement 1) removed obsolete code 2) increased default jdk/jre version to the lowest available version 1.8 3) added support for patching build.xml along with the original build.xml replacement Signed-off-by: Miroslav Šulc i did one minor change that was not in the patch. after chat with chewi i increased default jdk/jre to 1.8 instead of 1.6. this change does not affect any ebuild as all ebuilds have these values defined. regards miroslav Dne 18. 01. 19 v 18:25 Miroslav Šulc napsal(a): thank you for the comments. i added eapi check at the beginning supporting eapi 5|6|7 (5 is needed for current ebuilds). i also changed epatch to eapply and disabled patching build.xml for eapi5 just to make the code more robust, build.xml patching is not used in current ebuilds and those will be soon gone. once they are gone, this check and support for eapi5 can both be removed. attached is the updated patch. miroslav Dne 18. 01. 19 v 17:23 Brian Evans napsal(a): On 1/18/2019 11:11 AM, Miroslav Šulc wrote: @@ -130,7 +112,11 @@ ant-tasks_src_unpack() { cd "${S}" # replace build.xml with our modified for split building - mv -f "${WORKDIR}"/build.xml . + if [ -e "${WORKDIR}"/${PV}-build.patch ] ; then + epatch "${WORKDIR}"/${PV}-build.patch Adding epatch without 'inherit epatch'? Sounds like gambling on faith. Also limits to EAPI=6. Brian + else + mv -f "${WORKDIR}"/build.xml . + fi cd lib # remove bundled xerces