how to build last

21 views
Skip to first unread message

Luigi Semenzato

unread,
Mar 6, 2023, 11:54:55 PM3/6/23
to ChromiumOS Development
Suppose I want to take a Chromiumos image and add stuff to it.  Suppose I wish to ensure that my stuff is installed after everything else, and I am OK with giving up some build parallelism.  Can I do this by interposing an ebuild, say "mydir/mystuff.ebuild", between "virtual/target-os" and its DEPENDs?  Would I do that by creating a new ebuild (mydir/mystuff.ebuild) in my private overlay, and also making a copy of "virtual/target-os" in my private overlay, that depends only on mydir/mystuff?  (What's a good existing dir for "mydir", or a good name?)

Thanks!

Manoj Gupta

unread,
Mar 7, 2023, 12:43:04 AM3/7/23
to Luigi Semenzato, ChromiumOS Development
You will have to make everything in target-os as a dependency of this package.

As an example of custom target-os ebuild, see

It has:
RDEPEND="
virtual/viking-os
sys-kernel/apex
virtual/u-boot
"

Now lets say you want to build your package <foo> in the end.
Then in the foo ebuild:
You need to add the same dependencies as well in <foo>. 


Also add <foo> as a dependency of target-os.
In the current build script, target-os is a terminal package i.e. nothing can depend on it.

You could however simplify the dependency chain maybe by putting these in another synthetic package e.g. my-project-os.

i.e. my-project-os will have

RDEPEND="
virtual/viking-os
sys-kernel/apex
virtual/u-boot
"
And the package foo can RDEPEND on my-project-os.

Thanks,
Manoj


On Mon, Mar 6, 2023 at 8:54 PM 'Luigi Semenzato' via ChromiumOS Development <chromiu...@chromium.org> wrote:
Suppose I want to take a Chromiumos image and add stuff to it.  Suppose I wish to ensure that my stuff is installed after everything else, and I am OK with giving up some build parallelism.  Can I do this by interposing an ebuild, say "mydir/mystuff.ebuild", between "virtual/target-os" and its DEPENDs?  Would I do that by creating a new ebuild (mydir/mystuff.ebuild) in my private overlay, and also making a copy of "virtual/target-os" in my private overlay, that depends only on mydir/mystuff?  (What's a good existing dir for "mydir", or a good name?)

Thanks!

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-dev

Luigi Semenzato

unread,
Mar 7, 2023, 12:57:35 PM3/7/23
to ChromiumOS Development, Manoj Gupta, ChromiumOS Development, Luigi Semenzato
Thank you Manoj!

Just to clarify: I want to ensure that _building_ happens in that order, so I should also use DEPEND, not just RDEPEND, correct?  I am not sure that RDEPEND enforces any build order.

Manoj Gupta

unread,
Mar 7, 2023, 1:01:33 PM3/7/23
to Luigi Semenzato, ChromiumOS Development, Manoj Gupta
ime, RDEPEND usually enforces build order but you could also add(or not) to DEPEND and experiment.

Luigi Semenzato

unread,
Mar 8, 2023, 1:21:57 PM3/8/23
to Manoj Gupta, ChromiumOS Development, Manoj Gupta
Thank you.  Experimenting may not resolve the issue because of that "usually", but this works fine if I add DEPEND="${RDEPEND}" and gives me more confidence that the build order will be respected.
Reply all
Reply to author
Forward
0 new messages