All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] RFC: break fetcher src rev deadlock
@ 2010-12-27 13:57 Yu Ke
  2010-12-27 13:57 ` [PATCH 1/8] Fetch: fix support-srcrev typo Yu Ke
                   ` (8 more replies)
  0 siblings, 9 replies; 19+ messages in thread
From: Yu Ke @ 2010-12-27 13:57 UTC (permalink / raw)
  To: poky

    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 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 <ke.yu@intel.com>
---


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(-)



^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 1/8] Fetch: fix support-srcrev typo
  2010-12-27 13:57 [PATCH 0/8] RFC: break fetcher src rev deadlock Yu Ke
@ 2010-12-27 13:57 ` 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
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Yu Ke @ 2010-12-27 13:57 UTC (permalink / raw)
  To: poky

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

Signed-off-by: Yu Ke <ke.yu@intel.com>
---
 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(-)

diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py
index 364bdff..d4a5fa3 100644
--- a/bitbake/lib/bb/fetch/__init__.py
+++ b/bitbake/lib/bb/fetch/__init__.py
@@ -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)
         """
diff --git a/bitbake/lib/bb/fetch/bzr.py b/bitbake/lib/bb/fetch/bzr.py
index 813d7d8..2f73adf 100644
--- a/bitbake/lib/bb/fetch/bzr.py
+++ b/bitbake/lib/bb/fetch/bzr.py
@@ -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):
diff --git a/bitbake/lib/bb/fetch/git.py b/bitbake/lib/bb/fetch/git.py
index 9bd447f..a8ec104 100644
--- a/bitbake/lib/bb/fetch/git.py
+++ b/bitbake/lib/bb/fetch/git.py
@@ -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):
diff --git a/bitbake/lib/bb/fetch/hg.py b/bitbake/lib/bb/fetch/hg.py
index efb3b5c..6dd75cb 100644
--- a/bitbake/lib/bb/fetch/hg.py
+++ b/bitbake/lib/bb/fetch/hg.py
@@ -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):
diff --git a/bitbake/lib/bb/fetch/repo.py b/bitbake/lib/bb/fetch/repo.py
index 883310b..e76fadf 100644
--- a/bitbake/lib/bb/fetch/repo.py
+++ b/bitbake/lib/bb/fetch/repo.py
@@ -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):
diff --git a/bitbake/lib/bb/fetch/svn.py b/bitbake/lib/bb/fetch/svn.py
index 375e8df..42058f5 100644
--- a/bitbake/lib/bb/fetch/svn.py
+++ b/bitbake/lib/bb/fetch/svn.py
@@ -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):
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 2/8] git.py: move git specific url data initialization earlier
  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
@ 2010-12-27 13:57 ` Yu Ke
  2011-01-06 11:02   ` Richard Purdie
  2010-12-27 13:57 ` [PATCH 3/8] svn.py: move svn " Yu Ke
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Yu Ke @ 2010-12-27 13:57 UTC (permalink / raw)
  To: poky

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()

Signed-off-by: Yu Ke <ke.yu@intel.com>
---
 bitbake/lib/bb/fetch/git.py |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/bitbake/lib/bb/fetch/git.py b/bitbake/lib/bb/fetch/git.py
index a8ec104..df582a3 100644
--- a/bitbake/lib/bb/fetch/git.py
+++ b/bitbake/lib/bb/fetch/git.py
@@ -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
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 3/8] svn.py: move svn specific url data initialization earlier
  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
  2010-12-27 13:57 ` [PATCH 2/8] git.py: move git specific url data initialization earlier Yu Ke
@ 2010-12-27 13:57 ` Yu Ke
  2010-12-27 13:57 ` [PATCH 4/8] hg.py: move hg " Yu Ke
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 19+ messages in thread
From: Yu Ke @ 2010-12-27 13:57 UTC (permalink / raw)
  To: poky

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()

Signed-off-by: Yu Ke <ke.yu@intel.com>
---
 bitbake/lib/bb/fetch/svn.py |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/bitbake/lib/bb/fetch/svn.py b/bitbake/lib/bb/fetch/svn.py
index 42058f5..4e97a30 100644
--- a/bitbake/lib/bb/fetch/svn.py
+++ b/bitbake/lib/bb/fetch/svn.py
@@ -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']
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 4/8] hg.py: move hg specific url data initialization earlier
  2010-12-27 13:57 [PATCH 0/8] RFC: break fetcher src rev deadlock Yu Ke
                   ` (2 preceding siblings ...)
  2010-12-27 13:57 ` [PATCH 3/8] svn.py: move svn " Yu Ke
@ 2010-12-27 13:57 ` Yu Ke
  2010-12-27 13:57 ` [PATCH 5/8] bzr.py: move bzr " Yu Ke
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 19+ messages in thread
From: Yu Ke @ 2010-12-27 13:57 UTC (permalink / raw)
  To: poky

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()

Signed-off-by: Yu Ke <ke.yu@intel.com>
---
 bitbake/lib/bb/fetch/hg.py |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/bitbake/lib/bb/fetch/hg.py b/bitbake/lib/bb/fetch/hg.py
index 6dd75cb..85d640d 100644
--- a/bitbake/lib/bb/fetch/hg.py
+++ b/bitbake/lib/bb/fetch/hg.py
@@ -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:
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 5/8] bzr.py: move bzr specific url data initialization earlier
  2010-12-27 13:57 [PATCH 0/8] RFC: break fetcher src rev deadlock Yu Ke
                   ` (3 preceding siblings ...)
  2010-12-27 13:57 ` [PATCH 4/8] hg.py: move hg " Yu Ke
@ 2010-12-27 13:57 ` Yu Ke
  2010-12-27 13:58 ` [PATCH 6/8] recpies: use SRCPV instead of SRCREV for PV Yu Ke
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 19+ messages in thread
From: Yu Ke @ 2010-12-27 13:57 UTC (permalink / raw)
  To: poky

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()

Signed-off-by: Yu Ke <ke.yu@intel.com>
---
 bitbake/lib/bb/fetch/bzr.py |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/bitbake/lib/bb/fetch/bzr.py b/bitbake/lib/bb/fetch/bzr.py
index 2f73adf..b29bbce 100644
--- a/bitbake/lib/bb/fetch/bzr.py
+++ b/bitbake/lib/bb/fetch/bzr.py
@@ -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)
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 6/8] recpies: use SRCPV instead of SRCREV for PV
  2010-12-27 13:57 [PATCH 0/8] RFC: break fetcher src rev deadlock Yu Ke
                   ` (4 preceding siblings ...)
  2010-12-27 13:57 ` [PATCH 5/8] bzr.py: move bzr " Yu Ke
@ 2010-12-27 13:58 ` Yu Ke
  2011-01-06 10:38   ` Richard Purdie
  2010-12-27 13:58 ` [PATCH 7/8] Fetcher: break the "SRCREVINACTION" deadlock Yu Ke
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Yu Ke @ 2010-12-27 13:58 UTC (permalink / raw)
  To: poky

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

Signed-off-by: Yu Ke <ke.yu@intel.com>
---
 .../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(-)

diff --git a/meta-demoapps/recipes-connectivity/opensync/libsync_svn.bb b/meta-demoapps/recipes-connectivity/opensync/libsync_svn.bb
index 74ca752..02961b9 100644
--- a/meta-demoapps/recipes-connectivity/opensync/libsync_svn.bb
+++ b/meta-demoapps/recipes-connectivity/opensync/libsync_svn.bb
@@ -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"
 
diff --git a/meta-demoapps/recipes-sato/matchbox-themes-extra/matchbox-themes-extra_svn.bb b/meta-demoapps/recipes-sato/matchbox-themes-extra/matchbox-themes-extra_svn.bb
index 6a9f18b..e4e2f73 100644
--- a/meta-demoapps/recipes-sato/matchbox-themes-extra/matchbox-themes-extra_svn.bb
+++ b/meta-demoapps/recipes-sato/matchbox-themes-extra/matchbox-themes-extra_svn.bb
@@ -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}"
diff --git a/meta/recipes-bsp/eee-acpi-scripts/eee-acpi-scripts_git.bb b/meta/recipes-bsp/eee-acpi-scripts/eee-acpi-scripts_git.bb
index d186727..d1c2bef 100644
--- a/meta/recipes-bsp/eee-acpi-scripts/eee-acpi-scripts_git.bb
+++ b/meta/recipes-bsp/eee-acpi-scripts/eee-acpi-scripts_git.bb
@@ -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"
diff --git a/meta/recipes-bsp/uboot/u-boot-omap3_git.bb b/meta/recipes-bsp/uboot/u-boot-omap3_git.bb
index a083b16..c0a7738 100644
--- a/meta/recipes-bsp/uboot/u-boot-omap3_git.bb
+++ b/meta/recipes-bsp/uboot/u-boot-omap3_git.bb
@@ -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"
diff --git a/meta/recipes-bsp/x-load/x-load_git.bb b/meta/recipes-bsp/x-load/x-load_git.bb
index 49f867e..f124e2b 100644
--- a/meta/recipes-bsp/x-load/x-load_git.bb
+++ b/meta/recipes-bsp/x-load/x-load_git.bb
@@ -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"
diff --git a/meta/recipes-bsp/zaurusd/zaurusd_svn.bb b/meta/recipes-bsp/zaurusd/zaurusd_svn.bb
index 523f72d..1c74f7f 100644
--- a/meta/recipes-bsp/zaurusd/zaurusd_svn.bb
+++ b/meta/recipes-bsp/zaurusd/zaurusd_svn.bb
@@ -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"
 
diff --git a/meta/recipes-connectivity/gsm/gsmd.inc b/meta/recipes-connectivity/gsm/gsmd.inc
index 9818188..20c366b 100644
--- a/meta/recipes-connectivity/gsm/gsmd.inc
+++ b/meta/recipes-connectivity/gsm/gsmd.inc
@@ -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 \
diff --git a/meta/recipes-connectivity/gypsy/gypsy_svn.bb b/meta/recipes-connectivity/gypsy/gypsy_svn.bb
index ac1b6bc..2e9840a 100644
--- a/meta/recipes-connectivity/gypsy/gypsy_svn.bb
+++ b/meta/recipes-connectivity/gypsy/gypsy_svn.bb
@@ -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 \
diff --git a/meta/recipes-core/dbus-wait/dbus-wait_svn.bb b/meta/recipes-core/dbus-wait/dbus-wait_svn.bb
index 10e1db8..9fa4c55 100644
--- a/meta/recipes-core/dbus-wait/dbus-wait_svn.bb
+++ b/meta/recipes-core/dbus-wait/dbus-wait_svn.bb
@@ -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"
diff --git a/meta/recipes-core/psplash/psplash_svn.bb b/meta/recipes-core/psplash/psplash_svn.bb
index 1ca5cf6..8c7cc75 100644
--- a/meta/recipes-core/psplash/psplash_svn.bb
+++ b/meta/recipes-core/psplash/psplash_svn.bb
@@ -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 \
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb
index 087d254..52ce234 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_svn.bb
@@ -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 \
diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb
index 7a9e90e..5096345 100644
--- a/meta/recipes-devtools/opkg/opkg_svn.bb
+++ b/meta/recipes-devtools/opkg/opkg_svn.bb
@@ -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"
diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent_svn.bb b/meta/recipes-devtools/tcf-agent/tcf-agent_svn.bb
index b4c70ec..6f06a9c 100644
--- a/meta/recipes-devtools/tcf-agent/tcf-agent_svn.bb
+++ b/meta/recipes-devtools/tcf-agent/tcf-agent_svn.bb
@@ -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 \
diff --git a/meta/recipes-devtools/ubootchart/ubootchart_svn.bb b/meta/recipes-devtools/ubootchart/ubootchart_svn.bb
index 6897f18..269b910 100644
--- a/meta/recipes-devtools/ubootchart/ubootchart_svn.bb
+++ b/meta/recipes-devtools/ubootchart/ubootchart_svn.bb
@@ -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"
diff --git a/meta/recipes-gnome/gnome/gconf-dbus_svn.bb b/meta/recipes-gnome/gnome/gconf-dbus_svn.bb
index 879a0bb..9fdd82c 100644
--- a/meta/recipes-gnome/gnome/gconf-dbus_svn.bb
+++ b/meta/recipes-gnome/gnome/gconf-dbus_svn.bb
@@ -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"
diff --git a/meta/recipes-gnome/gnome/gobject-introspection_git.bb b/meta/recipes-gnome/gnome/gobject-introspection_git.bb
index 81d279a..49c0ed8 100644
--- a/meta/recipes-gnome/gnome/gobject-introspection_git.bb
+++ b/meta/recipes-gnome/gnome/gobject-introspection_git.bb
@@ -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"
diff --git a/meta/recipes-gnome/gtkhtml2/gtkhtml2_svn.bb b/meta/recipes-gnome/gtkhtml2/gtkhtml2_svn.bb
index a217775..ac921bf 100644
--- a/meta/recipes-gnome/gtkhtml2/gtkhtml2_svn.bb
+++ b/meta/recipes-gnome/gtkhtml2/gtkhtml2_svn.bb
@@ -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://anonymous@svn.gnome.org/svn/gtkhtml2/;module=trunk \
diff --git a/meta/recipes-graphics/drm/libdrm_git.bb b/meta/recipes-graphics/drm/libdrm_git.bb
index d80dd5f..866da5d 100644
--- a/meta/recipes-graphics/drm/libdrm_git.bb
+++ b/meta/recipes-graphics/drm/libdrm_git.bb
@@ -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"
diff --git a/meta/recipes-graphics/fstests/fstests_svn.bb b/meta/recipes-graphics/fstests/fstests_svn.bb
index 9d26e07..efa5c1f 100644
--- a/meta/recipes-graphics/fstests/fstests_svn.bb
+++ b/meta/recipes-graphics/fstests/fstests_svn.bb
@@ -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
diff --git a/meta/recipes-graphics/libfakekey/libfakekey_svn.bb b/meta/recipes-graphics/libfakekey/libfakekey_svn.bb
index 719a680..2413666 100644
--- a/meta/recipes-graphics/libfakekey/libfakekey_svn.bb
+++ b/meta/recipes-graphics/libfakekey/libfakekey_svn.bb
@@ -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"
diff --git a/meta/recipes-graphics/libmatchbox/libmatchbox_svn.bb b/meta/recipes-graphics/libmatchbox/libmatchbox_svn.bb
index 98c901f..6bc7112 100644
--- a/meta/recipes-graphics/libmatchbox/libmatchbox_svn.bb
+++ b/meta/recipes-graphics/libmatchbox/libmatchbox_svn.bb
@@ -1,6 +1,6 @@
 require libmatchbox.inc
 
-PV = "1.7+svnr${SRCREV}"
+PV = "1.7+svnr${SRCPV}"
 PR = "r5"
 DEFAULT_PREFERENCE = "-1"
 
diff --git a/meta/recipes-graphics/matchbox-wm-2/matchbox-wm-2_svn.bb b/meta/recipes-graphics/matchbox-wm-2/matchbox-wm-2_svn.bb
index 9c5cd93..2eb12e1 100644
--- a/meta/recipes-graphics/matchbox-wm-2/matchbox-wm-2_svn.bb
+++ b/meta/recipes-graphics/matchbox-wm-2/matchbox-wm-2_svn.bb
@@ -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 \
diff --git a/meta/recipes-graphics/matchbox-wm/matchbox-wm_svn.bb b/meta/recipes-graphics/matchbox-wm/matchbox-wm_svn.bb
index 09c0f70..d215171 100644
--- a/meta/recipes-graphics/matchbox-wm/matchbox-wm_svn.bb
+++ b/meta/recipes-graphics/matchbox-wm/matchbox-wm_svn.bb
@@ -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 \
diff --git a/meta/recipes-graphics/xcb/libxcb_git.bb b/meta/recipes-graphics/xcb/libxcb_git.bb
index b9ac073..faa5231 100644
--- a/meta/recipes-graphics/xcb/libxcb_git.bb
+++ b/meta/recipes-graphics/xcb/libxcb_git.bb
@@ -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"
 
diff --git a/meta/recipes-graphics/xcb/xcb-proto_git.bb b/meta/recipes-graphics/xcb/xcb-proto_git.bb
index b96fc12..e4c238c 100644
--- a/meta/recipes-graphics/xcb/xcb-proto_git.bb
+++ b/meta/recipes-graphics/xcb/xcb-proto_git.bb
@@ -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"
diff --git a/meta/recipes-graphics/xvideo-tests/xvideo-tests_svn.bb b/meta/recipes-graphics/xvideo-tests/xvideo-tests_svn.bb
index 0aa861f..a5ac251 100644
--- a/meta/recipes-graphics/xvideo-tests/xvideo-tests_svn.bb
+++ b/meta/recipes-graphics/xvideo-tests/xvideo-tests_svn.bb
@@ -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"
diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
index a912c45..3d3c579 100644
--- a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
+++ b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
@@ -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"
 
diff --git a/meta/recipes-kernel/linux/linux-omap2_git.bb b/meta/recipes-kernel/linux/linux-omap2_git.bb
index 39d08b7..c29396f 100644
--- a/meta/recipes-kernel/linux/linux-omap2_git.bb
+++ b/meta/recipes-kernel/linux/linux-omap2_git.bb
@@ -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 \
diff --git a/meta/recipes-kernel/linux/linux-omap3-pm_git.bb b/meta/recipes-kernel/linux/linux-omap3-pm_git.bb
index 4acf793..d65ca50 100644
--- a/meta/recipes-kernel/linux/linux-omap3-pm_git.bb
+++ b/meta/recipes-kernel/linux/linux-omap3-pm_git.bb
@@ -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"
diff --git a/meta/recipes-kernel/linux/linux-omap3_git.bb b/meta/recipes-kernel/linux/linux-omap3_git.bb
index f25c2c7..3d38ef2 100644
--- a/meta/recipes-kernel/linux/linux-omap3_git.bb
+++ b/meta/recipes-kernel/linux/linux-omap3_git.bb
@@ -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 \
diff --git a/meta/recipes-kernel/oprofile/oprofileui-svn.inc b/meta/recipes-kernel/oprofile/oprofileui-svn.inc
index 4c9211c..0e7e794 100644
--- a/meta/recipes-kernel/oprofile/oprofileui-svn.inc
+++ b/meta/recipes-kernel/oprofile/oprofileui-svn.inc
@@ -1,6 +1,6 @@
 require oprofileui.inc
 
-PV = "0.0+svnr${SRCREV}"
+PV = "0.0+svnr${SRCPV}"
 PR = "r0"
 
 S = "${WORKDIR}/trunk"
diff --git a/meta/recipes-sato/gaku/gaku_svn.bb b/meta/recipes-sato/gaku/gaku_svn.bb
index a70863e..15dcacf 100644
--- a/meta/recipes-sato/gaku/gaku_svn.bb
+++ b/meta/recipes-sato/gaku/gaku_svn.bb
@@ -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"
 
diff --git a/meta/recipes-sato/gtk-engines/gtk-sato-engine_svn.bb b/meta/recipes-sato/gtk-engines/gtk-sato-engine_svn.bb
index a7ee6c6..3c7f1b5 100644
--- a/meta/recipes-sato/gtk-engines/gtk-sato-engine_svn.bb
+++ b/meta/recipes-sato/gtk-engines/gtk-sato-engine_svn.bb
@@ -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"
diff --git a/meta/recipes-sato/libowl/libowl_svn.bb b/meta/recipes-sato/libowl/libowl_svn.bb
index 31a142c..74d0d77 100644
--- a/meta/recipes-sato/libowl/libowl_svn.bb
+++ b/meta/recipes-sato/libowl/libowl_svn.bb
@@ -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"
diff --git a/meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_svn.bb b/meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_svn.bb
index af748f1..61209d9 100644
--- a/meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_svn.bb
+++ b/meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_svn.bb
@@ -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}"
 
diff --git a/meta/recipes-sato/matchbox-desktop-sato/matchbox-desktop-sato_svn.bb b/meta/recipes-sato/matchbox-desktop-sato/matchbox-desktop-sato_svn.bb
index bdae33d..617fb6d 100644
--- a/meta/recipes-sato/matchbox-desktop-sato/matchbox-desktop-sato_svn.bb
+++ b/meta/recipes-sato/matchbox-desktop-sato/matchbox-desktop-sato_svn.bb
@@ -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"
diff --git a/meta/recipes-sato/matchbox-desktop/matchbox-desktop_svn.bb b/meta/recipes-sato/matchbox-desktop/matchbox-desktop_svn.bb
index 324c81f..f5aadfd 100644
--- a/meta/recipes-sato/matchbox-desktop/matchbox-desktop_svn.bb
+++ b/meta/recipes-sato/matchbox-desktop/matchbox-desktop_svn.bb
@@ -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"
diff --git a/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_svn.bb b/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_svn.bb
index 337738e..52a65a7 100644
--- a/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_svn.bb
+++ b/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_svn.bb
@@ -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 \
diff --git a/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_svn.bb b/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_svn.bb
index 8f5ccc8..d76fc09 100644
--- a/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_svn.bb
+++ b/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_svn.bb
@@ -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"
diff --git a/meta/recipes-sato/matchbox-stroke/matchbox-stroke_svn.bb b/meta/recipes-sato/matchbox-stroke/matchbox-stroke_svn.bb
index b0e77ac..5021d88 100644
--- a/meta/recipes-sato/matchbox-stroke/matchbox-stroke_svn.bb
+++ b/meta/recipes-sato/matchbox-stroke/matchbox-stroke_svn.bb
@@ -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 \
diff --git a/meta/recipes-sato/matchbox-terminal/matchbox-terminal_svn.bb b/meta/recipes-sato/matchbox-terminal/matchbox-terminal_svn.bb
index 169223f..f06d80c 100644
--- a/meta/recipes-sato/matchbox-terminal/matchbox-terminal_svn.bb
+++ b/meta/recipes-sato/matchbox-terminal/matchbox-terminal_svn.bb
@@ -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"
diff --git a/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato-2_svn.bb b/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato-2_svn.bb
index 30b6329..4511353 100644
--- a/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato-2_svn.bb
+++ b/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato-2_svn.bb
@@ -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"
diff --git a/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato_svn.bb b/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato_svn.bb
index 7d49235..16ea825 100644
--- a/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato_svn.bb
+++ b/meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato_svn.bb
@@ -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"
diff --git a/meta/recipes-sato/owl-video-widget/libowl-av_svn.bb b/meta/recipes-sato/owl-video-widget/libowl-av_svn.bb
index 4eeeed6..bb45430 100644
--- a/meta/recipes-sato/owl-video-widget/libowl-av_svn.bb
+++ b/meta/recipes-sato/owl-video-widget/libowl-av_svn.bb
@@ -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}"
diff --git a/meta/recipes-sato/owl-video-widget/owl-video_svn.bb b/meta/recipes-sato/owl-video-widget/owl-video_svn.bb
index bfa02b7..f83dbdc 100644
--- a/meta/recipes-sato/owl-video-widget/owl-video_svn.bb
+++ b/meta/recipes-sato/owl-video-widget/owl-video_svn.bb
@@ -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"
diff --git a/meta/recipes-sato/puzzles/oh-puzzles_svn.bb b/meta/recipes-sato/puzzles/oh-puzzles_svn.bb
index 5fcea24..3bee486 100644
--- a/meta/recipes-sato/puzzles/oh-puzzles_svn.bb
+++ b/meta/recipes-sato/puzzles/oh-puzzles_svn.bb
@@ -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"
diff --git a/meta/recipes-sato/screenshot/screenshot_svn.bb b/meta/recipes-sato/screenshot/screenshot_svn.bb
index a95ba2d..35f3422 100644
--- a/meta/recipes-sato/screenshot/screenshot_svn.bb
+++ b/meta/recipes-sato/screenshot/screenshot_svn.bb
@@ -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"
 
diff --git a/meta/recipes-sato/settings-daemon/settings-daemon_svn.bb b/meta/recipes-sato/settings-daemon/settings-daemon_svn.bb
index 4d1d9ba..720ebfb 100644
--- a/meta/recipes-sato/settings-daemon/settings-daemon_svn.bb
+++ b/meta/recipes-sato/settings-daemon/settings-daemon_svn.bb
@@ -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"
 
diff --git a/meta/recipes-sato/web/web-webkit_svn.bb b/meta/recipes-sato/web/web-webkit_svn.bb
index 7dfce26..3df2bd8 100644
--- a/meta/recipes-sato/web/web-webkit_svn.bb
+++ b/meta/recipes-sato/web/web-webkit_svn.bb
@@ -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 \
diff --git a/meta/recipes-sato/web/web_svn.bb b/meta/recipes-sato/web/web_svn.bb
index 79838ce..bdcdaba 100644
--- a/meta/recipes-sato/web/web_svn.bb
+++ b/meta/recipes-sato/web/web_svn.bb
@@ -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 \
diff --git a/meta/recipes-sato/webkit/webkit-gtk_svn.bb b/meta/recipes-sato/webkit/webkit-gtk_svn.bb
index fe31b9c..8d4eb35 100644
--- a/meta/recipes-sato/webkit/webkit-gtk_svn.bb
+++ b/meta/recipes-sato/webkit/webkit-gtk_svn.bb
@@ -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 = "\
diff --git a/meta/recipes-support/libgdbus/libgdbus_git.bb b/meta/recipes-support/libgdbus/libgdbus_git.bb
index c465023..73fb1d6 100644
--- a/meta/recipes-support/libgdbus/libgdbus_git.bb
+++ b/meta/recipes-support/libgdbus/libgdbus_git.bb
@@ -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"
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 7/8] Fetcher: break the "SRCREVINACTION" deadlock
  2010-12-27 13:57 [PATCH 0/8] RFC: break fetcher src rev deadlock Yu Ke
                   ` (5 preceding siblings ...)
  2010-12-27 13:58 ` [PATCH 6/8] recpies: use SRCPV instead of SRCREV for PV Yu Ke
@ 2010-12-27 13:58 ` Yu Ke
  2011-01-06 11:06   ` Richard Purdie
  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
  8 siblings, 1 reply; 19+ messages in thread
From: Yu Ke @ 2010-12-27 13:58 UTC (permalink / raw)
  To: poky

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)

Signed-off-by: Yu Ke <ke.yu@intel.com>
---
 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(-)

diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py
index d4a5fa3..c710931 100644
--- a/bitbake/lib/bb/fetch/__init__.py
+++ b/bitbake/lib/bb/fetch/__init__.py
@@ -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)
diff --git a/bitbake/lib/bb/fetch/bzr.py b/bitbake/lib/bb/fetch/bzr.py
index b29bbce..1573116 100644
--- a/bitbake/lib/bb/fetch/bzr.py
+++ b/bitbake/lib/bb/fetch/bzr.py
@@ -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)
 
diff --git a/bitbake/lib/bb/fetch/git.py b/bitbake/lib/bb/fetch/git.py
index df582a3..6779afb 100644
--- a/bitbake/lib/bb/fetch/git.py
+++ b/bitbake/lib/bb/fetch/git.py
@@ -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)
 
diff --git a/bitbake/lib/bb/fetch/hg.py b/bitbake/lib/bb/fetch/hg.py
index 85d640d..b2c1b0b 100644
--- a/bitbake/lib/bb/fetch/hg.py
+++ b/bitbake/lib/bb/fetch/hg.py
@@ -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)
 
diff --git a/bitbake/lib/bb/fetch/svn.py b/bitbake/lib/bb/fetch/svn.py
index 4e97a30..68b2b2c 100644
--- a/bitbake/lib/bb/fetch/svn.py
+++ b/bitbake/lib/bb/fetch/svn.py
@@ -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)
 
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index c26beea..d1b3fdc 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -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}"
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH 8/8] Fetcher: only set __BB_DONT_CACHE when SRCREV = "${AUTOREV}"
  2010-12-27 13:57 [PATCH 0/8] RFC: break fetcher src rev deadlock Yu Ke
                   ` (6 preceding siblings ...)
  2010-12-27 13:58 ` [PATCH 7/8] Fetcher: break the "SRCREVINACTION" deadlock Yu Ke
@ 2010-12-27 13:58 ` Yu Ke
  2011-01-05  2:30 ` [PATCH 0/8] RFC: break fetcher src rev deadlock Yu Ke
  8 siblings, 0 replies; 19+ messages in thread
From: Yu Ke @ 2010-12-27 13:58 UTC (permalink / raw)
  To: poky

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

Signed-off-by: Yu Ke <ke.yu@intel.com>
---
 bitbake/lib/bb/fetch/__init__.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py
index c710931..1a08725 100644
--- a/bitbake/lib/bb/fetch/__init__.py
+++ b/bitbake/lib/bb/fetch/__init__.py
@@ -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
 
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH 0/8] RFC: break fetcher src rev deadlock
  2010-12-27 13:57 [PATCH 0/8] RFC: break fetcher src rev deadlock Yu Ke
                   ` (7 preceding siblings ...)
  2010-12-27 13:58 ` [PATCH 8/8] Fetcher: only set __BB_DONT_CACHE when SRCREV = "${AUTOREV}" Yu Ke
@ 2011-01-05  2:30 ` Yu Ke
  2011-01-05  2:33   ` Gary Thomas
  8 siblings, 1 reply; 19+ messages in thread
From: Yu Ke @ 2011-01-05  2:30 UTC (permalink / raw)
  To: Yu Ke; +Cc: poky

On Dec 27, 21:57, 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 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.

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

> 
> 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 <ke.yu@intel.com>
> ---
> 
> 
> 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
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 0/8] RFC: break fetcher src rev deadlock
  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
  0 siblings, 1 reply; 19+ messages in thread
From: Gary Thomas @ 2011-01-05  2:33 UTC (permalink / raw)
  To: Yu Ke; +Cc: poky

On 01/04/2011 07:30 PM, Yu Ke wrote:
> On Dec 27, 21:57, 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 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.
>
> 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'

> 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
>
>>
>> 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<ke.yu@intel.com>
>> ---
>>
>>
>> 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
>> poky@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/poky
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 0/8] RFC: break fetcher src rev deadlock
  2011-01-05  2:33   ` Gary Thomas
@ 2011-01-05  8:03     ` Koen Kooi
  0 siblings, 0 replies; 19+ messages in thread
From: Koen Kooi @ 2011-01-05  8:03 UTC (permalink / raw)
  To: poky


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

> On 01/04/2011 07:30 PM, Yu Ke wrote:
>> On Dec 27, 21:57, 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 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.
>> 
>> 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'


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

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 6/8] recpies: use SRCPV instead of SRCREV for PV
  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
  0 siblings, 0 replies; 19+ messages in thread
From: Richard Purdie @ 2011-01-06 10:38 UTC (permalink / raw)
  To: Yu Ke; +Cc: poky

On Mon, 2010-12-27 at 21:58 +0800, Yu Ke wrote:
> 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





^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 1/8] Fetch: fix support-srcrev typo
  2010-12-27 13:57 ` [PATCH 1/8] Fetch: fix support-srcrev typo Yu Ke
@ 2011-01-06 10:39   ` Richard Purdie
  0 siblings, 0 replies; 19+ messages in thread
From: Richard Purdie @ 2011-01-06 10:39 UTC (permalink / raw)
  To: Yu Ke; +Cc: poky

On Mon, 2010-12-27 at 21:57 +0800, Yu Ke wrote:
> Fix the typo of suppports_srcrev -> supports_srcrev.
> no functional change, just make spell correct
> 
> Signed-off-by: Yu Ke <ke.yu@intel.com>

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

Cheers,

Richard




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 2/8] git.py: move git specific url data initialization earlier
  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
  0 siblings, 1 reply; 19+ messages in thread
From: Richard Purdie @ 2011-01-06 11:02 UTC (permalink / raw)
  To: Yu Ke; +Cc: poky

On Mon, 2010-12-27 at 21:57 +0800, Yu Ke wrote:
> 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()
> 
> Signed-off-by: Yu Ke <ke.yu@intel.com>
> ---
>  bitbake/lib/bb/fetch/git.py |   19 ++++++++++++++-----
>  1 files changed, 14 insertions(+), 5 deletions(-)
> 
> diff --git a/bitbake/lib/bb/fetch/git.py b/bitbake/lib/bb/fetch/git.py
> index a8ec104..df582a3 100644
> --- a/bitbake/lib/bb/fetch/git.py
> +++ b/bitbake/lib/bb/fetch/git.py
> @@ -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:

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



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 7/8] Fetcher: break the "SRCREVINACTION" deadlock
  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
  0 siblings, 1 reply; 19+ messages in thread
From: Richard Purdie @ 2011-01-06 11:06 UTC (permalink / raw)
  To: Yu Ke; +Cc: poky

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.

Cheers,

Richard


> Signed-off-by: Yu Ke <ke.yu@intel.com>
> ---
>  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(-)
> 
> diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py
> index d4a5fa3..c710931 100644
> --- a/bitbake/lib/bb/fetch/__init__.py
> +++ b/bitbake/lib/bb/fetch/__init__.py
> @@ -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)
> diff --git a/bitbake/lib/bb/fetch/bzr.py b/bitbake/lib/bb/fetch/bzr.py
> index b29bbce..1573116 100644
> --- a/bitbake/lib/bb/fetch/bzr.py
> +++ b/bitbake/lib/bb/fetch/bzr.py
> @@ -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)
>  
> diff --git a/bitbake/lib/bb/fetch/git.py b/bitbake/lib/bb/fetch/git.py
> index df582a3..6779afb 100644
> --- a/bitbake/lib/bb/fetch/git.py
> +++ b/bitbake/lib/bb/fetch/git.py
> @@ -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)
>  
> diff --git a/bitbake/lib/bb/fetch/hg.py b/bitbake/lib/bb/fetch/hg.py
> index 85d640d..b2c1b0b 100644
> --- a/bitbake/lib/bb/fetch/hg.py
> +++ b/bitbake/lib/bb/fetch/hg.py
> @@ -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)
>  
> diff --git a/bitbake/lib/bb/fetch/svn.py b/bitbake/lib/bb/fetch/svn.py
> index 4e97a30..68b2b2c 100644
> --- a/bitbake/lib/bb/fetch/svn.py
> +++ b/bitbake/lib/bb/fetch/svn.py
> @@ -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)
>  
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index c26beea..d1b3fdc 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -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}"




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 7/8] Fetcher: break the "SRCREVINACTION" deadlock
  2011-01-06 11:06   ` Richard Purdie
@ 2011-01-06 11:56     ` Richard Purdie
  2011-01-06 13:01       ` Yu Ke
  0 siblings, 1 reply; 19+ messages in thread
From: Richard Purdie @ 2011-01-06 11:56 UTC (permalink / raw)
  To: Yu Ke; +Cc: poky

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



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 2/8] git.py: move git specific url data initialization earlier
  2011-01-06 11:02   ` Richard Purdie
@ 2011-01-06 12:34     ` Yu Ke
  0 siblings, 0 replies; 19+ messages in thread
From: Yu Ke @ 2011-01-06 12:34 UTC (permalink / raw)
  To: Richard Purdie; +Cc: poky

On Jan 06, 11:02, Richard Purdie wrote:
> On Mon, 2010-12-27 at 21:57 +0800, Yu Ke wrote:
> > 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()
> > 
> > Signed-off-by: Yu Ke <ke.yu@intel.com>
> > ---
> >  bitbake/lib/bb/fetch/git.py |   19 ++++++++++++++-----
> >  1 files changed, 14 insertions(+), 5 deletions(-)
> > 
> > diff --git a/bitbake/lib/bb/fetch/git.py b/bitbake/lib/bb/fetch/git.py
> > index a8ec104..df582a3 100644
> > --- a/bitbake/lib/bb/fetch/git.py
> > +++ b/bitbake/lib/bb/fetch/git.py
> > @@ -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:
> 
> 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.

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

Regards
Ke

> 
> 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
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 7/8] Fetcher: break the "SRCREVINACTION" deadlock
  2011-01-06 11:56     ` Richard Purdie
@ 2011-01-06 13:01       ` Yu Ke
  0 siblings, 0 replies; 19+ messages in thread
From: Yu Ke @ 2011-01-06 13:01 UTC (permalink / raw)
  To: Richard Purdie; +Cc: poky

On Jan 06, 11:56, Richard Purdie wrote:
> 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.

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

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

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

> 
> Cheers,
> 
> Richard
> 
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2011-01-06 12:53 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.