[yocto] Recipes that update a shared file

Paul Eggleton paul.eggleton at linux.intel.com
Thu Oct 10 02:31:45 PDT 2013


Hi Seth,

On Wednesday 09 October 2013 19:16:15 seth bollinger wrote:
> What's the best practice for recipes that need to update a shared file
> provided by a different recipe?  For example let's say that the
> widget-watcher recipe creates /etc/ww.conf and the widget1, and widget2
> recipes need to append a line to the config.  I've searched through the
> recipes a bit and can't find a good example.  The closest that I've seen
> is pkg_postinst().  Is that the best method?

That's really the recommended way to do it. If the software being configured 
supports it, another way is to set it up to read all configuration files from a 
directory and then you can simply install a new file into that directory from 
the other recipe (e.g. Apache is usually configured to read all configuration 
files in /etc/httpd/conf.d or similar).

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the yocto mailing list