All of lore.kernel.org
 help / color / mirror / Atom feed
* populate_sysroot and sstate question
@ 2015-03-24 22:22 Vuille, Martin (Martin)
  2015-03-25 13:08 ` Richard Purdie
  0 siblings, 1 reply; 5+ messages in thread
From: Vuille, Martin (Martin) @ 2015-03-24 22:22 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 708 bytes --]

Poky Daisy 1.6.1

I have a custom package of font files and a custom recipe to install then
into ${libdir}/fonts.

I don't want these files in the sysroot, as they are not necessary there,
they are only required on the target, and they make the SDK larger.

In my recipe, I defined an empty populate_sysroot task to override the
default behavior of copying the font files to sysroot (presumably because
they are in ${libdir}).

Today, I came across the fact that this results in an empty populate_sysroot
sstate tarball, which causes a setscene error if I need to use the sstate for
that package later.

Is there a better way to suppress populate_sysroot without breaking
setscene?

MV


[-- Attachment #2: Type: text/html, Size: 3049 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: populate_sysroot and sstate question
  2015-03-24 22:22 populate_sysroot and sstate question Vuille, Martin (Martin)
@ 2015-03-25 13:08 ` Richard Purdie
  2015-03-25 13:33   ` Vuille, Martin (Martin)
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2015-03-25 13:08 UTC (permalink / raw)
  To: Vuille, Martin (Martin); +Cc: yocto

On Tue, 2015-03-24 at 22:22 +0000, Vuille, Martin (Martin) wrote:
> Is there a better way to suppress populate_sysroot without breaking
> setscene?

Define an empty sysroot_stage_dirs function.

Cheers,

Richard




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: populate_sysroot and sstate question
  2015-03-25 13:08 ` Richard Purdie
@ 2015-03-25 13:33   ` Vuille, Martin (Martin)
  2015-03-25 13:51     ` Richard Purdie
  0 siblings, 1 reply; 5+ messages in thread
From: Vuille, Martin (Martin) @ 2015-03-25 13:33 UTC (permalink / raw)
  To: Richard Purdie; +Cc: yocto

> From: Richard Purdie [mailto:richard.purdie@linuxfoundation.org]
> Sent: March 25, 2015 9:09 AM
> 
> On Tue, 2015-03-24 at 22:22 +0000, Vuille, Martin (Martin) wrote:
> > Is there a better way to suppress populate_sysroot without breaking
> > setscene?
> 
> Define an empty sysroot_stage_dirs function.
> 

Thanks Richard, but I still get the same error, see below. Perhaps I misunderstood
your instructions.

I did a cleansstate on the package, added the empty function to the recipe

	do_populate_sysroot () {
	}

	sysroot_stage_dirs() {
	}

When I delete poky/build/tmp and run the build again, I get this error during
setscene processing:

	ERROR: Error executing a python function in /home/platform/Workspace/dspgbase/poky/../meta-Avaya/recipes-avaya/avaya-fonts-bdf/avaya-fonts-bdf_1.0.0.bb:

	The stack trace of python calls that resulted in this exception/failure was:
	File: 'do_populate_sysroot_setscene', lineno: 6, function: <module>
	     0002:def do_populate_sysroot_setscene(d):
	     0003:    sstate_setscene(d)
	     0004:
	     0005:
	 *** 0006:do_populate_sysroot_setscene(d)
	     0007:
	File: 'do_populate_sysroot_setscene', lineno: 3, function: do_populate_sysroot_setscene
	     0001:
	     0002:def do_populate_sysroot_setscene(d):
	 *** 0003:    sstate_setscene(d)
	     0004:
	     0005:
	     0006:do_populate_sysroot_setscene(d)
	     0007:
	File: 'sstate.bbclass', lineno: 3, function: sstate_setscene
	     0001:def sstate_setscene(d):
	     0002:    shared_state = sstate_state_fromvars(d)
	 *** 0003:    accelerate = sstate_installpkg(shared_state, d)
	     0004:    if not accelerate:
	     0005:        raise bb.build.FuncFailed("No suitable staging package found")
	     0006:
	File: 'sstate.bbclass', lineno: 68, function: sstate_installpkg
	     0064:        os.remove(fixmefn)
	     0065:
	     0066:    for state in ss['dirs']:
	     0067:        prepdir(state[1])
	 *** 0068:        os.rename(sstateinst + state[0], state[1])
	     0069:    sstate_install(ss, d)
	     0070:
	     0071:    for plain in ss['plaindirs']:
	     0072:        workdir = d.getVar('WORKDIR', True)
	Exception: OSError: [Errno 2] No such file or directory

MV	

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: populate_sysroot and sstate question
  2015-03-25 13:33   ` Vuille, Martin (Martin)
@ 2015-03-25 13:51     ` Richard Purdie
  2015-03-25 14:48       ` Vuille, Martin (Martin)
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2015-03-25 13:51 UTC (permalink / raw)
  To: Vuille, Martin (Martin); +Cc: yocto

On Wed, 2015-03-25 at 13:33 +0000, Vuille, Martin (Martin) wrote:
> > From: Richard Purdie [mailto:richard.purdie@linuxfoundation.org]
> > Sent: March 25, 2015 9:09 AM
> > 
> > On Tue, 2015-03-24 at 22:22 +0000, Vuille, Martin (Martin) wrote:
> > > Is there a better way to suppress populate_sysroot without breaking
> > > setscene?
> > 
> > Define an empty sysroot_stage_dirs function.
> > 
> 
> Thanks Richard, but I still get the same error, see below. Perhaps I misunderstood
> your instructions.
> 
> I did a cleansstate on the package, added the empty function to the recipe
> 
> 	do_populate_sysroot () {
> 	}
> 
> 	sysroot_stage_dirs() {
> 	}

Just define the empty sysroot_stage_dirs, not populate_sysroot. The
stage_dirs function handles copying files so if its empty, no files will
be copied in.

Cheers,

Richard



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: populate_sysroot and sstate question
  2015-03-25 13:51     ` Richard Purdie
@ 2015-03-25 14:48       ` Vuille, Martin (Martin)
  0 siblings, 0 replies; 5+ messages in thread
From: Vuille, Martin (Martin) @ 2015-03-25 14:48 UTC (permalink / raw)
  To: Richard Purdie; +Cc: yocto

> From: Richard Purdie [mailto:richard.purdie@linuxfoundation.org]
> Sent: March 25, 2015 9:51 AM
> 
> Just define the empty sysroot_stage_dirs, not populate_sysroot. The
> stage_dirs function handles copying files so if its empty, no files will be
> copied in.
> 

Thanks, Richard, works fine!
MV

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-25 14:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-24 22:22 populate_sysroot and sstate question Vuille, Martin (Martin)
2015-03-25 13:08 ` Richard Purdie
2015-03-25 13:33   ` Vuille, Martin (Martin)
2015-03-25 13:51     ` Richard Purdie
2015-03-25 14:48       ` Vuille, Martin (Martin)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.