Description of problem: When doing livecd builds, as descibed here https://www.redhat.com/archives/fedora-livecd-list/2006-September/msg00079.html I want to have control over the locales / whatever installed. To do this I write out an RPM macro using %_install_langs. Turns out that I need to put this in /etc/rpm/ I would expect that yum/rpm would look _only_ in the path $INSTALL_ROOT/etc/rpm/* where INSTALL_ROOT is the --installroot passed to yum. Without this the host OS may pollute what yum ends up installing in my --installroot. If this is solved by setting an environment variable or something please advise. This affects OLPC builds too. Thanks.
The problem is that there are some things which have to be figured out prior to chroot'ing... this whole area of rpm is a little funky at times. Paul -- any thoughts? I haven't looked closely at pilgrim yet (on my todo list, probably a task for this weekend; which is why I haven't responded to any of the mail on the livecd list either), but you can programatically set macros and that's probably the better approach in general.
Yeah in/out chroot is pretty fiddly as the rpmrc sets the macrofiles up. You can easily use a yum plugin to set the macro for you (we do this in anaconda's class of yum) - basically you can do rpm.addMacro(key, val).
Adding a method for rpmReadConfigFiles() invoked from site-packages/rpm/__init__.py rather than compiling into _rpmmodle.so init_rpm() goes a long way towards extracting rpm configuration from within a chroot rather than from /.
The macro can be set easily and with the livecd creator importing yum now, we can trivially implement it.