Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o, Ulrich Mueller <ulm@g.o>
Cc: "Michał Górny" <mgorny@g.o>
Subject: Re: [gentoo-portage-dev] [PATCH] ebuild.sh: Explicitly ban get_libdir in global scope
Date: Wed, 30 Aug 2017 18:00:59
Message-Id: 27348bd9-fe5c-e353-6e7c-5407bf9b636a@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH] ebuild.sh: Explicitly ban get_libdir in global scope by Ulrich Mueller
1 On 08/30/2017 10:52 AM, Ulrich Mueller wrote:
2 >>>>>> On Wed, 30 Aug 2017, Zac Medico wrote:
3 >
4 >> It's possible that there are working ebuilds that call get_libdir in
5 >> global scope.
6 >
7 > How could that be possible when get_libdir() is defined in
8 > phase-helpers.sh?
9
10 During an "normal" ebuild phase, ebuild.sh will source phase-helpers.sh
11 before it sources the ebuild:
12
13 if [[ $EBUILD_PHASE != depend ]] ; then
14 source "${PORTAGE_BIN_PATH}/phase-functions.sh" || die
15 source "${PORTAGE_BIN_PATH}/save-ebuild-env.sh" || die
16 source "${PORTAGE_BIN_PATH}/phase-helpers.sh" || die
17 source "${PORTAGE_BIN_PATH}/bashrc-functions.sh" || die
18 else
19 --
20 Thanks,
21 Zac