diff options
-rw-r--r-- | meta/lib/oe/recipeutils.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py index 37efefb093..26bbf3e5c9 100644 --- a/meta/lib/oe/recipeutils.py +++ b/meta/lib/oe/recipeutils.py | |||
@@ -626,23 +626,17 @@ def replace_dir_vars(path, d): | |||
626 | path = path.replace(dirpath, '${%s}' % dirvars[dirpath]) | 626 | path = path.replace(dirpath, '${%s}' % dirvars[dirpath]) |
627 | return path | 627 | return path |
628 | 628 | ||
629 | def get_recipe_pv_without_srcpv(rd, uri_type): | 629 | def get_recipe_pv_without_srcpv(pv, uri_type): |
630 | """ | 630 | """ |
631 | Get PV without SRCPV common in SCM's for now only | 631 | Get PV without SRCPV common in SCM's for now only |
632 | support git. | 632 | support git. |
633 | 633 | ||
634 | Returns tuple with pv, prefix and suffix. | 634 | Returns tuple with pv, prefix and suffix. |
635 | """ | 635 | """ |
636 | pv = '' | ||
637 | pfx = '' | 636 | pfx = '' |
638 | sfx = '' | 637 | sfx = '' |
639 | 638 | ||
640 | if uri_type == 'git': | 639 | if uri_type == 'git': |
641 | rd_tmp = rd.createCopy() | ||
642 | |||
643 | rd_tmp.setVar('SRCPV', '') | ||
644 | pv = rd_tmp.getVar('PV', True) | ||
645 | |||
646 | git_regex = re.compile("(?P<pfx>(v|))(?P<ver>((\d+[\.\-_]*)+))(?P<sfx>(\+|)(git|)(r|)(AUTOINC|)(\+|))(?P<rev>.*)") | 640 | git_regex = re.compile("(?P<pfx>(v|))(?P<ver>((\d+[\.\-_]*)+))(?P<sfx>(\+|)(git|)(r|)(AUTOINC|)(\+|))(?P<rev>.*)") |
647 | m = git_regex.match(pv) | 641 | m = git_regex.match(pv) |
648 | 642 | ||
@@ -650,8 +644,6 @@ def get_recipe_pv_without_srcpv(rd, uri_type): | |||
650 | pv = m.group('ver') | 644 | pv = m.group('ver') |
651 | pfx = m.group('pfx') | 645 | pfx = m.group('pfx') |
652 | sfx = m.group('sfx') | 646 | sfx = m.group('sfx') |
653 | else: | ||
654 | pv = rd.getVar('PV', True) | ||
655 | 647 | ||
656 | return (pv, pfx, sfx) | 648 | return (pv, pfx, sfx) |
657 | 649 | ||
@@ -704,7 +696,7 @@ def get_recipe_upstream_version(rd): | |||
704 | pupver = ud.method.latest_versionstring(ud, rd) | 696 | pupver = ud.method.latest_versionstring(ud, rd) |
705 | 697 | ||
706 | if uri_type == 'git': | 698 | if uri_type == 'git': |
707 | (pv, pfx, sfx) = get_recipe_pv_without_srcpv(rd, uri_type) | 699 | (pv, pfx, sfx) = get_recipe_pv_without_srcpv(pv, uri_type) |
708 | 700 | ||
709 | latest_revision = ud.method.latest_revision(ud, rd, ud.names[0]) | 701 | latest_revision = ud.method.latest_revision(ud, rd, ud.names[0]) |
710 | 702 | ||