All of lore.kernel.org
 help / color / mirror / Atom feed
* about staging
@ 2009-10-30  7:40 Frans Meulenbroeks
  2009-10-30 16:43 ` Koen Kooi
  0 siblings, 1 reply; 5+ messages in thread
From: Frans Meulenbroeks @ 2009-10-30  7:40 UTC (permalink / raw)
  To: openembedded-devel

Hi,

Yesterday I ended up in a discussion on staging in #oe (ok, ok, I
mainly caused the discussion :-) )
Also based upon that I looked at various recipes on how people
implement staging.

There does not seem to be really standard way.
Some recipes copy from ${S} which ihmo is not desirable; i think it
should be a file that is exported by the application).
Others use other mechanisms.

For my own recipe I ended up with something like:

do_stage() {
        install -d ${STAGING_INCDIR}
        install -d ${STAGING_INCDIR}/${PN}
        install -m 0644 ${D}/${includedir}/${PN}/*.h ${STAGING_INCDIR}/${PN}
}

as that seems the best. ${D} contans the exported/installed files from
the application. Those files are the ones the application wants to
make externally available and those should end up in staging. Not
something from ${S}.

There is something odd here though. Only a few recipes do this
1453 recipes have a do_stage or do_stage_append function.
646 of these do autotools_stage_all (and perhaps other things).
The rest? all kind of interesting variants. Some understandable, some
outright odd.

That has lead me to the following thoughts:
Why is not all of install/usr/include (including subdirs) copied to
staging inc?
Why is not all of install/usr/lib copiied to staging lib?
(and of course alternatives like /usr/loocal/lib, /usr/local/include, ...)

A solution could be to do this automatically (and have a way with a
var to add additional dirs). This is more or less identical to making
the _dev packages but now copying stuff to staging.
Alternately we could opt for a manual solution where do_stage()
invokes e.g. do_stage_inc() and do_stage_lib(), which (apart from the
obvious defaults) use a variable to decide what directories/files are
copied to staging (normally from ${D}).
After that we can clean the existing recipes and probably get rid of
most of the do_stage rules.

What do people feel about this?

Any volunteers to implement this? I'm more than happy to do part of
the recipe cleaning. My knowledge of the internal structure and do's
and don't's of the build system are pretty weak (and so is my pyhthon
knowledge) so I'd rather not make the build system changes myself.
(unless someone stands up who wants to guide and mentor me).

Frans

PS: I used install in my example above, which I know is the regular
way to do it.
As I also had some subdirs it was more complicated than given above.
Would a cp -r followed by a chmod -R have been ok instead? (it would
definitely be a lot simpler). FM



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

end of thread, other threads:[~2009-10-31 10:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-30  7:40 about staging Frans Meulenbroeks
2009-10-30 16:43 ` Koen Kooi
2009-10-30 17:32   ` Frans Meulenbroeks
2009-10-31  7:39     ` Denys Dmytriyenko
2009-10-31 10:43       ` Frans Meulenbroeks

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.