Google Groups

Re: [cros-dev] Re: Upstreaming emerge improvements (was: Goodbye Frankenbuild: New workflow for correct incremental builds)

Zac Medico Aug 11, 2010 4:38 AM
Posted in group: Chromium OS Development
I was working on writing documentation for the HDEPEND patch when I
realized that it seems simpler for ebuild developers if we divide the
dependencies as follows :

In EAPI 4 or later, DEPEND has been divided into two parts:
DEPEND for build-time host dependencies, and TDEPEND for
build-time target dependencies. This division is designed
specifically to minimize difficulty in the process of
adapting ebuilds that were written for earlier EAPIs,
and therefore it also minimizes the adjustments that
ebuild developers will have to make to the thought
processes involved when writing ebuilds from scratch. In
an environment that does not involve cross-compilation,
TDEPEND behaves the same as DEPEND. When an ebuild is
converted from EAPI 3 or earlier to EAPI 4 or later,
in order to support cross-compilation environments, some
dependencies may need to be migrated to TDEPEND.

For ebuilds that have EAPI 4 or later, the emerge
--root-deps option has no effect since it is made obsolete
by division between DEPEND and TDEPEND. If EAPI 3 or
earlier ebuilds are used in combination with EAPI 4 or
later ebuilds, the --root-deps behavior will still be
applied to the EAPI 3 or earlier ebuilds (there is no
behavior change for ebuilds having older EAPIs).

The attached patch applies to the master branch of portage (apply on
top of commit cc03d96314dc108964c9c1b0431a0466f20ad147 if it doesn't
apply to HEAD). You can test this patch by creating ebuilds with
EAPI=4_pre0_tdepend (this is a temporary EAPI, intended just for
testing purposes). I've also attached this patch to bug #317337:

2010/8/2 Tien-Ren Chen <>:
> The patch works much like the one given in #317337, and I think the
> one in #317337 looks more complete.
> however #317337 is marked as duplicate of #201499 [1].
> In the #201499 thread they actually made a nice proposal to introduce
> a new dependency system that uses dependency labels [2].
> I'm currently planning on implementing it since it looks to be the
> preferred draft EAPI.
> What I'm concerning is that I don't have the confidence I'm able to
> hack portage to support the new system.
> The dependency handling code in portage uses complicated algorithm and
> is lack of document.
> I'm turning to paludis to see if it's easier to be modified to fit our purpose.
> Reference
> [1]
> [2]
> On Fri, Jul 30, 2010 at 3:36 PM, Anush Elangovan(அனுஷ்)
> <> wrote:
>> Resending from the correct email address to get to the mailing list.
>> On Fri, Jul 30, 2010 at 12:34 AM, Anush Elangovan(அனுஷ்) <>
>> wrote:
>>> Zac,
>>>    Here is a patch Tien-Ren came up with for HDEPEND. CC'ing him too. He
>>> was planning on revising the patch. Just fyi.
>>> Thanks
>>> Anush