From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Yu Ke <ke.yu@intel.com>
Cc: poky@yoctoproject.org
Subject: Re: [PATCH 7/8] Fetcher: break the "SRCREVINACTION" deadlock
Date: Thu, 06 Jan 2011 11:56:09 +0000 [thread overview]
Message-ID: <1294314969.17519.24283.camel@rex> (raw)
In-Reply-To: <1294311995.17519.24194.camel@rex>
On Thu, 2011-01-06 at 11:06 +0000, Richard Purdie wrote:
> On Mon, 2010-12-27 at 21:58 +0800, Yu Ke wrote:
> > Current fetcher has annoying "SRCREVINACTION" deadlock,
> > which occurs when SRCREV=${AUTOREV}=@bb.fetch.get_srcrev():
> > get_srcrev()->setup_localpath()->srcrev_internal_helper()
> > ->evaluate SRCREV->get_srcrev()
> >
> > current fetcher resolve the deadlock by introducing a
> > "SRCREVINACTION" condition check. Althoguh it works, it is
> > indeed not clean.
> >
> > This patch use antoehr idea to break the deadlock: break
> > the dependency among SRCREV and get_srcrev(), i.e. assign
> > a specific keyword "AUTOINC" to AUTOREV. when Fetcher meet
> > this keyword, it will check and set the latest revision to
> > urldata.revision. get_srcrev later can use the urldata.revision
> > for value evaluation(SRCPV etc). In this case, SRCREV no longer
> > depends on get_srcrev, and there is not deadlock anymore.
> >
> > In implementation side, several things are done:
> > a) set the revision in FetchData:__init__, so that
> > urldata.revision is ready when get_srcrev() need it
> > b) init fetch method specific data in Fetch:supports, so that
> > Fetch.latest_revision() can be conducted when FetchData:
> > __init__ need it to achieve a)
>
> I do think we need to make this change.
>
> Since we're not doing this in a fetcher "version 2" currently there is
> the backwards compatibility question though. What does this code do if
> the bitbake.conf change isn't made? Can we detect the old situation and
> error at least? This change is going to need a little discussion on the
> bitbake-dev list...
>
> The answer may be that we need to start a fetch2 codebase to carry on
> with this kind of cleanup.
I've given this further thought and lets go with the original plan,
create a fetch2 and then go and really clean it up.
We therefore need to copy the fetch directory to fetch2, then start
applying patches against fetch2. We can update poky to use bb.fetch2
instead of bb.fetch. This should also give OE a way to transition too.
I made a quick grep over bitbake itself and there are some fetch
references we'll need to resolve to switch between the two fetch
modules:
lib/bb/cooker.py: bb.fetch.persistent_database_connection = {}
lib/bb/cooker.py: bb.fetch.persistent_database_connection = {}
The above two references no longer do anything as the
persistent_database code was removed in bitbake upstream and for now
poky has followed that although I would like to revisit it.
lib/bb/parse/parse_py/BBHandler.py:import bb.fetch, bb.build, bb.utils
I doubt BBHandler still needs this reference
lib/bb/cooker.py: bb.fetch.fetcher_init(self.configuration.data)
lib/bb/command.py: if bb.fetch.fetcher_compare_revisions(command.cooker.configuration.data):
These two are important and we'll need to have a way to switch between
the fetchers for these.
Cheers,
Richard
next prev parent reply other threads:[~2011-01-06 11:56 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-27 13:57 [PATCH 0/8] RFC: break fetcher src rev deadlock Yu Ke
2010-12-27 13:57 ` [PATCH 1/8] Fetch: fix support-srcrev typo Yu Ke
2011-01-06 10:39 ` Richard Purdie
2010-12-27 13:57 ` [PATCH 2/8] git.py: move git specific url data initialization earlier Yu Ke
2011-01-06 11:02 ` Richard Purdie
2011-01-06 12:34 ` Yu Ke
2010-12-27 13:57 ` [PATCH 3/8] svn.py: move svn " Yu Ke
2010-12-27 13:57 ` [PATCH 4/8] hg.py: move hg " Yu Ke
2010-12-27 13:57 ` [PATCH 5/8] bzr.py: move bzr " Yu Ke
2010-12-27 13:58 ` [PATCH 6/8] recpies: use SRCPV instead of SRCREV for PV Yu Ke
2011-01-06 10:38 ` Richard Purdie
2010-12-27 13:58 ` [PATCH 7/8] Fetcher: break the "SRCREVINACTION" deadlock Yu Ke
2011-01-06 11:06 ` Richard Purdie
2011-01-06 11:56 ` Richard Purdie [this message]
2011-01-06 13:01 ` Yu Ke
2010-12-27 13:58 ` [PATCH 8/8] Fetcher: only set __BB_DONT_CACHE when SRCREV = "${AUTOREV}" Yu Ke
2011-01-05 2:30 ` [PATCH 0/8] RFC: break fetcher src rev deadlock Yu Ke
2011-01-05 2:33 ` Gary Thomas
2011-01-05 8:03 ` Koen Kooi
-- strict thread matches above, loose matches on Subject: below --
2011-01-09 11:48 [PATCH 0/8] bb.fetch2: SRCREV logic enhancement V2 Yu Ke
2011-01-09 11:50 ` [PATCH 7/8] Fetcher: break the "SRCREVINACTION" deadlock Yu Ke
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=1294314969.17519.24283.camel@rex \
--to=richard.purdie@linuxfoundation.org \
--cc=ke.yu@intel.com \
--cc=poky@yoctoproject.org \
/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.