From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] Package with dependency with another git
Date: Thu, 23 Aug 2018 18:36:52 +0200 [thread overview]
Message-ID: <20180823163652.GG9365@scaer> (raw)
In-Reply-To: <ea-mime-5b7ed395-49e5-1bbae393@www-1.netcourrier.com>
Louis-Paul, All,
On 2018-08-23 17:32 +0200, lpdev at cordier.org spake thusly:
> Currently adding a new package to buildroot, I have a package "A" that fetch its sources on git, and is a cmake-package. This
> package A also require another git repo "B" to be fetched, and a CMake a path in _CONF_OPTS that points to repo "B" must be added.
Meh... Not nice...
> My solution was to create a new package "B" on which package "A" depends on, and use generic-package with no build rules. Buildroot
> is taking care of fetching the sources automatically then.
>
> However I did not find any way to point on build directory of package B from packagea.mk. Package build are named with the
> following: package_name-version. I am currently pointing to the path manually in my script like this:
>
> PACKAGEA_CONF_OPTS +=? -DREPOB_DIR=$(BUILD_DIR)/packageb-$(PACKAGEB_VERSION)/
>
> My questions are:
>
> - Is it a good practice to do this?
Well, you basically have no other choice, unless you are also in charge
of said packages, in which case maybe having B as a git-submodule of A
could make things a bit easier...
Does B provide a library?
Can B be installed on its own?
Can A be told to use a pre-install B?
> - Is it a good practice to create a package that only fetch sources?
Good practice, not really. But not bad either. We have a few such
packages, which are then used to provide extensions to the linux kernel.
See for example package/aufs/aufs.mk
> - Is there any variable to point to the build dir of a specific package?
$($(PKGNAME)_SRCDIR)
... where you'd replace $(PKGNA<ME) with the name of package B in your
case.
> - Would it be better to add a pre-configure in packagea.mk hook that calls git and fetch the repo B?
Nope, otherwise you'd side-track Buildroot download infra, which alows
doing off-line builds:
$ make source
[get coffee and wait]
[unplug network]
$ make
[should succeed]
Regards,
Yann E. MORIN.
> Thank you for you help.
>
> BR,
> Louis-Paul CORDIER
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
prev parent reply other threads:[~2018-08-23 16:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-23 15:32 [Buildroot] Package with dependency with another git lpdev at cordier.org
2018-08-23 16:35 ` Baruch Siach
2018-08-23 16:36 ` Yann E. MORIN [this message]
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=20180823163652.GG9365@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.