Skip to contentSkip to conversation

RFC: break fetcher src rev deadlock

PATCH In review Yu Ke 4 participants 19 messages Dec 27, 2010 – Jan 6, 2011 Arm/actions semi architecture

lore
Share & tools
lore

Yu Ke

author
#0 lore raw

cover RFC: break fetcher src rev deadlock

Current fetcher has annoying "SRCREVINACTION" deadlock, which occurs when SRCREV=${AUTOREV}[email protected]_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 Richard's 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)
c) some recpies still use ${SRCREV} in PV, which is not corect logically, and will cause error in current implementation. so replace the SRCREV with SRCPV for those recpies

in test side, some basic tests are conducted:
- fetch the source of world packages from scratch (empty DL_DIR)
- bitbake poky-image-sato for qemux86 from sratch (empty DL_DIR)

more testing is ongoing, this RFC is just for early patch review and comments are warmly welcome.

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: kyu3/srcrev-cleanup
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kyu3/srcrev-cleanup

Thanks,
Yu Ke <[email protected]>
---

Yu Ke (8):
Fetch: fix support-srcrev typo
git.py: move git specific url data initialization earlier svn.py: move svn specific url data initialization earlier hg.py: move hg specific url data initialization earlier bzr.py: move bzr specific url data initialization earlier
recpies: use SRCPV instead of SRCREV for PV
Fetcher: break the "SRCREVINACTION" deadlock
Fetcher: only set __BB_DONT_CACHE when SRCREV = "${AUTOREV}"

 bitbake/lib/bb/fetch/__init__.py                   |   56 ++++++++------------
 bitbake/lib/bb/fetch/bzr.py                        |   22 ++++----
 bitbake/lib/bb/fetch/git.py                        |   25 +++++----
 bitbake/lib/bb/fetch/hg.py                         |   25 +++++----
 bitbake/lib/bb/fetch/repo.py                       |    2 +-
 bitbake/lib/bb/fetch/svn.py                        |   25 +++++----
 .../recipes-connectivity/opensync/libsync_svn.bb   |    2 +-
 .../matchbox-themes-extra_svn.bb                   |    2 +-
 meta/conf/bitbake.conf                             |    2 +-
 .../eee-acpi-scripts/eee-acpi-scripts_git.bb       |    2 +-
 meta/recipes-bsp/uboot/u-boot-omap3_git.bb         |    2 +-
 meta/recipes-bsp/x-load/x-load_git.bb              |    2 +-
 meta/recipes-bsp/zaurusd/zaurusd_svn.bb            |    2 +-
 meta/recipes-connectivity/gsm/gsmd.inc             |    2 +-
 meta/recipes-connectivity/gypsy/gypsy_svn.bb       |    2 +-
 meta/recipes-core/dbus-wait/dbus-wait_svn.bb       |    2 +-
 meta/recipes-core/psplash/psplash_svn.bb           |    2 +-
 meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb |    2 +-
 meta/recipes-devtools/opkg/opkg_svn.bb             |    2 +-
 meta/recipes-devtools/tcf-agent/tcf-agent_svn.bb   |    2 +-
 meta/recipes-devtools/ubootchart/ubootchart_svn.bb |    2 +-
 meta/recipes-gnome/gnome/gconf-dbus_svn.bb         |    2 +-
 .../gnome/gobject-introspection_git.bb             |    2 +-
 meta/recipes-gnome/gtkhtml2/gtkhtml2_svn.bb        |    2 +-
 meta/recipes-graphics/drm/libdrm_git.bb            |    2 +-
 meta/recipes-graphics/fstests/fstests_svn.bb       |    2 +-
 meta/recipes-graphics/libfakekey/libfakekey_svn.bb |    2 +-
 .../libmatchbox/libmatchbox_svn.bb                 |    2 +-
 .../matchbox-wm-2/matchbox-wm-2_svn.bb             |    2 +-
 .../matchbox-wm/matchbox-wm_svn.bb                 |    2 +-
 meta/recipes-graphics/xcb/libxcb_git.bb            |    2 +-
 meta/recipes-graphics/xcb/xcb-proto_git.bb         |    2 +-
 .../xvideo-tests/xvideo-tests_svn.bb               |    2 +-
 .../linux-firmware/linux-firmware_git.bb           |    2 +-
 meta/recipes-kernel/linux/linux-omap2_git.bb       |    2 +-
 meta/recipes-kernel/linux/linux-omap3-pm_git.bb    |    2 +-
 meta/recipes-kernel/linux/linux-omap3_git.bb       |    2 +-
 meta/recipes-kernel/oprofile/oprofileui-svn.inc    |    2 +-
 meta/recipes-sato/gaku/gaku_svn.bb                 |    2 +-
 .../gtk-engines/gtk-sato-engine_svn.bb             |    2 +-
 meta/recipes-sato/libowl/libowl_svn.bb             |    2 +-
 .../matchbox-config-gtk/matchbox-config-gtk_svn.bb |    2 +-
 .../matchbox-desktop-sato_svn.bb                   |    2 +-
 .../matchbox-desktop/matchbox-desktop_svn.bb       |    2 +-
 .../matchbox-keyboard/matchbox-keyboard_svn.bb     |    2 +-
 .../matchbox-panel-2/matchbox-panel-2_svn.bb       |    2 +-
 .../matchbox-stroke/matchbox-stroke_svn.bb         |    2 +-
 .../matchbox-terminal/matchbox-terminal_svn.bb     |    2 +-
 .../matchbox-theme-sato-2_svn.bb                   |    2 +-
 .../matchbox-theme-sato/matchbox-theme-sato_svn.bb |    2 +-
 .../recipes-sato/owl-video-widget/libowl-av_svn.bb |    2 +-
 .../recipes-sato/owl-video-widget/owl-video_svn.bb |    2 +-
 meta/recipes-sato/puzzles/oh-puzzles_svn.bb        |    2 +-
 meta/recipes-sato/screenshot/screenshot_svn.bb     |    2 +-
 .../settings-daemon/settings-daemon_svn.bb         |    2 +-
 meta/recipes-sato/web/web-webkit_svn.bb            |    2 +-
 meta/recipes-sato/web/web_svn.bb                   |    2 +-
 meta/recipes-sato/webkit/webkit-gtk_svn.bb         |    2 +-
 meta/recipes-support/libgdbus/libgdbus_git.bb      |    2 +-
 59 files changed, 131 insertions(+), 130 deletions(-)
author
#1 lore raw

PATCH 1/8 Fetch: fix support-srcrev typo

Fix the typo of suppports_srcrev -> supports_srcrev. no functional change, just make spell correct

---
 bitbake/lib/bb/fetch/__init__.py |    6 +++---
 bitbake/lib/bb/fetch/bzr.py      |    2 +-
 bitbake/lib/bb/fetch/git.py      |    2 +-
 bitbake/lib/bb/fetch/hg.py       |    2 +-
 bitbake/lib/bb/fetch/repo.py     |    2 +-
 bitbake/lib/bb/fetch/svn.py      |    2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)
bitbake/lib/bb/fetch/__init__.py +3 -3
index 364bdff..d4a5fa3 100644
@@ -388,11 +388,11 @@ def get_srcrev(d):
 
     scms = []
 
-    # Only call setup_localpath on URIs which suppports_srcrev()
+    # Only call setup_localpath on URIs which supports_srcrev()
     urldata = init(bb.data.getVar('SRC_URI', d, 1).split(), d, False)
     for u in urldata:
         ud = urldata[u]
-        if ud.method.suppports_srcrev():
+        if ud.method.supports_srcrev():
             if not ud.setup:
                 ud.setup_localpath(d)
             scms.append(u)
@@ -625,7 +625,7 @@ class Fetch(object):
         """
         return False
 
-    def suppports_srcrev(self):
+    def supports_srcrev(self):
         """
         The fetcher supports auto source revisions (SRCREV)
         """
bitbake/lib/bb/fetch/bzr.py +1 -1
index 813d7d8..2f73adf 100644
@@ -117,7 +117,7 @@ class Bzr(Fetch):
                 pass
             raise t, v, tb
 
-    def suppports_srcrev(self):
+    def supports_srcrev(self):
         return True
 
     def _revision_key(self, url, ud, d):
bitbake/lib/bb/fetch/git.py +1 -1
index 9bd447f..a8ec104 100644
@@ -191,7 +191,7 @@ class Git(Fetch):
         os.chdir(ud.clonedir)
         bb.utils.prunedir(codir)
 
-    def suppports_srcrev(self):
+    def supports_srcrev(self):
         return True
 
     def _contains_ref(self, tag, d):
bitbake/lib/bb/fetch/hg.py +1 -1
index efb3b5c..6dd75cb 100644
@@ -152,7 +152,7 @@ class Hg(Fetch):
                 pass
             raise t, v, tb
 
-    def suppports_srcrev(self):
+    def supports_srcrev(self):
         return True
 
     def _latest_revision(self, url, ud, d):
bitbake/lib/bb/fetch/repo.py +1 -1
index 883310b..e76fadf 100644
@@ -95,7 +95,7 @@ class Repo(Fetch):
         # Create a cache
         runfetchcmd("tar --exclude=.repo --exclude=.git -czf %s %s" % (ud.localpath, os.path.join(".", "*") ), d)
 
-    def suppports_srcrev(self):
+    def supports_srcrev(self):
         return False
 
     def _build_revision(self, url, ud, d):
bitbake/lib/bb/fetch/svn.py +1 -1
index 375e8df..42058f5 100644
@@ -166,7 +166,7 @@ class Svn(Fetch):
                 pass
             raise t, v, tb
 
-    def suppports_srcrev(self):
+    def supports_srcrev(self):
         return True
 
     def _revision_key(self, url, ud, d):
Signature · 1 line
1.7.0.4
#2 lore raw

Re: [PATCH 1/8] Fetch: fix support-srcrev typo

Quoted 4 lines · Yu Ke

Fix the typo of suppports_srcrev -> supports_srcrev. no functional change, just make spell correct

Bitbake upstream had a similar patch to this. Now we're much more in sync, this patch isn't required.

Cheers,

Richard

author
#3 lore raw

PATCH 2/8 git.py: move git specific url data initialization earlier

In reply to Yu Ke

move the url data init earlier, so that Git.latest_revision() can work before Git.localpath()

This change allow FetchData:__init__ to set FetchData.revison by Git.latest_revision()

---
 bitbake/lib/bb/fetch/git.py |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)
bitbake/lib/bb/fetch/git.py +14 -5
index a8ec104..df582a3 100644
@@ -38,10 +38,17 @@ class Git(Fetch):
         """
         Check to see if a given url can be fetched with git.
         """
-        return ud.type in ['git']
-
-    def localpath(self, url, ud, d):
+        if ud.type in ['git']:
+            self.urldata_init(ud, d)
+            return True
+        else:
+            return False
 
+    def urldata_init(self, ud, d):
+        """
+        init git specific variable within url data
+        so that the git method like latest_revision() can work
+        """
         if 'protocol' in ud.parm:
             ud.proto = ud.parm['protocol']
         elif not ud.host:
@@ -55,6 +62,10 @@ class Git(Fetch):
         ud.mirrortarball = 'git_%s.tar.gz' % (gitsrcname)
         ud.clonedir = os.path.join(data.expand('${GITDIR}', d), gitsrcname)
 
+        ud.basecmd = data.getVar("FETCHCMD_git", d, True) or "git"
+
+    def localpath(self, url, ud, d):
+
         tag = Fetch.srcrev_internal_helper(ud, d)
         if tag is True:
             ud.tag = self.latest_revision(url, ud, d)
@@ -77,8 +88,6 @@ class Git(Fetch):
         else:
             ud.localfile = data.expand('git_%s%s_%s.tar.gz' % (ud.host, subdirpath.replace('/', '.'), ud.tag), d)
 
-        ud.basecmd = data.getVar("FETCHCMD_git", d, True) or "git"
-
         if 'noclone' in ud.parm:
             ud.localfile = None
             return None
Signature · 1 line
1.7.0.4
#4 lore raw

Re: [PATCH 2/8] git.py: move git specific url data initialization earlier

Quoted 24 lines · Yu Ke

move the url data init earlier, so that Git.latest_revision() can work before Git.localpath()

This change allow FetchData:__init__ to set FetchData.revison by Git.latest_revision()

---
 bitbake/lib/bb/fetch/git.py |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)
bitbake/lib/bb/fetch/git.py +2 -3
index a8ec104..df582a3 100644
@@ -38,10 +38,17 @@ class Git(Fetch):
         """
         Check to see if a given url can be fetched with git.
         """
-        return ud.type in ['git']
-
-    def localpath(self, url, ud, d):
+        if ud.type in ['git']:
+            self.urldata_init(ud, d)

bitbake/lib/bb/fetch/git.py class Git(Fetch): · line 52

Quoted 10 lines
bitbake/lib/bb/fetch/git.py +8 -0
+            return True
+        else:
+            return False
 
+    def urldata_init(self, ud, d):
+        """
+        init git specific variable within url data
+        so that the git method like latest_revision() can work
+        """
         if 'protocol' in ud.parm:

I like the idea of having a urldata_init method but I don't like the way you're calling it from supports(). Each methods need to do one thing clearly and well.

Your patch does help clean things up and this is good but I'd just suggest you call urldata_init() from the fetcher __init__.py code alongside any supports() calls for now. This way, the supports() method remains 'clean'. You can make it so you only call the urldata_init() method if its present.

Ultimately, what needs to happen in the fetcher is to split the mechanics of fetching out from the actual urldata object. The code has been heading in that direction but python class usage isn't one of my better skills and I need to spend time I'm struggling to find working out what needs to happen there :(.

Cheers,

Richard

author
#5 lore raw

Re: [PATCH 2/8] git.py: move git specific url data initialization earlier

Quoted 40 lines · Richard Purdie
Quoted 24 lines · Yu Ke

move the url data init earlier, so that Git.latest_revision() can work before Git.localpath()

This change allow FetchData:__init__ to set FetchData.revison by Git.latest_revision()

---
 bitbake/lib/bb/fetch/git.py |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)
bitbake/lib/bb/fetch/git.py +2 -3
index a8ec104..df582a3 100644
@@ -38,10 +38,17 @@ class Git(Fetch):
         """
         Check to see if a given url can be fetched with git.
         """
-        return ud.type in ['git']
-
-    def localpath(self, url, ud, d):
+        if ud.type in ['git']:
+            self.urldata_init(ud, d)

bitbake/lib/bb/fetch/git.py class Git(Fetch): · line 52

Quoted 10 lines
bitbake/lib/bb/fetch/git.py +8 -0
+            return True
+        else:
+            return False
 
+    def urldata_init(self, ud, d):
+        """
+        init git specific variable within url data
+        so that the git method like latest_revision() can work
+        """
         if 'protocol' in ud.parm:

I like the idea of having a urldata_init method but I don't like the way you're calling it from supports(). Each methods need to do one thing clearly and well.

Quoted 5 lines

Your patch does help clean things up and this is good but I'd just suggest you call urldata_init() from the fetcher __init__.py code alongside any supports() calls for now. This way, the supports() method remains 'clean'. You can make it so you only call the urldata_init() method if its present.

Yes, calling from supports() is not good. I will revise it to calling seperately from FetchData:__init__()

Regards
Ke

Quoted 15 lines

Ultimately, what needs to happen in the fetcher is to split the mechanics of fetching out from the actual urldata object. The code has been heading in that direction but python class usage isn't one of my better skills and I need to spend time I'm struggling to find working out what needs to happen there :(.

Cheers,

Richard

_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky

author
#6 lore raw

PATCH 3/8 svn.py: move svn specific url data initialization earlier

In reply to Yu Ke

move the url data init earlier, so that Svn.latest_revision() can work before Svn.localpath()

This change allow FetchData:__init__ to set FetchData.revison by Svn.latest_revision()

---
 bitbake/lib/bb/fetch/svn.py |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
bitbake/lib/bb/fetch/svn.py +11 -2
index 42058f5..4e97a30 100644
@@ -38,9 +38,17 @@ class Svn(Fetch):
         """
         Check to see if a given url can be fetched with svn.
         """
-        return ud.type in ['svn']
+        if ud.type in ['svn']:
+            self.urldata_init(ud, d)
+            return True
+        else:
+            return False
 
-    def localpath(self, url, ud, d):
+    def urldata_init(self, ud, d):
+        """
+        init svn specific variable within url data
+        so that the method like latest_revision() can work
+        """
         if not "module" in ud.parm:
             raise MissingParameterError("svn method needs a 'module' parameter")
 
@@ -54,6 +62,7 @@ class Svn(Fetch):
         ud.pkgdir = os.path.join(data.expand('${SVNDIR}', d), ud.host, relpath)
         ud.moddir = os.path.join(ud.pkgdir, ud.module)
 
+    def localpath(self, url, ud, d):
         if 'rev' in ud.parm:
             ud.date = ""
             ud.revision = ud.parm['rev']
Signature · 1 line
1.7.0.4
author
#7 lore raw

PATCH 4/8 hg.py: move hg specific url data initialization earlier

In reply to Yu Ke

move the url data init earlier, so that Hg.latest_revision() can work before Hg.localpath()

This change allow FetchData:__init__ to set FetchData.revison by calling Hg.latest_revision()

---
 bitbake/lib/bb/fetch/hg.py |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
bitbake/lib/bb/fetch/hg.py +11 -2
index 6dd75cb..85d640d 100644
@@ -39,9 +39,17 @@ class Hg(Fetch):
         """
         Check to see if a given url can be fetched with mercurial.
         """
-        return ud.type in ['hg']
+        if ud.type in ['hg']:
+            self.urldata_init(ud, d)
+            return True
+        else:
+            return False
 
-    def localpath(self, url, ud, d):
+    def urldata_init(self, ud, d):
+        """
+        init hg specific variable within url data
+        so that the hg method like latest_revision() can work
+        """
         if not "module" in ud.parm:
             raise MissingParameterError("hg method needs a 'module' parameter")
 
@@ -55,6 +63,7 @@ class Hg(Fetch):
         ud.pkgdir = os.path.join(data.expand('${HGDIR}', d), ud.host, relpath)
         ud.moddir = os.path.join(ud.pkgdir, ud.module)
 
+    def localpath(self, url, ud, d):
         if 'rev' in ud.parm:
             ud.revision = ud.parm['rev']
         else:
Signature · 1 line
1.7.0.4
author
#8 lore raw

PATCH 5/8 bzr.py: move bzr specific url data initialization earlier

In reply to Yu Ke

move the url data init earlier, so that Bzr.latest_revision() can work before Bzr.localpath()

This change allow FetchData:__init__ to set FetchData.revison by Bzr.latest_revision()

---
 bitbake/lib/bb/fetch/bzr.py |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)
bitbake/lib/bb/fetch/bzr.py +11 -3
index 2f73adf..b29bbce 100644
@@ -33,10 +33,17 @@ from bb.fetch import runfetchcmd
 
 class Bzr(Fetch):
     def supports(self, url, ud, d):
-        return ud.type in ['bzr']
-
-    def localpath (self, url, ud, d):
+        if ud.type in ['bzr']:
+            self.urldata_init(ud, d)
+            return True
+        else:
+            return False
 
+    def urldata_init(self, ud, d):
+        """
+        init bzr specific variable within url data
+        so that the  method like latest_revision() can work
+        """
         # Create paths to bzr checkouts
         relpath = ud.path
         if relpath.startswith('/'):
@@ -44,6 +51,7 @@ class Bzr(Fetch):
             relpath = relpath[1:]
         ud.pkgdir = os.path.join(data.expand('${BZRDIR}', d), ud.host, relpath)
 
+    def localpath (self, url, ud, d):
         revision = Fetch.srcrev_internal_helper(ud, d)
         if revision is True:
             ud.revision = self.latest_revision(url, ud, d)
Signature · 1 line
1.7.0.4
author
#9 lore raw

PATCH 6/8 recpies: use SRCPV instead of SRCREV for PV

In reply to Yu Ke

SRCPV is intended being used by PV, some recipes still use SRCREV for PV, which is not correct. This patch fix all the misusage.

---
 .../recipes-connectivity/opensync/libsync_svn.bb   |    2 +-
 .../matchbox-themes-extra_svn.bb                   |    2 +-
 .../eee-acpi-scripts/eee-acpi-scripts_git.bb       |    2 +-
 meta/recipes-bsp/uboot/u-boot-omap3_git.bb         |    2 +-
 meta/recipes-bsp/x-load/x-load_git.bb              |    2 +-
 meta/recipes-bsp/zaurusd/zaurusd_svn.bb            |    2 +-
 meta/recipes-connectivity/gsm/gsmd.inc             |    2 +-
 meta/recipes-connectivity/gypsy/gypsy_svn.bb       |    2 +-
 meta/recipes-core/dbus-wait/dbus-wait_svn.bb       |    2 +-
 meta/recipes-core/psplash/psplash_svn.bb           |    2 +-
 meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb |    2 +-
 meta/recipes-devtools/opkg/opkg_svn.bb             |    2 +-
 meta/recipes-devtools/tcf-agent/tcf-agent_svn.bb   |    2 +-
 meta/recipes-devtools/ubootchart/ubootchart_svn.bb |    2 +-
 meta/recipes-gnome/gnome/gconf-dbus_svn.bb         |    2 +-
 .../gnome/gobject-introspection_git.bb             |    2 +-
 meta/recipes-gnome/gtkhtml2/gtkhtml2_svn.bb        |    2 +-
 meta/recipes-graphics/drm/libdrm_git.bb            |    2 +-
 meta/recipes-graphics/fstests/fstests_svn.bb       |    2 +-
 meta/recipes-graphics/libfakekey/libfakekey_svn.bb |    2 +-
 .../libmatchbox/libmatchbox_svn.bb                 |    2 +-
 .../matchbox-wm-2/matchbox-wm-2_svn.bb             |    2 +-
 .../matchbox-wm/matchbox-wm_svn.bb                 |    2 +-
 meta/recipes-graphics/xcb/libxcb_git.bb            |    2 +-
 meta/recipes-graphics/xcb/xcb-proto_git.bb         |    2 +-
 .../xvideo-tests/xvideo-tests_svn.bb               |    2 +-
 .../linux-firmware/linux-firmware_git.bb           |    2 +-
 meta/recipes-kernel/linux/linux-omap2_git.bb       |    2 +-
 meta/recipes-kernel/linux/linux-omap3-pm_git.bb    |    2 +-
 meta/recipes-kernel/linux/linux-omap3_git.bb       |    2 +-
 meta/recipes-kernel/oprofile/oprofileui-svn.inc    |    2 +-
 meta/recipes-sato/gaku/gaku_svn.bb                 |    2 +-
 .../gtk-engines/gtk-sato-engine_svn.bb             |    2 +-
 meta/recipes-sato/libowl/libowl_svn.bb             |    2 +-
 .../matchbox-config-gtk/matchbox-config-gtk_svn.bb |    2 +-
 .../matchbox-desktop-sato_svn.bb                   |    2 +-
 .../matchbox-desktop/matchbox-desktop_svn.bb       |    2 +-
 .../matchbox-keyboard/matchbox-keyboard_svn.bb     |    2 +-
 .../matchbox-panel-2/matchbox-panel-2_svn.bb       |    2 +-
 .../matchbox-stroke/matchbox-stroke_svn.bb         |    2 +-
 .../matchbox-terminal/matchbox-terminal_svn.bb     |    2 +-
 .../matchbox-theme-sato-2_svn.bb                   |    2 +-
 .../matchbox-theme-sato/matchbox-theme-sato_svn.bb |    2 +-
 .../recipes-sato/owl-video-widget/libowl-av_svn.bb |    2 +-
 .../recipes-sato/owl-video-widget/owl-video_svn.bb |    2 +-
 meta/recipes-sato/puzzles/oh-puzzles_svn.bb        |    2 +-
 meta/recipes-sato/screenshot/screenshot_svn.bb     |    2 +-
 .../settings-daemon/settings-daemon_svn.bb         |    2 +-
 meta/recipes-sato/web/web-webkit_svn.bb            |    2 +-
 meta/recipes-sato/web/web_svn.bb                   |    2 +-
 meta/recipes-sato/webkit/webkit-gtk_svn.bb         |    2 +-
 meta/recipes-support/libgdbus/libgdbus_git.bb      |    2 +-
 52 files changed, 52 insertions(+), 52 deletions(-)
meta-demoapps/recipes-connectivity/opensync/libsync_svn.bb +1 -1
index 74ca752..02961b9 100644
@@ -7,7 +7,7 @@ DEPENDS = "glib-2.0 gtk+ libglade libopensync avahi"
 RRECOMMENDS = "\
 	libopensync-plugin-file \
 	"
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 
 SRC_URI = "svn://svn.o-hand.com/repos/sync/trunk;module=sync;proto=http"
 
meta-demoapps/recipes-sato/matchbox-themes-extra/matchbox-themes-extra_svn.bb +1 -1
index 6a9f18b..e4e2f73 100644
@@ -2,7 +2,7 @@ DESCRIPTION = "Matchbox window manager extra themes"
 LICENSE = "GPL"
 DEPENDS = "matchbox-wm"
 SECTION = "x11/wm"
-PV = "0.3+svnr${SRCREV}"
+PV = "0.3+svnr${SRCPV}"
 
 SRC_URI = "svn://svn.o-hand.com/repos/matchbox/trunk;module=matchbox-themes-extra;proto=http"
 S = "${WORKDIR}/${PN}"
meta/recipes-bsp/eee-acpi-scripts/eee-acpi-scripts_git.bb +1 -1
index d186727..d1c2bef 100644
@@ -5,7 +5,7 @@ SECTION = "base"
 LICENSE="GPL"
 LIC_FILES_CHKSUM = "file://debian/copyright;md5=77ef83ab5f4af938a93edb61f7b74f2c"
 
-PV = "1.1.11+git${SRCREV}"
+PV = "1.1.11+git${SRCPV}"
 PR = "r3"
 
 RDEPENDS = "pm-utils"
meta/recipes-bsp/uboot/u-boot-omap3_git.bb +1 -1
index a083b16..c0a7738 100644
@@ -2,7 +2,7 @@ require u-boot.inc
 
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/u-boot-omap3-git/${MACHINE}"
 
-PV = "2008.10-rc2+${PR}+git${SRCREV}"
+PV = "2008.10-rc2+${PR}+git${SRCPV}"
 PR="r2"
 
 SRC_URI = "git://gitorious.org/u-boot-omap3/mainline.git;branch=master;protocol=git"
meta/recipes-bsp/x-load/x-load_git.bb +1 -1
index 49f867e..f124e2b 100644
@@ -2,7 +2,7 @@ require x-load.inc
 
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/x-load-git/${MACHINE}"
 
-PV = "1.42+${PR}+git${SRCREV}"
+PV = "1.42+${PR}+git${SRCPV}"
 PR="r12"
 
 SRC_URI = "git://www.sakoman.net/git/x-load-omap3.git;branch=master;protocol=git"
meta/recipes-bsp/zaurusd/zaurusd_svn.bb +1 -1
index 523f72d..1c74f7f 100644
@@ -4,7 +4,7 @@ LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 DEPENDS = "tslib"
 RDEPENDS = "xrandr"
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 
 SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=zaurusd;proto=http"
 
meta/recipes-connectivity/gsm/gsmd.inc +1 -1
index 9818188..20c366b 100644
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
 SECTION = "libs/gsm"
 PROVIDES += "gsmd"
 RPROVIDES_${PN} = "libgsmd0 libgsmd gsmd gsmd-devel"
-PV = "0.1+svnr${SRCREV}"
+PV = "0.1+svnr${SRCPV}"
 PR = "r0"
 
 SRC_URI = "svn://svn.openmoko.org/trunk/src/target;module=gsm;proto=http \
meta/recipes-connectivity/gypsy/gypsy_svn.bb +1 -1
index ac1b6bc..2e9840a 100644
@@ -2,7 +2,7 @@ require gypsy.inc
 
 DEFAULT_PREFERENCE = "-1"
 
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 S = "${WORKDIR}/${PN}"
 
 SRC_URI = "svn://svn.o-hand.com/repos/${PN}/trunk;module=${PN};proto=http \
meta/recipes-core/dbus-wait/dbus-wait_svn.bb +1 -1
index 10e1db8..9fa4c55 100644
@@ -4,7 +4,7 @@ SECTION = "base"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 DEPENDS = "dbus"
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 PR = "r2"
 
 SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=dbus-wait;proto=http"
meta/recipes-core/psplash/psplash_svn.bb +1 -1
index 1ca5cf6..8c7cc75 100644
@@ -5,7 +5,7 @@ SECTION = "base"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://psplash.h;md5=a87c39812c1e37f3451567cc29a29c8f"
 
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 PR = "r5"
 
 SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=psplash;proto=http \
meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb +1 -1
index 087d254..52ce234 100644
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
                     file://opkg.py;beginline=1;endline=18;md5=15917491ad6bf7acc666ca5f7cc1e083"
 RDEPENDS = "python"
 RDEPENDS_virtclass-native = ""
-PV = "0.1.8+svnr${SRCREV}"
+PV = "0.1.8+svnr${SRCPV}"
 PR = "r1"
 
 SRC_URI = "svn://svn.openmoko.org/trunk/src/host/;module=opkg-utils;proto=http \
meta/recipes-devtools/opkg/opkg_svn.bb +1 -1
index 7a9e90e..5096345 100644
@@ -16,7 +16,7 @@ SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \
 
 S = "${WORKDIR}/trunk"
 
-PV = "0.1.8+svnr${SRCREV}"
+PV = "0.1.8+svnr${SRCPV}"
 PR = "r1"
 
 PACKAGES =+ "libopkg-dev libopkg update-alternatives-cworth"
meta/recipes-devtools/tcf-agent/tcf-agent_svn.bb +1 -1
index b4c70ec..6f06a9c 100644
@@ -6,7 +6,7 @@ LICENSE = "EPLv1.0 | EDLv1.0"
 LIC_FILES_CHKSUM = "file://../epl-v10.html;md5=7aa4215a330a0a4f6a1cbf8da1a0879f \
                     file://../agent/edl-v10.html;md5=522a390a83dc186513f0500543ad3679"
 
-PV = "0.3.0+svnr${SRCREV}"
+PV = "0.3.0+svnr${SRCPV}"
 PR = "r0"
 
 SRC_URI = "svn://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/;module=tags/0.3.0/;proto=http \
meta/recipes-devtools/ubootchart/ubootchart_svn.bb +1 -1
index 6897f18..269b910 100644
@@ -2,7 +2,7 @@ DESCRIPTION = "A boot profiling tool"
 HOMEPAGE = "http://code.google.com/p/ubootchart/"
 LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=8f0e2cd40e05189ec81232da84bd6e1a"
-PV = "0.0+r${SRCREV}"
+PV = "0.0+r${SRCPV}"
 PR = "r4"
 
 #RRECOMMENDS = "acct"
meta/recipes-gnome/gnome/gconf-dbus_svn.bb +1 -1
index 879a0bb..9fdd82c 100644
@@ -8,7 +8,7 @@ PROVIDES = "gconf"
 RPROVIDES_${PN} = "gconf"
 RPROVIDES_${PN}-dev = "gconf-dev"
 
-PV = "2.16.0+svnr${SRCREV}"
+PV = "2.16.0+svnr${SRCPV}"
 
 SRC_URI = "svn://developer.imendio.com/svn/gconf-dbus;module=trunk;proto=http"
 S = "${WORKDIR}/trunk"
meta/recipes-gnome/gnome/gobject-introspection_git.bb +1 -1
index 81d279a..49c0ed8 100644
@@ -8,7 +8,7 @@ SRC_URI_virtclass-native = "git://git.gnome.org/gobject-introspection;protocol=g
 LICENSE = "GPLv2+ & LGPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING.tools;md5=94d55d512a9ba36caa9b7df079bae19f \
 		    file://COPYING.lib;md5=3bf50002aefd002f49e7bb854063f7e7"
-PV = "0.0+git${SRCREV}"
+PV = "0.0+git${SRCPV}"
 PR = "r3"
 
 S = "${WORKDIR}/git"
meta/recipes-gnome/gtkhtml2/gtkhtml2_svn.bb +1 -1
index a217775..ac921bf 100644
@@ -3,7 +3,7 @@ DEPENDS = "gtk+ glib-2.0 libxml2"
 DESCRIPTION = "A GTK+ HTML rendering library."
 LICENSE = "LGPLv2"
 LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=55ca817ccb7d5b5b66355690e9abc605"
-PV = "2.11.0+svnr${SRCREV}"
+PV = "2.11.0+svnr${SRCPV}"
 PR = "r1"
 
 SRC_URI = "svn://[email protected]/svn/gtkhtml2/;module=trunk \
meta/recipes-graphics/drm/libdrm_git.bb +1 -1
index d80dd5f..866da5d 100644
@@ -4,5 +4,5 @@ SRC_URI = "git://anongit.freedesktop.org/git/mesa/drm;protocol=git"
 
 S = ${WORKDIR}/git
 
-PV = "2.4.15+git${SRCREV}"
+PV = "2.4.15+git${SRCPV}"
 PR = "r0"
meta/recipes-graphics/fstests/fstests_svn.bb +1 -1
index 9d26e07..efa5c1f 100644
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.o-hand.com"
 SECTION = "devel"
 LICENSE = "ZLIB"
 DEPENDS = "pango libxext libxft virtual/libx11 gtk+"
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 PR = "r0"
 
 inherit autotools
meta/recipes-graphics/libfakekey/libfakekey_svn.bb +1 -1
index 719a680..2413666 100644
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://src/libfakekey.c;endline=30;md5=602b5ccd48f6440751086
 
 DEPENDS = "libxtst"
 SECTION = "x11/wm"
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 PR = "r1"
 
 SRC_URI = "svn://svn.o-hand.com/repos/matchbox/trunk;module=${PN};proto=http"
meta/recipes-graphics/libmatchbox/libmatchbox_svn.bb +1 -1
index 98c901f..6bc7112 100644
@@ -1,6 +1,6 @@
 require libmatchbox.inc
 
-PV = "1.7+svnr${SRCREV}"
+PV = "1.7+svnr${SRCPV}"
 PR = "r5"
 DEFAULT_PREFERENCE = "-1"
 
meta/recipes-graphics/matchbox-wm-2/matchbox-wm-2_svn.bb +1 -1
index 9c5cd93..2eb12e1 100644
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://matchbox/core/mb-wm.h;endline=21;md5=1b1d328a52790635
 
 DEPENDS = "virtual/libx11 libxext libxrender startup-notification expat gconf pango libxdamage libxcomposite gtk+"
 
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 PR = "r4"
 
 SRC_URI = "svn://svn.o-hand.com/repos/matchbox/trunk;module=matchbox-window-manager-2;proto=http \
meta/recipes-graphics/matchbox-wm/matchbox-wm_svn.bb +1 -1
index 09c0f70..d215171 100644
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://src/wm.h;endline=21;md5=a7e844465edbcf79c282369f93caa
 SECTION = "x11/wm"
 DEPENDS = "libmatchbox virtual/libx11 libxext libxrender startup-notification expat gconf"
 
-PV = "1.2+svnr${SRCREV}"
+PV = "1.2+svnr${SRCPV}"
 PR = "r4"
 
 SRC_URI = "svn://svn.o-hand.com/repos/matchbox/trunk;module=matchbox-window-manager;proto=http \
meta/recipes-graphics/xcb/libxcb_git.bb +1 -1
index b9ac073..faa5231 100644
@@ -1,7 +1,7 @@
 DEFAULT_PREFERENCE = "-1"
 
 include libxcb.inc
-PV = "1.1.90.1+gitr${SRCREV}"
+PV = "1.1.90.1+gitr${SRCPV}"
 
 DEPENDS += "libpthread-stubs xcb-proto-native"
 
meta/recipes-graphics/xcb/xcb-proto_git.bb +1 -1
index b96fc12..e4c238c 100644
@@ -1,7 +1,7 @@
 DEFAULT_PREFERENCE = "-1"
 
 include xcb-proto.inc
-PV = "1.2+gitr${SRCREV}"
+PV = "1.2+gitr${SRCPV}"
 PR = "r1"
 
 SRC_URI = "git://anongit.freedesktop.org/git/xcb/proto;protocol=git"
meta/recipes-graphics/xvideo-tests/xvideo-tests_svn.bb +1 -1
index 0aa861f..a5ac251 100644
@@ -3,7 +3,7 @@ LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
                     file://src/test-xvideo.c;beginline=1;endline=20;md5=6ae3b4c3c2ff9e51dbbc35bb237afa00"
 DEPENDS = "libxv"
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 PR = "r0"
 
 SRC_URI="svn://svn.o-hand.com/repos/misc/trunk;module=test-xvideo;proto=http"
meta/recipes-kernel/linux-firmware/linux-firmware_git.bb +1 -1
index a912c45..3d3c579 100644
@@ -18,7 +18,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.radeon_rlc;md5=4c243f7854d2884b483abda991adef
 
 PROVIDES += "linux-firmware-sd8686"
 
-PV = "0.0+git${SRCREV}"
+PV = "0.0+git${SRCPV}"
 
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/dwmw2/linux-firmware.git;protocol=git"
 
meta/recipes-kernel/linux/linux-omap2_git.bb +1 -1
index 39d08b7..c29396f 100644
@@ -3,7 +3,7 @@ require linux-omap2.inc
 FILESPATH = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/linux-omap2-git/${MACHINE}:${@os.path.dirname(bb.data.getVar('FILE',d,1))}/linux-omap2-git"
 
 PV = "2.6.26"
-#PV = "2.6.26+2.6.27-rc1+${PR}+git${SRCREV}"
+#PV = "2.6.26+2.6.27-rc1+${PR}+git${SRCPV}"
 PR = "r53"
 
 SRC_URI = "git://source.mvista.com/git/linux-omap-2.6.git;protocol=git \
meta/recipes-kernel/linux/linux-omap3-pm_git.bb +1 -1
index 4acf793..d65ca50 100644
@@ -6,7 +6,7 @@ inherit kernel
 
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/${PN}-git/${MACHINE}"
 
-PV = "2.6.31-rc7+pm+${PR}+git${SRCREV}"
+PV = "2.6.31-rc7+pm+${PR}+git${SRCPV}"
 PR = "r3"
 
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git;branch=pm;protocol=git"
meta/recipes-kernel/linux/linux-omap3_git.bb +1 -1
index f25c2c7..3d38ef2 100644
@@ -2,7 +2,7 @@ require linux-omap2.inc
 
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/linux-omap3-git/${MACHINE}"
 
-PV = "2.6.27-rc6+${PR}+git${SRCREV}"
+PV = "2.6.27-rc6+${PR}+git${SRCPV}"
 PR = "r30"
 
 SRC_URI = "git://source.mvista.com/git/linux-omap-2.6.git;branch=master;protocol=git \
meta/recipes-kernel/oprofile/oprofileui-svn.inc +1 -1
index 4c9211c..0e7e794 100644
@@ -1,6 +1,6 @@
 require oprofileui.inc
 
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 PR = "r0"
 
 S = "${WORKDIR}/trunk"
meta/recipes-sato/gaku/gaku_svn.bb +1 -1
index a70863e..15dcacf 100644
@@ -15,7 +15,7 @@ RRECOMMENDS = "gst-plugins-good-id3demux \
                gst-plugins-base-ogg \
                ${COMMERCIAL_AUDIO_PLUGINS}"
 
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 
 PR = "r3"
 
meta/recipes-sato/gtk-engines/gtk-sato-engine_svn.bb +1 -1
index a7ee6c6..3c7f1b5 100644
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
                     file://src/sato-utils.h;endline=24;md5=708f28cfe7fe028d497aaf4389b80b62 \
                     file://src/sato-main.c;endline=24;md5=b5e5dddebca570275becb51b526e4c5a"
 
-PV = "0.3.2+svnr${SRCREV}"
+PV = "0.3.2+svnr${SRCPV}"
 PR = "r0"
 
 SRC_URI = "svn://svn.o-hand.com/repos/sato/trunk;module=gtk-engine;proto=http"
meta/recipes-sato/libowl/libowl_svn.bb +1 -1
index 31a142c..74d0d77 100644
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
 
 SECTION = "libs"
 DEPENDS = "gtk+"
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 PR = "r6"
 
 SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=${PN};proto=http"
meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_svn.bb +1 -1
index af748f1..61209d9 100644
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
 DEPENDS = "gconf gtk+"
 RDEPENDS = "settings-daemon"
 
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 
 S = "${WORKDIR}/${PN}"
 
meta/recipes-sato/matchbox-desktop-sato/matchbox-desktop-sato_svn.bb +1 -1
index bdae33d..617fb6d 100644
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
 SECTION = "x11"
 DEPENDS = ""
 CONFLICTS = "matchbox-common"
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 PR = "r0"
 
 SRC_URI = "svn://svn.o-hand.com/repos/sato/trunk;module=desktop-folders;proto=http"
meta/recipes-sato/matchbox-desktop/matchbox-desktop_svn.bb +1 -1
index 324c81f..f5aadfd 100644
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
 
 DEPENDS = "gtk+ startup-notification dbus"
 SECTION = "x11/wm"
-PV = "2.0+svnr${SRCREV}"
+PV = "2.0+svnr${SRCPV}"
 PR = "r0"
 
 SRC_URI = "svn://svn.o-hand.com/repos/matchbox/trunk;module=${PN}-2;proto=http"
meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_svn.bb +1 -1
index 337738e..52a65a7 100644
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
 DEPENDS = "libfakekey expat libxft gtk+ matchbox-panel-2"
 RDEPENDS = "formfactor dbus-wait"
 SECTION = "x11"
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 PR = "r4"
 
 SRC_URI = "svn://svn.o-hand.com/repos/matchbox/trunk;module=${PN};proto=http \
meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_svn.bb +1 -1
index 8f5ccc8..d76fc09 100644
@@ -12,7 +12,7 @@ DEPENDS = "gtk+ startup-notification dbus dbus-glib"
 DEPENDS += " ${@base_contains("MACHINE_FEATURES", "acpi", "libacpi", "",d)}"
 DEPENDS += " ${@base_contains("MACHINE_FEATURES", "apm", "apmd", "",d)}"
 
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 PR = "r7"
 
 RPROVIDES_${PN} = "matchbox-panel"
meta/recipes-sato/matchbox-stroke/matchbox-stroke_svn.bb +1 -1
index b0e77ac..5021d88 100644
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://src/matchbox-stroke.h;endline=12;md5=8ed5c5bbec2321fb
 
 DEPENDS = "libfakekey expat libxft"
 SECTION = "x11/wm"
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 
 SRC_URI = "svn://svn.o-hand.com/repos/matchbox/trunk;module=${PN};proto=http \
            file://single-instance.patch;patch=1 \
meta/recipes-sato/matchbox-terminal/matchbox-terminal_svn.bb +1 -1
index 169223f..f06d80c 100644
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
 
 DEPENDS = "gtk+ vte"
 SECTION = "x11/utils"
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 PR = "r0"
 
 SRC_URI = "svn://svn.o-hand.com/repos/matchbox/trunk;module=${PN};proto=http"
meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato-2_svn.bb +1 -1
index 30b6329..4511353 100644
@@ -1,7 +1,7 @@
 require matchbox-theme-sato.inc
 
 DEPENDS = "matchbox-wm-2"
-PV = "0.1+svnr${SRCREV}"
+PV = "0.1+svnr${SRCPV}"
 
 SRC_URI = "svn://svn.o-hand.com/repos/sato/trunk;module=matchbox-sato;proto=http"
 S = "${WORKDIR}/matchbox-sato"
meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato_svn.bb +1 -1
index 7d49235..16ea825 100644
@@ -1,6 +1,6 @@
 require matchbox-theme-sato.inc
 
-PV = "0.1+svnr${SRCREV}"
+PV = "0.1+svnr${SRCPV}"
 PR = "r0"
 
 SRC_URI = "svn://svn.o-hand.com/repos/sato/trunk;module=matchbox-sato;proto=http"
meta/recipes-sato/owl-video-widget/libowl-av_svn.bb +1 -1
index 4eeeed6..bb45430 100644
@@ -12,7 +12,7 @@ DEPENDS = "gtk+ gstreamer gst-plugins-base"
 RDEPENDS = "gst-meta-base"
 RRECOMMENDS = "gst-meta-audio gst-meta-video"
 
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 PR = "r5"
 
 S = "${WORKDIR}/${PN}"
meta/recipes-sato/owl-video-widget/owl-video_svn.bb +1 -1
index bfa02b7..f83dbdc 100644
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ac14b7ca45afea5af040da54db270eb0 \
 SECTION = "x11"
 DEPENDS = "libowl-av"
 
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 PR = "r3"
 
 S = "${WORKDIR}/video"
meta/recipes-sato/puzzles/oh-puzzles_svn.bb +1 -1
index 5fcea24..3bee486 100644
@@ -11,7 +11,7 @@ SECTION = "x11"
 DEPENDS = "gtk+ gconf intltool-native librsvg"
 DEPENDS_append_poky = " libowl"
 
-PV = "0.1+svnr${SRCREV}"
+PV = "0.1+svnr${SRCPV}"
 PR = "r10"
 
 bindir = "/usr/games"
meta/recipes-sato/screenshot/screenshot_svn.bb +1 -1
index a95ba2d..35f3422 100644
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
 
 PRIORITY = "optional"
 DEPENDS = "matchbox-panel-2"
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 
 SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=${PN};proto=http"
 
meta/recipes-sato/settings-daemon/settings-daemon_svn.bb +1 -1
index 4d1d9ba..720ebfb 100644
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://xsettings-manager.h;endline=22;md5=7cfac9d2d4dc3694cc
                     file://xsettings-common.h;endline=22;md5=7cfac9d2d4dc3694cc7eb605cf32a69b"
 DEPENDS = "gconf glib-2.0 gtk+"
 SECTION = "x11"
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 
 PR = "r3"
 
meta/recipes-sato/web/web-webkit_svn.bb +1 -1
index 7dfce26..3df2bd8 100644
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
 SECTION = "x11"
 DEPENDS = "libxml2 glib-2.0 gtk+ libglade webkit-gtk curl gconf js libowl"
 
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 PR = "r3"
 
 SRC_URI = "svn://svn.o-hand.com/repos/web/branches;module=webkit;proto=http \
meta/recipes-sato/web/web_svn.bb +1 -1
index 79838ce..bdcdaba 100644
@@ -4,7 +4,7 @@ DEPENDS = "libxml2 glib-2.0 gtk+ libglade gtkhtml2 curl gconf js libowl"
 DESCRIPTION = "Web is a multi-platform web browsing application."
 PR = "r4"
 
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 
 SRC_URI = 	"svn://svn.o-hand.com/repos/${PN};module=trunk;proto=http \
 		file://owl-window-menu.patch \
meta/recipes-sato/webkit/webkit-gtk_svn.bb +1 -1
index fe31b9c..8d4eb35 100644
@@ -12,7 +12,7 @@ DEPENDS_darwin8 = "curl icu libxml2 cairo libxslt libidn gnutls gtk+ gstreamer f
 
 SRCREV_FORMAT = "webcore-rwebkit"
 
-PV = "1.3.2+svnr${SRCREV}"
+PV = "1.3.2+svnr${SRCPV}"
 PR = "r0"
 
 SRC_URI = "\
meta/recipes-support/libgdbus/libgdbus_git.bb +1 -1
index c465023..73fb1d6 100644
@@ -4,7 +4,7 @@ LICENSE  = "GPLv2&LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
 		    file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09"
 DEPENDS  = "glib-2.0 dbus"
-PV       = "0.0+git${SRCREV}"
+PV       = "0.0+git${SRCPV}"
 S        = "${WORKDIR}/git"
 
 SRC_URI  = "git://git.kernel.org/pub/scm/bluetooth/libgdbus.git;protocol=git"
Signature · 1 line
1.7.0.4
#10 lore raw

Re: [PATCH 6/8] recpies: use SRCPV instead of SRCREV for PV

Quoted 3 lines · Yu Ke

SRCPV is intended being used by PV, some recipes still use SRCREV for PV, which is not correct. This patch fix all the misusage.

Since this patch is independent of other things and large, I've merged it into master, thanks!

Cheers,

Richard

author
#11 lore raw

PATCH 7/8 Fetcher: break the "SRCREVINACTION" deadlock

In reply to Yu Ke

Current fetcher has annoying "SRCREVINACTION" deadlock, which occurs when SRCREV=${AUTOREV}[email protected]_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)

---
 bitbake/lib/bb/fetch/__init__.py |   43 ++++++++++++-------------------------
 bitbake/lib/bb/fetch/bzr.py      |    6 -----
 bitbake/lib/bb/fetch/git.py      |    8 +------
 bitbake/lib/bb/fetch/hg.py       |   10 +-------
 bitbake/lib/bb/fetch/svn.py      |   10 +-------
 meta/conf/bitbake.conf           |    2 +-
 6 files changed, 20 insertions(+), 59 deletions(-)
bitbake/lib/bb/fetch/__init__.py +14 -29
index d4a5fa3..c710931 100644
@@ -363,8 +363,6 @@ def localpaths(d):
 
     return local
 
-srcrev_internal_call = False
-
 def get_srcrev(d):
     """
     Return the version string for the current package
@@ -374,18 +372,6 @@ def get_srcrev(d):
     have been set.
     """
 
-    #
-    # Ugly code alert. localpath in the fetchers will try to evaluate SRCREV which
-    # could translate into a call to here. If it does, we need to catch this
-    # and provide some way so it knows get_srcrev is active instead of being
-    # some number etc. hence the srcrev_internal_call tracking and the magic
-    # "SRCREVINACTION" return value.
-    #
-    # Neater solutions welcome!
-    #
-    if bb.fetch.srcrev_internal_call:
-        return "SRCREVINACTION"
-
     scms = []
 
     # Only call setup_localpath on URIs which supports_srcrev()
@@ -548,11 +534,16 @@ class FetchData(object):
         self.md5_expected = bb.data.getVarFlag("SRC_URI", self.md5_name, d)
         self.sha256_expected = bb.data.getVarFlag("SRC_URI", self.sha256_name, d)
 
+        self.method = None
         for m in methods:
             if m.supports(url, self, d):
                 self.method = m
-                return
-        raise NoMethodError("Missing implementation for url %s" % url)
+                break
+        if not self.method:
+            raise NoMethodError("Missing implementation for url %s" % url)
+
+        if self.method.supports_srcrev():
+            self.revision = Fetch.srcrev_internal_helper(self, d);
 
     def setup_localpath(self, d):
         self.setup = True
@@ -575,11 +566,7 @@ class FetchData(object):
                             local = ""
                 self.localpath = local
             if not local:
-                try:
-                    bb.fetch.srcrev_internal_call = True
-                    self.localpath = self.method.localpath(self.url, self, d)
-                finally:
-                    bb.fetch.srcrev_internal_call = False
+                self.localpath = self.method.localpath(self.url, self, d)
                 # We have to clear data's internal caches since the cached value of SRCREV is now wrong.
                 # Horrible...
                 bb.data.delVar("ISHOULDNEVEREXIST", d)
@@ -678,17 +665,16 @@ class Fetch(object):
         """
         Return:
             a) a source revision if specified
-            b) True if auto srcrev is in action
-            c) False otherwise
+            b) latest revision if SREREV="AUTOINC"
+            c) "" if not specified
         """
-
         if 'rev' in ud.parm:
             return ud.parm['rev']
 
         if 'tag' in ud.parm:
             return ud.parm['tag']
 
-        rev = None
+        rev = ""
         if 'name' in ud.parm:
             pn = data.getVar("PN", d, 1)
             rev = data.getVar("SRCREV_%s_pn-%s" % (ud.parm['name'], pn), d, 1)
@@ -700,10 +686,9 @@ class Fetch(object):
             rev = data.getVar("SRCREV", d, 1)
         if rev == "INVALID":
             raise InvalidSRCREV("Please set SRCREV to a valid value")
-        if not rev:
-            return False
-        if rev is "SRCREVINACTION":
-            return True
+        if rev == "AUTOINC":
+            rev = ud.method.latest_revision(ud.url, ud, d)
+
         return rev
 
     srcrev_internal_helper = staticmethod(srcrev_internal_helper)
bitbake/lib/bb/fetch/bzr.py +0 -6
index b29bbce..1573116 100644
@@ -52,12 +52,6 @@ class Bzr(Fetch):
         ud.pkgdir = os.path.join(data.expand('${BZRDIR}', d), ud.host, relpath)
 
     def localpath (self, url, ud, d):
-        revision = Fetch.srcrev_internal_helper(ud, d)
-        if revision is True:
-            ud.revision = self.latest_revision(url, ud, d)
-        elif revision:
-            ud.revision = revision
-
         if not ud.revision:
             ud.revision = self.latest_revision(url, ud, d)
 
bitbake/lib/bb/fetch/git.py +1 -7
index df582a3..6779afb 100644
@@ -65,13 +65,7 @@ class Git(Fetch):
         ud.basecmd = data.getVar("FETCHCMD_git", d, True) or "git"
 
     def localpath(self, url, ud, d):
-
-        tag = Fetch.srcrev_internal_helper(ud, d)
-        if tag is True:
-            ud.tag = self.latest_revision(url, ud, d)
-        elif tag:
-            ud.tag = tag
-
+        ud.tag = ud.revision
         if not ud.tag or ud.tag == "master":
             ud.tag = self.latest_revision(url, ud, d)
 
bitbake/lib/bb/fetch/hg.py +2 -8
index 85d640d..b2c1b0b 100644
@@ -66,14 +66,8 @@ class Hg(Fetch):
     def localpath(self, url, ud, d):
         if 'rev' in ud.parm:
             ud.revision = ud.parm['rev']
-        else:
-            tag = Fetch.srcrev_internal_helper(ud, d)
-            if tag is True:
-                ud.revision = self.latest_revision(url, ud, d)
-            elif tag:
-                ud.revision = tag
-            else:
-                ud.revision = self.latest_revision(url, ud, d)
+        elif not ud.revision:
+            ud.revision = self.latest_revision(url, ud, d)
 
         ud.localfile = data.expand('%s_%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.path.replace('/', '.'), ud.revision), d)
 
bitbake/lib/bb/fetch/svn.py +2 -8
index 4e97a30..68b2b2c 100644
@@ -79,15 +79,9 @@ class Svn(Fetch):
             if "DATE" in pv:
                 ud.revision = ""
             else:
-                rev = Fetch.srcrev_internal_helper(ud, d)
-                if rev is True:
-                    ud.revision = self.latest_revision(url, ud, d)
+                # use the initizlied revision
+                if ud.revision:
                     ud.date = ""
-                elif rev:
-                    ud.revision = rev
-                    ud.date = ""
-                else:
-                    ud.revision = ""
 
         ud.localfile = data.expand('%s_%s_%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.path.replace('/', '.'), ud.revision, ud.date), d)
 
meta/conf/bitbake.conf +1 -1
index c26beea..d1b3fdc 100644
@@ -536,7 +536,7 @@ UPDATECOMMAND_cvs = "/usr/bin/env cvs -d${CVSROOT} update -d -P ${CVSCOOPTS}"
 UPDATECOMMAND_svn = "/usr/bin/env svn update ${SVNCOOPTS}"
 SRCDATE = "${DATE}"
 SRCREV = "INVALID"
-AUTOREV = "${SRCPV}"
+AUTOREV = "AUTOINC"
 SRCPV = "${@bb.fetch.get_srcrev(d)}"
 
 SRC_URI = "file://${FILE}"
Signature · 1 line
1.7.0.4
#12 lore raw

Re: [PATCH 7/8] Fetcher: break the "SRCREVINACTION" deadlock

Quoted 17 lines · Yu Ke

Current fetcher has annoying "SRCREVINACTION" deadlock, which occurs when SRCREV=${AUTOREV}[email protected]_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.

Quoted 6 lines

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.

Cheers,

Richard

Quoted 201 lines
---
 bitbake/lib/bb/fetch/__init__.py |   43 ++++++++++++-------------------------
 bitbake/lib/bb/fetch/bzr.py      |    6 -----
 bitbake/lib/bb/fetch/git.py      |    8 +------
 bitbake/lib/bb/fetch/hg.py       |   10 +-------
 bitbake/lib/bb/fetch/svn.py      |   10 +-------
 meta/conf/bitbake.conf           |    2 +-
 6 files changed, 20 insertions(+), 59 deletions(-)
bitbake/lib/bb/fetch/__init__.py +14 -29
index d4a5fa3..c710931 100644
@@ -363,8 +363,6 @@ def localpaths(d):
 
     return local
 
-srcrev_internal_call = False
-
 def get_srcrev(d):
     """
     Return the version string for the current package
@@ -374,18 +372,6 @@ def get_srcrev(d):
     have been set.
     """
 
-    #
-    # Ugly code alert. localpath in the fetchers will try to evaluate SRCREV which
-    # could translate into a call to here. If it does, we need to catch this
-    # and provide some way so it knows get_srcrev is active instead of being
-    # some number etc. hence the srcrev_internal_call tracking and the magic
-    # "SRCREVINACTION" return value.
-    #
-    # Neater solutions welcome!
-    #
-    if bb.fetch.srcrev_internal_call:
-        return "SRCREVINACTION"
-
     scms = []
 
     # Only call setup_localpath on URIs which supports_srcrev()
@@ -548,11 +534,16 @@ class FetchData(object):
         self.md5_expected = bb.data.getVarFlag("SRC_URI", self.md5_name, d)
         self.sha256_expected = bb.data.getVarFlag("SRC_URI", self.sha256_name, d)
 
+        self.method = None
         for m in methods:
             if m.supports(url, self, d):
                 self.method = m
-                return
-        raise NoMethodError("Missing implementation for url %s" % url)
+                break
+        if not self.method:
+            raise NoMethodError("Missing implementation for url %s" % url)
+
+        if self.method.supports_srcrev():
+            self.revision = Fetch.srcrev_internal_helper(self, d);
 
     def setup_localpath(self, d):
         self.setup = True
@@ -575,11 +566,7 @@ class FetchData(object):
                             local = ""
                 self.localpath = local
             if not local:
-                try:
-                    bb.fetch.srcrev_internal_call = True
-                    self.localpath = self.method.localpath(self.url, self, d)
-                finally:
-                    bb.fetch.srcrev_internal_call = False
+                self.localpath = self.method.localpath(self.url, self, d)
                 # We have to clear data's internal caches since the cached value of SRCREV is now wrong.
                 # Horrible...
                 bb.data.delVar("ISHOULDNEVEREXIST", d)
@@ -678,17 +665,16 @@ class Fetch(object):
         """
         Return:
             a) a source revision if specified
-            b) True if auto srcrev is in action
-            c) False otherwise
+            b) latest revision if SREREV="AUTOINC"
+            c) "" if not specified
         """
-
         if 'rev' in ud.parm:
             return ud.parm['rev']
 
         if 'tag' in ud.parm:
             return ud.parm['tag']
 
-        rev = None
+        rev = ""
         if 'name' in ud.parm:
             pn = data.getVar("PN", d, 1)
             rev = data.getVar("SRCREV_%s_pn-%s" % (ud.parm['name'], pn), d, 1)
@@ -700,10 +686,9 @@ class Fetch(object):
             rev = data.getVar("SRCREV", d, 1)
         if rev == "INVALID":
             raise InvalidSRCREV("Please set SRCREV to a valid value")
-        if not rev:
-            return False
-        if rev is "SRCREVINACTION":
-            return True
+        if rev == "AUTOINC":
+            rev = ud.method.latest_revision(ud.url, ud, d)
+
         return rev
 
     srcrev_internal_helper = staticmethod(srcrev_internal_helper)
bitbake/lib/bb/fetch/bzr.py +0 -6
index b29bbce..1573116 100644
@@ -52,12 +52,6 @@ class Bzr(Fetch):
         ud.pkgdir = os.path.join(data.expand('${BZRDIR}', d), ud.host, relpath)
 
     def localpath (self, url, ud, d):
-        revision = Fetch.srcrev_internal_helper(ud, d)
-        if revision is True:
-            ud.revision = self.latest_revision(url, ud, d)
-        elif revision:
-            ud.revision = revision
-
         if not ud.revision:
             ud.revision = self.latest_revision(url, ud, d)
 
bitbake/lib/bb/fetch/git.py +1 -7
index df582a3..6779afb 100644
@@ -65,13 +65,7 @@ class Git(Fetch):
         ud.basecmd = data.getVar("FETCHCMD_git", d, True) or "git"
 
     def localpath(self, url, ud, d):
-
-        tag = Fetch.srcrev_internal_helper(ud, d)
-        if tag is True:
-            ud.tag = self.latest_revision(url, ud, d)
-        elif tag:
-            ud.tag = tag
-
+        ud.tag = ud.revision
         if not ud.tag or ud.tag == "master":
             ud.tag = self.latest_revision(url, ud, d)
 
bitbake/lib/bb/fetch/hg.py +2 -8
index 85d640d..b2c1b0b 100644
@@ -66,14 +66,8 @@ class Hg(Fetch):
     def localpath(self, url, ud, d):
         if 'rev' in ud.parm:
             ud.revision = ud.parm['rev']
-        else:
-            tag = Fetch.srcrev_internal_helper(ud, d)
-            if tag is True:
-                ud.revision = self.latest_revision(url, ud, d)
-            elif tag:
-                ud.revision = tag
-            else:
-                ud.revision = self.latest_revision(url, ud, d)
+        elif not ud.revision:
+            ud.revision = self.latest_revision(url, ud, d)
 
         ud.localfile = data.expand('%s_%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.path.replace('/', '.'), ud.revision), d)
 
bitbake/lib/bb/fetch/svn.py +2 -8
index 4e97a30..68b2b2c 100644
@@ -79,15 +79,9 @@ class Svn(Fetch):
             if "DATE" in pv:
                 ud.revision = ""
             else:
-                rev = Fetch.srcrev_internal_helper(ud, d)
-                if rev is True:
-                    ud.revision = self.latest_revision(url, ud, d)
+                # use the initizlied revision
+                if ud.revision:
                     ud.date = ""
-                elif rev:
-                    ud.revision = rev
-                    ud.date = ""
-                else:
-                    ud.revision = ""
 
         ud.localfile = data.expand('%s_%s_%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.path.replace('/', '.'), ud.revision, ud.date), d)
 
meta/conf/bitbake.conf +1 -1
index c26beea..d1b3fdc 100644
@@ -536,7 +536,7 @@ UPDATECOMMAND_cvs = "/usr/bin/env cvs -d${CVSROOT} update -d -P ${CVSCOOPTS}"
 UPDATECOMMAND_svn = "/usr/bin/env svn update ${SVNCOOPTS}"
 SRCDATE = "${DATE}"
 SRCREV = "INVALID"
-AUTOREV = "${SRCPV}"
+AUTOREV = "AUTOINC"
 SRCPV = "${@bb.fetch.get_srcrev(d)}"
 
 SRC_URI = "file://${FILE}"
#13 lore raw

Re: [PATCH 7/8] Fetcher: break the "SRCREVINACTION" deadlock

Quoted 27 lines · Richard Purdie
Quoted 17 lines · Yu Ke

Current fetcher has annoying "SRCREVINACTION" deadlock, which occurs when SRCREV=${AUTOREV}[email protected]_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.

Quoted 6 lines

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.

Quoted 8 lines

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

author
#14 lore raw

Re: [PATCH 7/8] Fetcher: break the "SRCREVINACTION" deadlock

Quoted 34 lines · Richard Purdie
Quoted 33 lines · Richard Purdie
Quoted 17 lines · Yu Ke

Current fetcher has annoying "SRCREVINACTION" deadlock, which occurs when SRCREV=${AUTOREV}[email protected]_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.

Quoted 6 lines

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...

Quoted 5 lines
Quoted 2 lines

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.

Ok, I like the idea of having a seperate fetch2. This allow me not to worry about breaking the old fetch code.

Quoted 18 lines

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

Quoted 7 lines

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.

There are also some bbclase like base.bbclass, distrodata.bbclass, sstate.bbclass, patch.bbclass, utility-tasks.bbclass, utils.bbclass need to take care of. I will search and handle them case by case.

Regards
Ke

Quoted 9 lines

Cheers,

Richard

_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky

author
#15 lore raw

PATCH 8/8 Fetcher: only set __BB_DONT_CACHE when SRCREV = "${AUTOREV}"

In reply to Yu Ke

we should cache SRCREV whenever possible, the only exception is when SREREV is auto rev. so change the logic to only set __BB_DONT_CACHE at SRCREV = "${AUTOREV}" case

---
 bitbake/lib/bb/fetch/__init__.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
bitbake/lib/bb/fetch/__init__.py +6 -1
index c710931..1a08725 100644
@@ -374,6 +374,7 @@ def get_srcrev(d):
 
     scms = []
 
+    autorev = False
     # Only call setup_localpath on URIs which supports_srcrev()
     urldata = init(bb.data.getVar('SRC_URI', d, 1).split(), d, False)
     for u in urldata:
@@ -382,12 +383,14 @@ def get_srcrev(d):
             if not ud.setup:
                 ud.setup_localpath(d)
             scms.append(u)
+            if ud.autorev:
+                autorev = True
 
     if len(scms) == 0:
         bb.msg.error(bb.msg.domain.Fetcher, "SRCREV was used yet no valid SCM was found in SRC_URI")
         raise ParameterError
 
-    if bb.data.getVar('BB_SRCREV_POLICY', d, True) != "cache":
+    if bb.data.getVar('BB_SRCREV_POLICY', d, True) != "cache" and autorev:
         bb.data.setVar('__BB_DONT_CACHE', '1', d)
 
     if len(scms) == 1:
@@ -524,6 +527,7 @@ class FetchData(object):
         if not self.pswd and "pswd" in self.parm:
             self.pswd = self.parm["pswd"]
         self.setup = False
+        self.autorev = False
 
         if "name" in self.parm:
             self.md5_name = "%s.md5sum" % self.parm["name"]
@@ -688,6 +692,7 @@ class Fetch(object):
             raise InvalidSRCREV("Please set SRCREV to a valid value")
         if rev == "AUTOINC":
             rev = ud.method.latest_revision(ud.url, ud, d)
+            ud.autorev = True
 
         return rev
 
Signature · 1 line
1.7.0.4
author
#16 lore raw
In reply to Yu Ke
Quoted 27 lines · Yu Ke

Current fetcher has annoying "SRCREVINACTION" deadlock, which occurs when SRCREV=${AUTOREV}[email protected]_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 Richard's 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)
c) some recpies still use ${SRCREV} in PV, which is not corect logically, and will cause error in current implementation. so replace the SRCREV with SRCPV for those recpies

Quoted 6 lines

in test side, some basic tests are conducted:
- fetch the source of world packages from scratch (empty DL_DIR)
- bitbake poky-image-sato for qemux86 from sratch (empty DL_DIR)

more testing is ongoing, this RFC is just for early patch review and comments are warmly welcome.

The following tests are done, all passed:

- fetch source for world with DISTRO = "poky-bleeding", all passed except two broken recpies whose SRC_URI are obsolate, two bugs 623,624 are filed for this.
- bitbake poky-image-sdk for qemux86 with empty DL_DIR
- bitbake poky-image-sdk for qemuppc with empty DL_DIR
- bitbake poky-image-sdk for qemumips with empty DL_DIR

BTW, Richard, could you take a look and provide comments on this? I'd like to revise them accordingly and prepare another submit for code check in.

Regards
Ke

Quoted 85 lines

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: kyu3/srcrev-cleanup
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kyu3/srcrev-cleanup

Thanks,
Yu Ke <[email protected]>
---

Yu Ke (8):
Fetch: fix support-srcrev typo
git.py: move git specific url data initialization earlier svn.py: move svn specific url data initialization earlier hg.py: move hg specific url data initialization earlier bzr.py: move bzr specific url data initialization earlier
recpies: use SRCPV instead of SRCREV for PV
Fetcher: break the "SRCREVINACTION" deadlock
Fetcher: only set __BB_DONT_CACHE when SRCREV = "${AUTOREV}"

 bitbake/lib/bb/fetch/__init__.py                   |   56 ++++++++------------
 bitbake/lib/bb/fetch/bzr.py                        |   22 ++++----
 bitbake/lib/bb/fetch/git.py                        |   25 +++++----
 bitbake/lib/bb/fetch/hg.py                         |   25 +++++----
 bitbake/lib/bb/fetch/repo.py                       |    2 +-
 bitbake/lib/bb/fetch/svn.py                        |   25 +++++----
 .../recipes-connectivity/opensync/libsync_svn.bb   |    2 +-
 .../matchbox-themes-extra_svn.bb                   |    2 +-
 meta/conf/bitbake.conf                             |    2 +-
 .../eee-acpi-scripts/eee-acpi-scripts_git.bb       |    2 +-
 meta/recipes-bsp/uboot/u-boot-omap3_git.bb         |    2 +-
 meta/recipes-bsp/x-load/x-load_git.bb              |    2 +-
 meta/recipes-bsp/zaurusd/zaurusd_svn.bb            |    2 +-
 meta/recipes-connectivity/gsm/gsmd.inc             |    2 +-
 meta/recipes-connectivity/gypsy/gypsy_svn.bb       |    2 +-
 meta/recipes-core/dbus-wait/dbus-wait_svn.bb       |    2 +-
 meta/recipes-core/psplash/psplash_svn.bb           |    2 +-
 meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb |    2 +-
 meta/recipes-devtools/opkg/opkg_svn.bb             |    2 +-
 meta/recipes-devtools/tcf-agent/tcf-agent_svn.bb   |    2 +-
 meta/recipes-devtools/ubootchart/ubootchart_svn.bb |    2 +-
 meta/recipes-gnome/gnome/gconf-dbus_svn.bb         |    2 +-
 .../gnome/gobject-introspection_git.bb             |    2 +-
 meta/recipes-gnome/gtkhtml2/gtkhtml2_svn.bb        |    2 +-
 meta/recipes-graphics/drm/libdrm_git.bb            |    2 +-
 meta/recipes-graphics/fstests/fstests_svn.bb       |    2 +-
 meta/recipes-graphics/libfakekey/libfakekey_svn.bb |    2 +-
 .../libmatchbox/libmatchbox_svn.bb                 |    2 +-
 .../matchbox-wm-2/matchbox-wm-2_svn.bb             |    2 +-
 .../matchbox-wm/matchbox-wm_svn.bb                 |    2 +-
 meta/recipes-graphics/xcb/libxcb_git.bb            |    2 +-
 meta/recipes-graphics/xcb/xcb-proto_git.bb         |    2 +-
 .../xvideo-tests/xvideo-tests_svn.bb               |    2 +-
 .../linux-firmware/linux-firmware_git.bb           |    2 +-
 meta/recipes-kernel/linux/linux-omap2_git.bb       |    2 +-
 meta/recipes-kernel/linux/linux-omap3-pm_git.bb    |    2 +-
 meta/recipes-kernel/linux/linux-omap3_git.bb       |    2 +-
 meta/recipes-kernel/oprofile/oprofileui-svn.inc    |    2 +-
 meta/recipes-sato/gaku/gaku_svn.bb                 |    2 +-
 .../gtk-engines/gtk-sato-engine_svn.bb             |    2 +-
 meta/recipes-sato/libowl/libowl_svn.bb             |    2 +-
 .../matchbox-config-gtk/matchbox-config-gtk_svn.bb |    2 +-
 .../matchbox-desktop-sato_svn.bb                   |    2 +-
 .../matchbox-desktop/matchbox-desktop_svn.bb       |    2 +-
 .../matchbox-keyboard/matchbox-keyboard_svn.bb     |    2 +-
 .../matchbox-panel-2/matchbox-panel-2_svn.bb       |    2 +-
 .../matchbox-stroke/matchbox-stroke_svn.bb         |    2 +-
 .../matchbox-terminal/matchbox-terminal_svn.bb     |    2 +-
 .../matchbox-theme-sato-2_svn.bb                   |    2 +-
 .../matchbox-theme-sato/matchbox-theme-sato_svn.bb |    2 +-
 .../recipes-sato/owl-video-widget/libowl-av_svn.bb |    2 +-
 .../recipes-sato/owl-video-widget/owl-video_svn.bb |    2 +-
 meta/recipes-sato/puzzles/oh-puzzles_svn.bb        |    2 +-
 meta/recipes-sato/screenshot/screenshot_svn.bb     |    2 +-
 .../settings-daemon/settings-daemon_svn.bb         |    2 +-
 meta/recipes-sato/web/web-webkit_svn.bb            |    2 +-
 meta/recipes-sato/web/web_svn.bb                   |    2 +-
 meta/recipes-sato/webkit/webkit-gtk_svn.bb         |    2 +-
 meta/recipes-support/libgdbus/libgdbus_git.bb      |    2 +-
 59 files changed, 131 insertions(+), 130 deletions(-)

_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky

#17 lore raw
Quoted 35 lines · Yu Ke
Quoted 27 lines · Yu Ke

Current fetcher has annoying "SRCREVINACTION" deadlock, which occurs when SRCREV=${AUTOREV}[email protected]_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 Richard's 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)
c) some recpies still use ${SRCREV} in PV, which is not corect logically, and will cause error in current implementation. so replace the SRCREV with SRCPV for those recpies

Quoted 6 lines

in test side, some basic tests are conducted:
- fetch the source of world packages from scratch (empty DL_DIR)
- bitbake poky-image-sato for qemux86 from sratch (empty DL_DIR)

more testing is ongoing, this RFC is just for early patch review and comments are warmly welcome.

Quoted 8 lines

The following tests are done, all passed:

- fetch source for world with DISTRO = "poky-bleeding", all passed except two broken recpies whose SRC_URI are obsolate, two bugs 623,624 are filed for this.
- bitbake poky-image-sdk for qemux86 with empty DL_DIR
- bitbake poky-image-sdk for qemuppc with empty DL_DIR
- bitbake poky-image-sdk for qemumips with empty DL_DIR

Does this address the problem I reported recently with PREMIRRORS not
working when pointed to a local (file:///) repository? See the
discussion starting 2010-12-22 14:51 GMT with subject 'Write-protect $DL_DIR'

Quoted 95 lines

BTW, Richard, could you take a look and provide comments on this? I'd like to revise them accordingly and prepare another submit for code check in.

Regards
Ke

Quoted 81 lines

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: kyu3/srcrev-cleanup
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kyu3/srcrev-cleanup

Thanks,
Yu Ke<[email protected]>
---

Yu Ke (8):
Fetch: fix support-srcrev typo
git.py: move git specific url data initialization earlier svn.py: move svn specific url data initialization earlier hg.py: move hg specific url data initialization earlier bzr.py: move bzr specific url data initialization earlier
recpies: use SRCPV instead of SRCREV for PV
Fetcher: break the "SRCREVINACTION" deadlock
Fetcher: only set __BB_DONT_CACHE when SRCREV = "${AUTOREV}"

  bitbake/lib/bb/fetch/__init__.py                   |   56 ++++++++------------
  bitbake/lib/bb/fetch/bzr.py                        |   22 ++++----
  bitbake/lib/bb/fetch/git.py                        |   25 +++++----
  bitbake/lib/bb/fetch/hg.py                         |   25 +++++----
  bitbake/lib/bb/fetch/repo.py                       |    2 +-
  bitbake/lib/bb/fetch/svn.py                        |   25 +++++----
  .../recipes-connectivity/opensync/libsync_svn.bb   |    2 +-
  .../matchbox-themes-extra_svn.bb                   |    2 +-
  meta/conf/bitbake.conf                             |    2 +-
  .../eee-acpi-scripts/eee-acpi-scripts_git.bb       |    2 +-
  meta/recipes-bsp/uboot/u-boot-omap3_git.bb         |    2 +-
  meta/recipes-bsp/x-load/x-load_git.bb              |    2 +-
  meta/recipes-bsp/zaurusd/zaurusd_svn.bb            |    2 +-
  meta/recipes-connectivity/gsm/gsmd.inc             |    2 +-
  meta/recipes-connectivity/gypsy/gypsy_svn.bb       |    2 +-
  meta/recipes-core/dbus-wait/dbus-wait_svn.bb       |    2 +-
  meta/recipes-core/psplash/psplash_svn.bb           |    2 +-
  meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb |    2 +-
  meta/recipes-devtools/opkg/opkg_svn.bb             |    2 +-
  meta/recipes-devtools/tcf-agent/tcf-agent_svn.bb   |    2 +-
  meta/recipes-devtools/ubootchart/ubootchart_svn.bb |    2 +-
  meta/recipes-gnome/gnome/gconf-dbus_svn.bb         |    2 +-
  .../gnome/gobject-introspection_git.bb             |    2 +-
  meta/recipes-gnome/gtkhtml2/gtkhtml2_svn.bb        |    2 +-
  meta/recipes-graphics/drm/libdrm_git.bb            |    2 +-
  meta/recipes-graphics/fstests/fstests_svn.bb       |    2 +-
  meta/recipes-graphics/libfakekey/libfakekey_svn.bb |    2 +-
  .../libmatchbox/libmatchbox_svn.bb                 |    2 +-
  .../matchbox-wm-2/matchbox-wm-2_svn.bb             |    2 +-
  .../matchbox-wm/matchbox-wm_svn.bb                 |    2 +-
  meta/recipes-graphics/xcb/libxcb_git.bb            |    2 +-
  meta/recipes-graphics/xcb/xcb-proto_git.bb         |    2 +-
  .../xvideo-tests/xvideo-tests_svn.bb               |    2 +-
  .../linux-firmware/linux-firmware_git.bb           |    2 +-
  meta/recipes-kernel/linux/linux-omap2_git.bb       |    2 +-
  meta/recipes-kernel/linux/linux-omap3-pm_git.bb    |    2 +-
  meta/recipes-kernel/linux/linux-omap3_git.bb       |    2 +-
  meta/recipes-kernel/oprofile/oprofileui-svn.inc    |    2 +-
  meta/recipes-sato/gaku/gaku_svn.bb                 |    2 +-
  .../gtk-engines/gtk-sato-engine_svn.bb             |    2 +-
  meta/recipes-sato/libowl/libowl_svn.bb             |    2 +-
  .../matchbox-config-gtk/matchbox-config-gtk_svn.bb |    2 +-
  .../matchbox-desktop-sato_svn.bb                   |    2 +-
  .../matchbox-desktop/matchbox-desktop_svn.bb       |    2 +-
  .../matchbox-keyboard/matchbox-keyboard_svn.bb     |    2 +-
  .../matchbox-panel-2/matchbox-panel-2_svn.bb       |    2 +-
  .../matchbox-stroke/matchbox-stroke_svn.bb         |    2 +-
  .../matchbox-terminal/matchbox-terminal_svn.bb     |    2 +-
  .../matchbox-theme-sato-2_svn.bb                   |    2 +-
  .../matchbox-theme-sato/matchbox-theme-sato_svn.bb |    2 +-
  .../recipes-sato/owl-video-widget/libowl-av_svn.bb |    2 +-
  .../recipes-sato/owl-video-widget/owl-video_svn.bb |    2 +-
  meta/recipes-sato/puzzles/oh-puzzles_svn.bb        |    2 +-
  meta/recipes-sato/screenshot/screenshot_svn.bb     |    2 +-
  .../settings-daemon/settings-daemon_svn.bb         |    2 +-
  meta/recipes-sato/web/web-webkit_svn.bb            |    2 +-
  meta/recipes-sato/web/web_svn.bb                   |    2 +-
  meta/recipes-sato/webkit/webkit-gtk_svn.bb         |    2 +-
  meta/recipes-support/libgdbus/libgdbus_git.bb      |    2 +-
  59 files changed, 131 insertions(+), 130 deletions(-)
Quoted 4 lines

_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky

_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#18 lore raw

Op 5 jan 2011, om 03:33 heeft Gary Thomas het volgende geschreven:

Quoted 45 lines · Yu Ke
Quoted 35 lines · Yu Ke
Quoted 27 lines

Current fetcher has annoying "SRCREVINACTION" deadlock, which occurs when SRCREV=${AUTOREV}[email protected]_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 Richard's 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)
c) some recpies still use ${SRCREV} in PV, which is not corect logically, and will cause error in current implementation. so replace the SRCREV with SRCPV for those recpies

Quoted 6 lines

in test side, some basic tests are conducted:
- fetch the source of world packages from scratch (empty DL_DIR)
- bitbake poky-image-sato for qemux86 from sratch (empty DL_DIR)

more testing is ongoing, this RFC is just for early patch review and comments are warmly welcome.

Quoted 8 lines

The following tests are done, all passed:

- fetch source for world with DISTRO = "poky-bleeding", all passed except two broken recpies whose SRC_URI are obsolate, two bugs 623,624 are filed for this.
- bitbake poky-image-sdk for qemux86 with empty DL_DIR
- bitbake poky-image-sdk for qemuppc with empty DL_DIR
- bitbake poky-image-sdk for qemumips with empty DL_DIR

Quoted 3 lines

Does this address the problem I reported recently with PREMIRRORS not
working when pointed to a local (file:///) repository? See the
discussion starting 2010-12-22 14:51 GMT with subject 'Write-protect $DL_DIR'

From what I can see, PREMIRRORS don't work *at all*