diff options
author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2015-12-04 14:59:26 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-08 10:20:31 +0000 |
commit | 3745479596d50ced74053b612a2b320361b882cd (patch) | |
tree | 1e557e7416e5886567eafbdf20c9b036cff6a107 /bitbake | |
parent | dd282d475cb4fde4f4e6fd7afe437dc001584587 (diff) | |
download | poky-3745479596d50ced74053b612a2b320361b882cd.tar.gz |
bitbake: bitbake: rename REGEX, REGEX_URI, and GITTAGREGEX.
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.
(Bitbake rev: f0a9e783f9969573fd74edfa241ef14f18ac684e)
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>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/fetch2/wget.py | 4 | ||||
-rw-r--r-- | bitbake/lib/bb/tests/fetch.py | 10 |
3 files changed, 8 insertions, 8 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 9bd87ad25c..5ffab22056 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
@@ -379,7 +379,7 @@ class Git(FetchMethod): | |||
379 | """ | 379 | """ |
380 | pupver = ('', '') | 380 | pupver = ('', '') |
381 | 381 | ||
382 | tagregex = re.compile(d.getVar('GITTAGREGEX', True) or "(?P<pver>([0-9][\.|_]?)+)") | 382 | tagregex = re.compile(d.getVar('UPSTREAM_CHECK_GITTAGREGEX', True) or "(?P<pver>([0-9][\.|_]?)+)") |
383 | try: | 383 | try: |
384 | output = self._lsremote(ud, d, "refs/tags/*") | 384 | output = self._lsremote(ud, d, "refs/tags/*") |
385 | except bb.fetch2.FetchError or bb.fetch2.NetworkAccess: | 385 | except bb.fetch2.FetchError or bb.fetch2.NetworkAccess: |
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py index c185f5b5f4..c8c6d5ce83 100644 --- a/bitbake/lib/bb/fetch2/wget.py +++ b/bitbake/lib/bb/fetch2/wget.py | |||
@@ -481,7 +481,7 @@ class Wget(FetchMethod): | |||
481 | self.suffix_regex_comp = re.compile(psuffix_regex) | 481 | self.suffix_regex_comp = re.compile(psuffix_regex) |
482 | 482 | ||
483 | # compile regex, can be specific by package or generic regex | 483 | # compile regex, can be specific by package or generic regex |
484 | pn_regex = d.getVar('REGEX', True) | 484 | pn_regex = d.getVar('UPSTREAM_CHECK_REGEX', True) |
485 | if pn_regex: | 485 | if pn_regex: |
486 | package_custom_regex_comp = re.compile(pn_regex) | 486 | package_custom_regex_comp = re.compile(pn_regex) |
487 | else: | 487 | else: |
@@ -517,7 +517,7 @@ class Wget(FetchMethod): | |||
517 | bb.debug(3, "latest_versionstring, regex: %s" % (package_regex.pattern)) | 517 | bb.debug(3, "latest_versionstring, regex: %s" % (package_regex.pattern)) |
518 | 518 | ||
519 | uri = "" | 519 | uri = "" |
520 | regex_uri = d.getVar("REGEX_URI", True) | 520 | regex_uri = d.getVar("UPSTREAM_CHECK_URI", True) |
521 | if not regex_uri: | 521 | if not regex_uri: |
522 | path = ud.path.split(package)[0] | 522 | path = ud.path.split(package)[0] |
523 | 523 | ||
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index 94173c14a8..b175a43280 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py | |||
@@ -663,7 +663,7 @@ class FetchLatestVersionTest(FetcherTest): | |||
663 | # version pattern "yyyymmdd" | 663 | # version pattern "yyyymmdd" |
664 | ("mobile-broadband-provider-info", "git://git.gnome.org/mobile-broadband-provider-info", "4ed19e11c2975105b71b956440acdb25d46a347d", "") | 664 | ("mobile-broadband-provider-info", "git://git.gnome.org/mobile-broadband-provider-info", "4ed19e11c2975105b71b956440acdb25d46a347d", "") |
665 | : "20120614", | 665 | : "20120614", |
666 | # packages with a valid GITTAGREGEX | 666 | # packages with a valid UPSTREAM_CHECK_GITTAGREGEX |
667 | ("xf86-video-omap", "git://anongit.freedesktop.org/xorg/driver/xf86-video-omap", "ae0394e687f1a77e966cf72f895da91840dffb8f", "(?P<pver>(\d+\.(\d\.?)*))") | 667 | ("xf86-video-omap", "git://anongit.freedesktop.org/xorg/driver/xf86-video-omap", "ae0394e687f1a77e966cf72f895da91840dffb8f", "(?P<pver>(\d+\.(\d\.?)*))") |
668 | : "0.4.3", | 668 | : "0.4.3", |
669 | ("build-appliance-image", "git://git.yoctoproject.org/poky", "b37dd451a52622d5b570183a81583cc34c2ff555", "(?P<pver>(([0-9][\.|_]?)+[0-9]))") | 669 | ("build-appliance-image", "git://git.yoctoproject.org/poky", "b37dd451a52622d5b570183a81583cc34c2ff555", "(?P<pver>(([0-9][\.|_]?)+[0-9]))") |
@@ -692,7 +692,7 @@ class FetchLatestVersionTest(FetcherTest): | |||
692 | : "5.0", | 692 | : "5.0", |
693 | ("xserver-xorg", "http://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.15.1.tar.bz2", "", "") | 693 | ("xserver-xorg", "http://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.15.1.tar.bz2", "", "") |
694 | : "1.15.1", | 694 | : "1.15.1", |
695 | # packages with valid REGEX_URI and REGEX | 695 | # packages with valid UPSTREAM_CHECK_URI and UPSTREAM_CHECK_REGEX |
696 | ("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") | 696 | ("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") |
697 | : "2.0.0", | 697 | : "2.0.0", |
698 | ("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") | 698 | ("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): | |||
705 | for k, v in self.test_git_uris.items(): | 705 | for k, v in self.test_git_uris.items(): |
706 | self.d.setVar("PN", k[0]) | 706 | self.d.setVar("PN", k[0]) |
707 | self.d.setVar("SRCREV", k[2]) | 707 | self.d.setVar("SRCREV", k[2]) |
708 | self.d.setVar("GITTAGREGEX", k[3]) | 708 | self.d.setVar("UPSTREAM_CHECK_GITTAGREGEX", k[3]) |
709 | ud = bb.fetch2.FetchData(k[1], self.d) | 709 | ud = bb.fetch2.FetchData(k[1], self.d) |
710 | pupver= ud.method.latest_versionstring(ud, self.d) | 710 | pupver= ud.method.latest_versionstring(ud, self.d) |
711 | verstring = pupver[0] | 711 | verstring = pupver[0] |
@@ -715,8 +715,8 @@ class FetchLatestVersionTest(FetcherTest): | |||
715 | def test_wget_latest_versionstring(self): | 715 | def test_wget_latest_versionstring(self): |
716 | for k, v in self.test_wget_uris.items(): | 716 | for k, v in self.test_wget_uris.items(): |
717 | self.d.setVar("PN", k[0]) | 717 | self.d.setVar("PN", k[0]) |
718 | self.d.setVar("REGEX_URI", k[2]) | 718 | self.d.setVar("UPSTREAM_CHECK_URI", k[2]) |
719 | self.d.setVar("REGEX", k[3]) | 719 | self.d.setVar("UPSTREAM_CHECK_REGEX", k[3]) |
720 | ud = bb.fetch2.FetchData(k[1], self.d) | 720 | ud = bb.fetch2.FetchData(k[1], self.d) |
721 | pupver = ud.method.latest_versionstring(ud, self.d) | 721 | pupver = ud.method.latest_versionstring(ud, self.d) |
722 | verstring = pupver[0] | 722 | verstring = pupver[0] |