Patchwork lib/oe: turn oe into a namespace package

login
register
mail settings
Submitter Christopher Larson
Date March 15, 2014, 2:06 a.m.
Message ID <1394849186-25396-1-git-send-email-kergoth@gmail.com>
Download mbox | patch
Permalink /patch/68677/
State New
Headers show

Comments

Christopher Larson - March 15, 2014, 2:06 a.m.
This will let folks extend the oe package with modules from other layers.
Given openembedded consists of more than just oe-core, I think this makes
sense, and adds some useful flexibility.

Signed-off-by: Christopher Larson <kergoth@gmail.com>
---
 meta/lib/oe/__init__.py | 2 ++
 1 file changed, 2 insertions(+)
Paul Eggleton - March 18, 2014, 1:48 p.m.
On Friday 14 March 2014 19:06:26 Christopher Larson wrote:
> This will let folks extend the oe package with modules from other layers.
> Given openembedded consists of more than just oe-core, I think this makes
> sense, and adds some useful flexibility.
> 
> Signed-off-by: Christopher Larson <kergoth@gmail.com>
> ---
>  meta/lib/oe/__init__.py | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/lib/oe/__init__.py b/meta/lib/oe/__init__.py
> index e69de29..3ad9513 100644
> --- a/meta/lib/oe/__init__.py
> +++ b/meta/lib/oe/__init__.py
> @@ -0,0 +1,2 @@
> +from pkgutil import extend_path
> +__path__ = extend_path(__path__, __name__)

FWIW, this broke builds on my CentOS build machine that uses a slightly older 
buildtools install from 1.4. I hope we have pkgutil in our more current 
buildtools - if not could you please send a fix for that as well?

Thanks,
Paul
Christopher Larson - March 18, 2014, 2:38 p.m.
On Tue, Mar 18, 2014 at 6:48 AM, Paul Eggleton <
paul.eggleton@linux.intel.com> wrote:

> On Friday 14 March 2014 19:06:26 Christopher Larson wrote:
> > This will let folks extend the oe package with modules from other layers.
> > Given openembedded consists of more than just oe-core, I think this makes
> > sense, and adds some useful flexibility.
> >
> > Signed-off-by: Christopher Larson <kergoth@gmail.com>
> > ---
> >  meta/lib/oe/__init__.py | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/meta/lib/oe/__init__.py b/meta/lib/oe/__init__.py
> > index e69de29..3ad9513 100644
> > --- a/meta/lib/oe/__init__.py
> > +++ b/meta/lib/oe/__init__.py
> > @@ -0,0 +1,2 @@
> > +from pkgutil import extend_path
> > +__path__ = extend_path(__path__, __name__)
>
> FWIW, this broke builds on my CentOS build machine that uses a slightly
> older
> buildtools install from 1.4. I hope we have pkgutil in our more current
> buildtools - if not could you please send a fix for that as well?


Ah, interesting, sorry about the hassle there. I'm 90% certain it's in the
current buildtools tarball, as I do all my build testing with a CentOS 6
chroot using a buildtools tarball, and didn't hit that problem, but I'll
double check.
Christopher Larson - March 18, 2014, 4:52 p.m.
On Tue, Mar 18, 2014 at 7:38 AM, Chris Larson <kergoth@gmail.com> wrote:

>
> On Tue, Mar 18, 2014 at 6:48 AM, Paul Eggleton <
> paul.eggleton@linux.intel.com> wrote:
>
>> On Friday 14 March 2014 19:06:26 Christopher Larson wrote:
>> > This will let folks extend the oe package with modules from other
>> layers.
>> > Given openembedded consists of more than just oe-core, I think this
>> makes
>> > sense, and adds some useful flexibility.
>> >
>> > Signed-off-by: Christopher Larson <kergoth@gmail.com>
>> > ---
>> >  meta/lib/oe/__init__.py | 2 ++
>> >  1 file changed, 2 insertions(+)
>> >
>> > diff --git a/meta/lib/oe/__init__.py b/meta/lib/oe/__init__.py
>> > index e69de29..3ad9513 100644
>> > --- a/meta/lib/oe/__init__.py
>> > +++ b/meta/lib/oe/__init__.py
>> > @@ -0,0 +1,2 @@
>> > +from pkgutil import extend_path
>> > +__path__ = extend_path(__path__, __name__)
>>
>> FWIW, this broke builds on my CentOS build machine that uses a slightly
>> older
>> buildtools install from 1.4. I hope we have pkgutil in our more current
>> buildtools - if not could you please send a fix for that as well?
>
>
> Ah, interesting, sorry about the hassle there. I'm 90% certain it's in the
> current buildtools tarball, as I do all my build testing with a CentOS 6
> chroot using a buildtools tarball, and didn't hit that problem, but I'll
> double check.
>

Looks like it was added in
https://github.com/openembedded/oe-core/commit/7d93288.
Paul Eggleton - March 18, 2014, 4:54 p.m.
On Tuesday 18 March 2014 09:52:23 Chris Larson wrote:
> On Tue, Mar 18, 2014 at 7:38 AM, Chris Larson <kergoth@gmail.com> wrote:
> > On Tue, Mar 18, 2014 at 6:48 AM, Paul Eggleton <
> > paul.eggleton@linux.intel.com> wrote:
> >> FWIW, this broke builds on my CentOS build machine that uses a slightly
> >> older
> >> buildtools install from 1.4. I hope we have pkgutil in our more current
> >> buildtools - if not could you please send a fix for that as well?
> > 
> > Ah, interesting, sorry about the hassle there. I'm 90% certain it's in the
> > current buildtools tarball, as I do all my build testing with a CentOS 6
> > chroot using a buildtools tarball, and didn't hit that problem, but I'll
> > double check.
> 
> Looks like it was added in
> https://github.com/openembedded/oe-core/commit/7d93288.

OK, thanks for checking; it looks like this commit is in dora as well. I'll 
update to a 1.5.x buildtools on my build server.

Cheers,
Paul

Patch

diff --git a/meta/lib/oe/__init__.py b/meta/lib/oe/__init__.py
index e69de29..3ad9513 100644
--- a/meta/lib/oe/__init__.py
+++ b/meta/lib/oe/__init__.py
@@ -0,0 +1,2 @@ 
+from pkgutil import extend_path
+__path__ = extend_path(__path__, __name__)