diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2/__init__.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index f4cff03225..8b6c3eed6c 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -867,12 +867,6 @@ def srcrev_internal_helper(ud, d, name): | |||
867 | c) None if not specified | 867 | c) None if not specified |
868 | """ | 868 | """ |
869 | 869 | ||
870 | if 'rev' in ud.parm: | ||
871 | return ud.parm['rev'] | ||
872 | |||
873 | if 'tag' in ud.parm: | ||
874 | return ud.parm['tag'] | ||
875 | |||
876 | srcrev = None | 870 | srcrev = None |
877 | pn = d.getVar("PN", True) | 871 | pn = d.getVar("PN", True) |
878 | attempts = [] | 872 | attempts = [] |
@@ -889,6 +883,20 @@ def srcrev_internal_helper(ud, d, name): | |||
889 | if srcrev and srcrev != "INVALID": | 883 | if srcrev and srcrev != "INVALID": |
890 | break | 884 | break |
891 | 885 | ||
886 | if 'rev' in ud.parm and 'tag' in ud.parm: | ||
887 | raise FetchError("Please specify a ;rev= parameter or a ;tag= parameter in the url %s but not both." % (ud.url)) | ||
888 | |||
889 | if 'rev' in ud.parm or 'tag' in ud.parm: | ||
890 | if 'rev' in ud.parm: | ||
891 | parmrev = ud.parm['rev'] | ||
892 | else: | ||
893 | parmrev = ud.parm['tag'] | ||
894 | if srcrev == "INVALID" or not srcrev: | ||
895 | return parmrev | ||
896 | if srcrev != parmrev: | ||
897 | raise FetchError("Conflicting revisions (%s from SRCREV and %s from the url) found, please spcify one valid value" % (srcrev, parmrev)) | ||
898 | return parmrev | ||
899 | |||
892 | rev = srcrev | 900 | rev = srcrev |
893 | if rev == "INVALID" or not rev: | 901 | if rev == "INVALID" or not rev: |
894 | var = "SRCREV_pn-%s" % pn | 902 | var = "SRCREV_pn-%s" % pn |