From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Christopher Larson <clarson@kergoth.com>
Cc: bitbake-devel <bitbake-devel@lists.openembedded.org>
Subject: Re: [PATCH] cache: Split Cache() into a NoCache() parent object
Date: Mon, 15 Aug 2016 21:28:14 +0100 [thread overview]
Message-ID: <1471292894.20391.105.camel@linuxfoundation.org> (raw)
In-Reply-To: <CABcZANkPs9Y=4Xq9jWRJf8=bhqYM8DE=uv3KjwNckqavUt8G0w@mail.gmail.com>
On Mon, 2016-08-15 at 10:20 -0700, Christopher Larson wrote:
>
> On Mon, Aug 15, 2016 at 10:02 AM, Richard Purdie <
> richard.purdie@linuxfoundation.org> wrote:
> > There are some cases we want to parse recipes without any cache
> > setup or involvement. Split out the standalone functions into
> > a NoCache variant which the Cache is based upon, setting the scene
> > for further cleanup and restructuring.
> >
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> >
> > diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
> > index 7118c83..8c1fe11 100644
> > --- a/bitbake/lib/bb/cache.py
> > +++ b/bitbake/lib/bb/cache.py
> > @@ -265,12 +265,68 @@ def realfn2virtual(realfn, cls):
> > return realfn
> > return "virtual:" + cls + ":" + realfn
> >
> > -class Cache(object):
> > +class NoCache(object):
> > +
> > + def __init__(self, databuilder):
> > + self.databuilder = databuilder
> > + self.data = databuilder.data
> >
> I like the idea, but do we really need to pass in databuilder and set
> data if this class makes no use of it? It's all class methods, after
> all.
If I remember correctly it is used by users of the class, e.g. in
bitbake-worker so this is setting things up for later changes.
data is set since we have a ton of code which knows about this
namespace and I didn't really want to go and patch it all right now.
Cheers,
Richard
prev parent reply other threads:[~2016-08-15 20:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-15 17:02 [PATCH] cache: Split Cache() into a NoCache() parent object Richard Purdie
2016-08-15 17:20 ` Christopher Larson
2016-08-15 20:28 ` Richard Purdie [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1471292894.20391.105.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=bitbake-devel@lists.openembedded.org \
--cc=clarson@kergoth.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.