[OE-core] "${bindir}" versus "${bindir}/*" ??

Richard Purdie richard.purdie at linuxfoundation.org
Sat Mar 24 11:26:36 UTC 2012


On Sat, 2012-03-24 at 06:01 -0400, Robert P. J. Day wrote:
> On Sat, 24 Mar 2012, Richard Purdie wrote:
> 
> > On Sat, 2012-03-24 at 04:40 -0400, Robert P. J. Day wrote:
> > > in bitbake.conf, numerous variables like "FILES_${PN}" are
> > > initialized with a combination of directory variables, with two
> > > different forms:
> > >
> > >   * ${bindir}
> > >   * ${bindir}/*
> > >
> > > is there a functional difference between those two?  my wildly
> > > speculative guess is that if "*" works as it does in the shell, it
> > > would simply skip any hidden objects.  is that the difference?  since
> > > i don't see that clarified anywhere.
> >
> > The former is recursive and the latter is not and will just match files
> > in the directory (unhidden ones at that).
> 
>   ah, that clears up so much.  i'm actually embarrassed to ask such
> obvious questions -- is that written up somewhere that i should have
> run across it before asking about it?
> 
> rday
> 
> p.s.  By "unhidden ones at that," i'm assuming you mean *only*
> unhidden ones?  so that its behaviour is entirely consistent with what
> people would expect?

I'm not passing judgement on that :).

Keep in mind that the whole system grew fairly organically more so at
some times that others and there are a ton on inconsistencies,
particularly when you get deeply into the system. I think OE-Core has
fixed a lot of details and has concentrated on the most user visible
ones but there are more things that could be cleaned up. I doubt we ever
will have a totally consistent system and I suspect if we did we'd hurt
the power and flexibility which are some of the bigger assets of the
project.

FWIW, the behaviour of the FILES_* variables uses python's globbing
functionality behind the scenes. If you know that it helps to understand
it:

http://docs.python.org/library/glob.html
(which in turn refers you to shell expansion which is something most
people are familiar with).

I think what I'd ask is where you find these things, ask questions and
get answers (such as the info about python glob above), can you please
try and document it somewhere?

Even if this is in the form of a Q&A type document it would perhaps save
the information and someone like Scott Rifenbark could then go through
this when he was time and integrate it into the manuals (assuming you
don't want to send him direct patches for that). This particular change
would make a good addition to:

http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#var-FILES

I'd also add that I sometimes hate the fact we use glob for FILES since
it does limit some of the things you can do. .debug directories are a
pet hate of mine in that regard.

Cheers,

Richard






More information about the Openembedded-core mailing list