[OE-core] [oe][Patch] package.bbclass: fix host contamination warnings for source files

Richard Purdie richard.purdie at linuxfoundation.org
Mon Apr 4 22:43:30 UTC 2016


On Mon, 2016-04-04 at 23:12 +0200, Andreas Müller wrote:
> On Mon, Apr 4, 2016 at 10:46 AM, Andreas Müller
> <schnitzeltony at googlemail.com> wrote:
> > On Mon, Apr 4, 2016 at 10:00 AM, Max Krummenacher <
> > max.oss.09 at gmail.com> wrote:
> > > Hi Andreas
> > > 
> > > I guess Richard refers to this one:
> > > http://cgit.openembedded.org/openembedded-core/commit/meta/classe
> > > s/package.bbclass?h=master
> > > -next&id=ecb56a6ae0c870af680da03db9d39703b525fc98
> > > Max
> > > 
> Hi Max,
> 
> * your patch fixes my warnings
> * with Richard's comments I reduced your patch to
> 
> diff --git a/meta/classes/package.bbclass
> b/meta/classes/package.bbclass
> index bdbe96d..64bbeb4 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -410,6 +410,13 @@ def copydebugsources(debugsrcdir, d):
>          if retval:
>              bb.fatal("debugsrc symlink fixup failed with exit code
> %s
> (cmd was %s)" % (retval, cmd))
> 
> +        # cpio --no-preserve-owner does not create the destination
> files with
> +        # owner root even when run under pseudo, chown them
> explicitely.
> +        cmd = "find '%s%s' -not -uid 0 -exec chown 0:0 {} \;" %
> (dvar, debugsrcdir)
> +        (retval, output) = oe.utils.getstatusoutput(cmd)
> +        if retval:
> +            bb.fatal("cpio --no-preserve-owner fixup failed with
> exit
> code %s (cmd was %s)" % (retval, cmd))
> +
>          # The copy by cpio may have resulted in some empty
> directories!  Remove these
>          cmd = "find %s%s -empty -type d -delete" % (dvar,
> debugsrcdir)
>          (retval, output) = oe.utils.getstatusoutput(cmd)
> 
> and incremental build logs still look quiet (need a scratch build to
> be sure). Could you try if that one works for you?
> 
> Somehow cpio turns suspicious: my fedora 23 ships 2.11 which is 6
> years old. Have checked cpio's (git) logs but did not find something
> (there was a matching bugfix 2.10 -> 2.11 - ....)
> 
> So how about a survey:
> 
> * Which version of cpio does your build host distribution ship
> * do you see floods of host contamination warnings for shipped source
> files?

You could install a copy of our buildtools tarball, see if the problem
goes away with that installed?

Cheers,

Richard



More information about the Openembedded-core mailing list