* debian.bbclass doesn't work in some setups Was: [oe-commits] Ross Burton : package.bbclass: add a stub implementation of package_name_hook
[not found] <20140710164012.3BE7C503BE@opal.openembedded.org>
@ 2014-07-22 16:26 ` Martin Jansa
2014-07-23 22:32 ` Burton, Ross
0 siblings, 1 reply; 2+ messages in thread
From: Martin Jansa @ 2014-07-22 16:26 UTC (permalink / raw)
To: openembedded-core, Ross Burton; +Cc: openembedded-commits
[-- Attachment #1: Type: text/plain, Size: 4879 bytes --]
On Thu, Jul 10, 2014 at 04:40:12PM +0000, git@git.openembedded.org wrote:
> Module: openembedded-core.git
> Branch: master
> Commit: f6eb8e4e44b66217e4ada9f830a058c5ba120932
> URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=f6eb8e4e44b66217e4ada9f830a058c5ba120932
>
> Author: Ross Burton <ross.burton@intel.com>
> Date: Tue Jul 1 16:56:53 2014 +0100
>
> package.bbclass: add a stub implementation of package_name_hook
>
> do_package() calls package_name_hook so that e.g. debian-style renaming through
> debian.bbclass can happen. If there is no class providing a package_name_hook
> then this causes "WARNING: Function package_name_hook doesn't exist" every time
> do_package() is executed.
>
> Silence this warning by providing an empty package_name_hook in package.bbclass.
>
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> Signed-off-by: Saul Wold <sgw@linux.intel.com>
We've discussed this on Friday, so just for reference and people who
weren't in #yocto channel
13:52 < JaMa> RP: it seems that debian.bbclass doesn't work with recent changes
13:53 < JaMa> RP: all packagenames lost .so version suffix
13:54 < JaMa> maybe package_name_hook exported from package.bbclass now somehow conflicts with the same function exported by debian.bbclass?
13:54 < JaMa> rburton: ^
13:56 < JaMa> tmp-eglibc/work/arm920tt-oe-linux-gnueabi/libgcc/4.9.0-r0/temp/run.package_name_hook.14013:
13:56 < JaMa> tmp-eglibc/work/arm920tt-oe-linux-gnueabi/libgcc/4.9.0-r0/temp/run.package_package_name_hook.14013:
13:56 < JaMa> both show just empty function
15:03 < rburton> JaMa: whaaaa
15:03 < rburton> i bloody tested that and it bloody worked :(
16:21 < JaMa> rburton: bitbake -e libgcc: http://bpaste.net/show/475166/
16:27 < rburton> JaMa: how interesting
16:28 < pev> Hm, when do you need to set IMAGE_BASENAME? Ive seen it done a couple of times but not sure why/when?
16:28 < rburton> JaMa: python package_name_hook () {
16:28 < rburton> bb.build.exec_func('debian_package_name_hook', d)
16:28 < rburton> }
16:28 < rburton> is what i hae
16:28 < rburton> inherit order?
16:29 < rburton> JaMa: how do you enable debian.bbclass?
16:29 < rburton> poky does INHERIT_DISTRO=debian blaa blaa
16:30 < JaMa> rburton: the same without your patch http://bpaste.net/show/475181/
16:31 < JaMa> env.libgcc:INHERIT=" buildhistory buildstats buildstats-summary blacklist debian shr-mirrors package_ipk debian devshell sstate license blacklist sanity"
16:31 < JaMa> env.libgcc2:INHERIT=" buildhistory buildstats buildstats-summary blacklist debian shr-mirrors package_ipk debian devshell sstate license blacklist sanity"
16:31 < JaMa> $ grep -A 1 "^python package_name_hook" env.libgcc*
16:31 < JaMa> env.libgcc:python package_name_hook () {
16:31 < JaMa> env.libgcc- bb.build.exec_func('package_package_name_hook', d)
16:31 < JaMa> --
16:31 < JaMa> env.libgcc2:python package_name_hook () {
16:31 < JaMa> env.libgcc2- bb.build.exec_func('debian_package_name_hook', d)
16:32 < JaMa> and enabled by:
16:32 < JaMa> # append /OE/build/shr-core/meta-smartphone/meta-shr-distro/conf/distro/shr.conf:70
16:32 < JaMa> # "debian"
16:35 < rburton> maybe this is a distro-inherit vs inherit thing
16:36 < rburton> try using DISTRO_INHERIT for that?
16:36 < rburton> INHERIT_DISTRO even
16:36 < rburton> oh, that's just a variable that gets passed to INHERIT
16:36 < rburton> hm
16:42 < rburton> JaMa: try moving debian after package_ipk
16:43 < rburton> (maybe we need an inherit package in debian)?
16:45 < JaMa> sorry, I've already started different build
16:46 < rburton> np
16:47 < rburton> easily tested outside of a build, i'll have a go in a bit
since then I'm building with this change reverted
> meta/classes/package.bbclass | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index 7358376..26a20d1 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -1119,6 +1119,18 @@ python package_fixsymlinks () {
> d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
> }
>
> +
> +python package_package_name_hook() {
> + """
> + A package_name_hook function can be used to rewrite the package names by
> + changing PKG. For an example, see debian.bbclass.
> + """
> + pass
> +}
> +
> +EXPORT_FUNCTIONS package_name_hook
> +
> +
> PKGDESTWORK = "${WORKDIR}/pkgdata"
>
> python emit_pkgdata() {
>
> --
> _______________________________________________
> Openembedded-commits mailing list
> Openembedded-commits@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-commits
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: debian.bbclass doesn't work in some setups Was: [oe-commits] Ross Burton : package.bbclass: add a stub implementation of package_name_hook
2014-07-22 16:26 ` debian.bbclass doesn't work in some setups Was: [oe-commits] Ross Burton : package.bbclass: add a stub implementation of package_name_hook Martin Jansa
@ 2014-07-23 22:32 ` Burton, Ross
0 siblings, 0 replies; 2+ messages in thread
From: Burton, Ross @ 2014-07-23 22:32 UTC (permalink / raw)
To: Martin Jansa; +Cc: openembedded-commits@lists.openembedded.org, OE-core
On 22 July 2014 17:26, Martin Jansa <martin.jansa@gmail.com> wrote:
> 16:42 < rburton> JaMa: try moving debian after package_ipk
> 16:43 < rburton> (maybe we need an inherit package in debian)?
>
> 16:45 < JaMa> sorry, I've already started different build
>
> 16:46 < rburton> np
> 16:47 < rburton> easily tested outside of a build, i'll have a go in a bit
>
> since then I'm building with this change reverted
Moving debian to before package_ipkg does indeed replicate the problem
with an otherwise pure oe-core. Adding "inherit package" to the top
of debian.bbclass appears to fix it - presumably because in your case
with the inherit order of debian and then package_ipk the second
definition of package_package_name_hook wins.
(export_functions isn't very nice, is it)
Patch incoming.
Ross
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-23 22:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20140710164012.3BE7C503BE@opal.openembedded.org>
2014-07-22 16:26 ` debian.bbclass doesn't work in some setups Was: [oe-commits] Ross Burton : package.bbclass: add a stub implementation of package_name_hook Martin Jansa
2014-07-23 22:32 ` Burton, Ross
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox