]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: rename REGEX, REGEX_URI, and GITTAGREGEX.
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>
Fri, 4 Dec 2015 14:59:26 +0000 (14:59 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 8 Dec 2015 10:20:24 +0000 (10:20 +0000)
Rename REGEX to UPSTREAM_CHECK_REGEX, REGEX_URI to UPSTREAM_CHECK_URI, and
GITTAGREGEX to UPSTREAM_CHECK_GITTAGREGEX to better reflect their purpose
and to reflect a common namespace.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/fetch2/git.py
lib/bb/fetch2/wget.py
lib/bb/tests/fetch.py

index 9bd87ad25cc38cc1ef7f6db06eca368694c440db..5ffab220569a51335d58cd88e2963e4ead085004 100644 (file)
@@ -379,7 +379,7 @@ class Git(FetchMethod):
         """
         pupver = ('', '')
 
-        tagregex = re.compile(d.getVar('GITTAGREGEX', True) or "(?P<pver>([0-9][\.|_]?)+)")
+        tagregex = re.compile(d.getVar('UPSTREAM_CHECK_GITTAGREGEX', True) or "(?P<pver>([0-9][\.|_]?)+)")
         try:
             output = self._lsremote(ud, d, "refs/tags/*")
         except bb.fetch2.FetchError or bb.fetch2.NetworkAccess:
index c185f5b5f49e625b27aa4f1323b8eaa77bed7279..c8c6d5ce834b9aa47b32bf513818e529f14aa26f 100644 (file)
@@ -481,7 +481,7 @@ class Wget(FetchMethod):
         self.suffix_regex_comp = re.compile(psuffix_regex)
 
         # compile regex, can be specific by package or generic regex
-        pn_regex = d.getVar('REGEX', True)
+        pn_regex = d.getVar('UPSTREAM_CHECK_REGEX', True)
         if pn_regex:
             package_custom_regex_comp = re.compile(pn_regex)
         else:
@@ -517,7 +517,7 @@ class Wget(FetchMethod):
         bb.debug(3, "latest_versionstring, regex: %s" % (package_regex.pattern))
 
         uri = ""
-        regex_uri = d.getVar("REGEX_URI", True)
+        regex_uri = d.getVar("UPSTREAM_CHECK_URI", True)
         if not regex_uri:
             path = ud.path.split(package)[0]
 
index 94173c14a861f48c6268182f2316ad4584f152a1..b175a43280e018d58427c600acdebcaeb488395a 100644 (file)
@@ -663,7 +663,7 @@ class FetchLatestVersionTest(FetcherTest):
         # version pattern "yyyymmdd"
         ("mobile-broadband-provider-info", "git://git.gnome.org/mobile-broadband-provider-info", "4ed19e11c2975105b71b956440acdb25d46a347d", "")
             : "20120614",
-        # packages with a valid GITTAGREGEX
+        # packages with a valid UPSTREAM_CHECK_GITTAGREGEX
         ("xf86-video-omap", "git://anongit.freedesktop.org/xorg/driver/xf86-video-omap", "ae0394e687f1a77e966cf72f895da91840dffb8f", "(?P<pver>(\d+\.(\d\.?)*))")
             : "0.4.3",
         ("build-appliance-image", "git://git.yoctoproject.org/poky", "b37dd451a52622d5b570183a81583cc34c2ff555", "(?P<pver>(([0-9][\.|_]?)+[0-9]))")
@@ -692,7 +692,7 @@ class FetchLatestVersionTest(FetcherTest):
             : "5.0",
         ("xserver-xorg", "http://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.15.1.tar.bz2", "", "")
             : "1.15.1",
-        # packages with valid REGEX_URI and REGEX
+        # packages with valid UPSTREAM_CHECK_URI and UPSTREAM_CHECK_REGEX
         ("cups", "http://www.cups.org/software/1.7.2/cups-1.7.2-source.tar.bz2", "http://www.cups.org/software.php", "(?P<name>cups\-)(?P<pver>((\d+[\.\-_]*)+))\-source\.tar\.gz")
             : "2.0.0",
         ("db", "http://download.oracle.com/berkeley-db/db-5.3.21.tar.gz", "http://www.oracle.com/technetwork/products/berkeleydb/downloads/index-082944.html", "http://download.oracle.com/otn/berkeley-db/(?P<name>db-)(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz")
@@ -705,7 +705,7 @@ class FetchLatestVersionTest(FetcherTest):
             for k, v in self.test_git_uris.items():
                 self.d.setVar("PN", k[0])
                 self.d.setVar("SRCREV", k[2])
-                self.d.setVar("GITTAGREGEX", k[3])
+                self.d.setVar("UPSTREAM_CHECK_GITTAGREGEX", k[3])
                 ud = bb.fetch2.FetchData(k[1], self.d)
                 pupver= ud.method.latest_versionstring(ud, self.d)
                 verstring = pupver[0]
@@ -715,8 +715,8 @@ class FetchLatestVersionTest(FetcherTest):
         def test_wget_latest_versionstring(self):
             for k, v in self.test_wget_uris.items():
                 self.d.setVar("PN", k[0])
-                self.d.setVar("REGEX_URI", k[2])
-                self.d.setVar("REGEX", k[3])
+                self.d.setVar("UPSTREAM_CHECK_URI", k[2])
+                self.d.setVar("UPSTREAM_CHECK_REGEX", k[3])
                 ud = bb.fetch2.FetchData(k[1], self.d)
                 pupver = ud.method.latest_versionstring(ud, self.d)
                 verstring = pupver[0]