[yocto] Package Level Dependencies
Rudolf J Streif
rudolf.streif at gmail.com
Mon Feb 22 08:31:36 PST 2016
Hi Sebastian,
>
> Thnx for your input! I guess I can see your point. In particular I wasn't
> thinking so much on using ".inc" files. Due to the fact that I will be
> having like 10-20 different test123-config-xxx packages managing this using
> "RCONFLICTS" might be tedious. I guess this is what virtual packages (say
> test123-config-xxx has something like PROVIDES=virtual/test123-config and
> test123 has a RDEPENDS on virtual/test123-config) are for and I will try to
> follow this path for now.
>
Well, that wouldn't solve the problem of having 10 to 20 different recipes
either, since you would have to write a recipe for each config file with a
specific PROVIDES in it.
> For a couple of reasons, the configuration files are in the same git
> repository as the source code of "test123". Is there a way of sharing
> working directories between (at least all config-package recipes, such as I
> don't net to checkout the whole git repository for each of my 10-20 config
> packages?
>
I suppose you are talking about a remote Git repository. The do_fetch task
will first check it out locally to DL_DIR. If all of your config recipes use the
same URL for the source BitBake would only check it out once locally to
DL_DIR. That automatically saves the download step. However, for each recipe
the do_unpack task would copy the config sources from DL_DIR to ${S}. You could
skip do_unpack and point ${S} to a different directory, but that is getting
rather messy. I would not recommend it.
Essentially, what approach to take comes actually down to what the criteria
are to select one configuration file over the other. What is it dependent on
that you select test123-config-XXX rather than test123-config-YYY?
If it is a build-time dependency such as the MACHINE then you can do a
conditional override, as Philipp Ballister suggested.
If it is a build configuration dependency you could resolve it in the install
task. Maybe you could define your own configuration variable that you set in
local.conf (or in a disto configuration file):
TEST123_CONFIG = "XXX"
Recipe:
do_install_append () {
# install config file here
install 544 test123-${TEST123_CONFIG}.conf ${D}/<location>
}
Cheers,
Rudi
More information about the yocto
mailing list