[OE-core] [PATCH 1/1] wic: add pseudo to the populate-extfs step

Peter Seebach peter.seebach at windriver.com
Fri Oct 18 20:03:58 UTC 2013


On Fri, 18 Oct 2013 16:04:30 +0100
Richard Purdie <richard.purdie at linuxfoundation.org> wrote:

> > -        populate_script = "%s/usr/bin/populate-extfs.sh" % native_sysroot
> > +        populate_script = "export PSEUDO_PREFIX=%s/usr;" % native_sysroot
> > +        populate_script += "export PSEUDO_LOCALSTATEDIR=%s/../pseudo;" % rootfs_dir
> > +        populate_script += "export PSEUDO_PASSWD=%s;" % rootfs_dir
> > +        populate_script += "export PSEUDO_NOSYMLINKEXP=1;"
> > +        populate_script += "export PSEUDO_DISABLED=0;"
> > +        populate_script += "%s/usr/bin/pseudo %s/usr/bin/populate-extfs.sh" % \
> > +            (native_sysroot, native_sysroot)
> > +
> >          image_extra_space = 10240
> >  
> >          image_rootfs = rootfs_dir  
> 
> I've merged this but I would like to figure out why pseudo can't manage
> more sane defaults rather than needing all of those variables...

Good question. Historical answer:

You need PREFIX to figure out where libpseudo.so is. LOCALSTATEDIR is there
becaus one copy of libpseudo.so can correspond to several different state
dirs. PASSWD is an optional feature, and not enabled by default; maybe it
should be, but the question of what path to use for it is not obvious. I
suppose it could be changed to default to / or the current chroot directory,
but I don't know that that would help. NOSYMLINKEXP is behavior which may
be desireable or undesireable, and it's really usage-specific. Not sure why
DISABLED=0 is needed here.

In a lot of these cases, there's no meaningful way to make a sane default. I
suppose in theory we could search through LD_LIBRARY_PATH to find a
libpseudo.so and guess PREFIX from that, the other bits are pretty hard to
define good defaults for. Arguably, NOSYMLINKEXP has a sane default, it's
just that this is the use case for which the sane default isn't the right
choice.

And I was thinking a bit about a config file, but that wouldn't really work
for several of these; you don't necessarily want NOSYMLINKEXP shared between
different clients running against the same tree.

-s
-- 
Listen, get this.  Nobody with a good compiler needs to be justified.



More information about the Openembedded-core mailing list