All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH] binconfig.bbclass: search configs in PKGD instead of S
@ 2011-01-27 22:31 Stanislav Brabec
  2011-01-28  1:19 ` Andreas Oberritter
  2011-01-28  5:03 ` Khem Raj
  0 siblings, 2 replies; 4+ messages in thread
From: Stanislav Brabec @ 2011-01-27 22:31 UTC (permalink / raw)
  To: openembedded-devel

Hallo.

It seems that searching for binconfig in S makes more problems than it
brings benefits. It breaks for example ncurses - it populates
ncurses-config instead of ncurses5-config and ncursesw5-config).

Searching in the installed root seems to be more logical.

Most packages don't need to be ported to this change, as they install
config file with the same name as it exists in sources. But probably
several will need porting.

--- a/classes/binconfig.bbclass
+++ b/classes/binconfig.bbclass
@@ -49,7 +49,7 @@
 SYSROOT_PREPROCESS_FUNCS += "binconfig_sysroot_preprocess"
 
 binconfig_sysroot_preprocess () {
-	for config in `find ${S} -name '${BINCONFIG_GLOB}'`; do
+	for config in `find ${PKGD} -name '${BINCONFIG_GLOB}'`; do
 		configname=`basename $config`
 		install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}
 		cat $config | sed ${@get_binconfig_mangle(d)} > ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/$configname

-- 

________________________________________________________________________
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus




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

* Re: [RFC][PATCH] binconfig.bbclass: search configs in PKGD instead of S
  2011-01-27 22:31 [RFC][PATCH] binconfig.bbclass: search configs in PKGD instead of S Stanislav Brabec
@ 2011-01-28  1:19 ` Andreas Oberritter
  2011-01-28 14:32   ` Stanislav Brabec
  2011-01-28  5:03 ` Khem Raj
  1 sibling, 1 reply; 4+ messages in thread
From: Andreas Oberritter @ 2011-01-28  1:19 UTC (permalink / raw)
  To: openembedded-devel

On 01/27/2011 11:31 PM, Stanislav Brabec wrote:
> It seems that searching for binconfig in S makes more problems than it
> brings benefits. It breaks for example ncurses - it populates
> ncurses-config instead of ncurses5-config and ncursesw5-config).

Indeed. Installing *-config files which don't get installed by the
recipe is prone to cause subtle errors. I modified pkgconfig.bbclass in
a similar way in commit c2c8fe4c5629add94bd0b922f5b3446624a9f4d8.

"find recipes -name "*-config" -type f" shows candidates which may cause
breakage with this patch applied, in case they need to be installed but
only get copied to the source directory.

> Searching in the installed root seems to be more logical.
> 
> Most packages don't need to be ported to this change, as they install
> config file with the same name as it exists in sources. But probably
> several will need porting.

Why is this function needed at all? Isn't it possible to do the mangling
before or after do_install like in pkgconfig.bbclass?

Regards,
Andreas



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

* Re: [RFC][PATCH] binconfig.bbclass: search configs in PKGD instead of S
  2011-01-27 22:31 [RFC][PATCH] binconfig.bbclass: search configs in PKGD instead of S Stanislav Brabec
  2011-01-28  1:19 ` Andreas Oberritter
@ 2011-01-28  5:03 ` Khem Raj
  1 sibling, 0 replies; 4+ messages in thread
From: Khem Raj @ 2011-01-28  5:03 UTC (permalink / raw)
  To: openembedded-devel

On Thu, Jan 27, 2011 at 2:31 PM, Stanislav Brabec <utx@penguin.cz> wrote:
> Hallo.
>
> It seems that searching for binconfig in S makes more problems than it
> brings benefits. It breaks for example ncurses - it populates
> ncurses-config instead of ncurses5-config and ncursesw5-config).
>
> Searching in the installed root seems to be more logical.
>
> Most packages don't need to be ported to this change, as they install
> config file with the same name as it exists in sources. But probably
> several will need porting.

Yes this patch looks sane to me.

>
> --- a/classes/binconfig.bbclass
> +++ b/classes/binconfig.bbclass
> @@ -49,7 +49,7 @@
>  SYSROOT_PREPROCESS_FUNCS += "binconfig_sysroot_preprocess"
>
>  binconfig_sysroot_preprocess () {
> -       for config in `find ${S} -name '${BINCONFIG_GLOB}'`; do
> +       for config in `find ${PKGD} -name '${BINCONFIG_GLOB}'`; do
>                configname=`basename $config`
>                install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}
>                cat $config | sed ${@get_binconfig_mangle(d)} > ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/$configname
>
> --
>
> ________________________________________________________________________
> Stanislav Brabec
> http://www.penguin.cz/~utx/zaurus
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>



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

* Re: [RFC][PATCH] binconfig.bbclass: search configs in PKGD instead of S
  2011-01-28  1:19 ` Andreas Oberritter
@ 2011-01-28 14:32   ` Stanislav Brabec
  0 siblings, 0 replies; 4+ messages in thread
From: Stanislav Brabec @ 2011-01-28 14:32 UTC (permalink / raw)
  To: openembedded-devel

Andreas Oberritter wrote:
> On 01/27/2011 11:31 PM, Stanislav Brabec wrote:
> > It seems that searching for binconfig in S makes more problems than it
> > brings benefits. It breaks for example ncurses - it populates
> > ncurses-config instead of ncurses5-config and ncursesw5-config).
> 
> Indeed. Installing *-config files which don't get installed by the
> recipe is prone to cause subtle errors. I modified pkgconfig.bbclass in
> a similar way in commit c2c8fe4c5629add94bd0b922f5b3446624a9f4d8.

Yes, it can cause installation of .pc that are not intended to be
installed. It also saves the grep -v -- '-uninstalled.pc$'.

> "find recipes -name "*-config" -type f" shows candidates which may cause
> breakage with this patch applied, in case they need to be installed but
> only get copied to the source directory.

Well, it is possible, especially for packages that don't use "make
install" in any form. But the correct solution for that problem would be
different: Install these -config files in do_install and let binconfig
to mangle and move them automatically. If one depends on the old form of
binconfig, -config files are missing in the target native -devel
packages. (Most users will not see any problems until they try to
compile on the target native system.)

> > Searching in the installed root seems to be more logical.
> > 
> > Most packages don't need to be ported to this change, as they install
> > config file with the same name as it exists in sources. But probably
> > several will need porting.
> 
> Why is this function needed at all? Isn't it possible to do the mangling
> before or after do_install like in pkgconfig.bbclass?

binconfig files are a bit special:
- They have to be in the cross environment PATH. The target sysroot is
not (and cannot) be in the cross environment PATH. They have to be
mangled and moved to another location.

- They have to be different in the target package and in the staging
package. I can imagine a different solution, but the current one works
well for most packages.

In case of .pc files, this logic above is embedded into pkg-config
itself, so one does not need additional magic.

-- 
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus




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

end of thread, other threads:[~2011-01-28 14:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-27 22:31 [RFC][PATCH] binconfig.bbclass: search configs in PKGD instead of S Stanislav Brabec
2011-01-28  1:19 ` Andreas Oberritter
2011-01-28 14:32   ` Stanislav Brabec
2011-01-28  5:03 ` Khem Raj

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.