Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Peter Seebach <peter.seebach@windriver.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Tom Zanussi <tom.zanussi@linux.intel.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/1] wic: add pseudo to the populate-extfs step
Date: Fri, 18 Oct 2013 15:03:58 -0500	[thread overview]
Message-ID: <20131018150358.493f6279@e6410-2> (raw)
In-Reply-To: <1382108670.29912.553.camel@ted>

On Fri, 18 Oct 2013 16:04:30 +0100
Richard Purdie <richard.purdie@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.


      parent reply	other threads:[~2013-10-18 20:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-16 20:25 [PATCH 0/1] wic populate-ext fix Tom Zanussi
2013-10-16 20:25 ` [PATCH 1/1] wic: add pseudo to the populate-extfs step Tom Zanussi
2013-10-16 21:13   ` Darren Hart
2013-10-18 15:04   ` Richard Purdie
2013-10-18 15:10     ` Mark Hatle
2013-10-18 20:03     ` Peter Seebach [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131018150358.493f6279@e6410-2 \
    --to=peter.seebach@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=tom.zanussi@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox