[oe] Fix: stage hidden files as well

Chris Larson clarson at kergoth.com
Wed Apr 28 23:52:21 UTC 2010


On Wed, Apr 28, 2010 at 2:49 PM, Tom Rini <tom_rini at mentor.com> wrote:

> On Mon, 2010-04-26 at 11:24 -0500, Mike Westerhof wrote:
> > The following patch is a proposed patch to fix the problem where hidden
> > files are sometimes missed during staging.  A specific example is that
> > the symbolic link ".config" is not copied to the kernel staging area,
> > which causes madwifi-ng to fail to build.
> >
> > diff --git a/classes/staging.bbclass b/classes/staging.bbclass
> > index 32038a5..cb19cb9 100644
> > --- a/classes/staging.bbclass
> > +++ b/classes/staging.bbclass
> > @@ -35,6 +35,13 @@ sysroot_stage_dir() {
> >         if [ -d "$src" ]; then
> >                 mkdir -p "$dest"
> >                 cp -fpPR "$src"/* "$dest"
> > +               # Get hidden files as well, but carefully
> > +               for i in "$src"/.*
> > +               do
> > +                       if [ "$i" != "$src"/. -a "$i" != "$src"/.. ];
> then
> > +                              cp -fpPR "$i" "$dest"
> > +                       fi
> > +               done
> >         fi
> >  }
> >
> > If anyone has a better way to address the copy operations above, that
> > would be great.
>
> So, I said this on IRC, but more formally, how about just for i in
> "$src"/.??* do as this lets us know we don't have '.' or '..', and if we
> skip out on '.a' or something being installed, that reeks of a bug in
> the program in question that should be fixed anyways (and would
> catch .config and others).


Alternatively, could for i in "$src".[a-zA-Z]*, I doubt we care about
dotfiles starting with a number.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics



More information about the Openembedded-devel mailing list