[oe] Overriding package config files in OE

shanevolpe at gmail.com shanevolpe at gmail.com
Thu Nov 1 16:49:20 UTC 2007


I  have quite a few config files I need to override with my own
customized files.  From what I have seen the most common way to do
this is to set up a local collection and use it in an overlay fashion
copying all the packages you wish to modify a config file for into the
local collection.
 I do not like the above solution for several reasons, its a
documentation challenge to keep track of what packages you just
changed config files and what packages you may have added patches or
changed other things (compile/linker/EXTRA_OECONF).  It also presents
a challenge when you want to merge back into a later version of OE.
It also forces you to make duplicate machines with different names and
add in machine directories to the package directory containing the
unique configurations if you have the same hardware that may have
different options (configurations).  Also if you wish to field upgrade
a machine from one version to another (configuration) it would be, I
think, a challenge with the above method.

Since I'm not satisfied with the overlay option I have worked on a
different approach and is the real reason I'm posting this email as I
would like to get feedback, comments  and criticism to my approach,
please keep in mind that I do realize this approach is STILL a hack
but it is what I have been able to come up with in a short period of
time and currently I believe it to be more scalable than the overlay
and also easier to manage and document.

I made a separate package containing all my custom config files, I
will refer to it as configs.bb.  I did NOT flag them as config files
(CONFFILES).

I was then able to make an image.bb file as follows:
##############################################################
EXTRA_IMAGEDEPENDS = "configs"
#RDEPENDS = ${PACKAGE_INSTALL}
RDEPENDS = "task-base"

PACKAGE_INSTALL = "${RDEPENDS} ${EXTRA_IMAGEDEPENDS}"
LICENSE = "LGPL"
PR = "r0"
IMAGE_BASENAME = "my-image"
IMAGE_ROOTFS = "${TMPDIR}/rootfs_myimage"

inherit image
##############################################################

This seems to force my configs.bb to be installed into the rootfs
after all the other packages have been installed and since I did not
specify the files in configs.bb as configuration  files it overrides
all the config files of the already installed packages with out
causing ipkg to spit out questions on how to handle the config file
(update, keep current version, show diffs) and hanging up the image
building.

Also with this method if you do need to update config.bb you just need
to set -force-overwrite and if you update one of the packages you
overwrote a config file to, ipkg should prompt you with what you want
to do with the config file.

Regards,
Shane




More information about the Openembedded-devel mailing list