diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-02 14:10:46 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-10 16:06:21 +0000 |
commit | 8b5ee367a630027d478aed265ee79a7230e91673 (patch) | |
tree | d839d682220a99bc8609fc284eb5011026461a91 /meta/classes/base.bbclass | |
parent | 947e5260f9f3a68e51ccc456610bad9a8b200224 (diff) | |
download | poky-8b5ee367a630027d478aed265ee79a7230e91673.tar.gz |
bitbake.conf/base: Improve handling of SRCPV
If SRCPV is set, it can be expanded when SRC_URI doesn't support it
leading to errors. Avoid doing this by setting it only when it makes
sense.
This patch depends on the bitbake python expansion patch series.
[YCOTO #7772]
(From OE-Core rev: ce64da2b80f99c82d96513d8dfb5e572757b0cda)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r-- | meta/classes/base.bbclass | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index d4b11bc7a8..82ec0c9b82 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
@@ -549,6 +549,7 @@ python () { | |||
549 | elif pn in htincompatwl: | 549 | elif pn in htincompatwl: |
550 | bb.note("INCLUDING " + pn + " as buildable despite INCOMPATIBLE_LICENSE because it has been whitelisted for HOSTTOOLS") | 550 | bb.note("INCLUDING " + pn + " as buildable despite INCOMPATIBLE_LICENSE because it has been whitelisted for HOSTTOOLS") |
551 | 551 | ||
552 | needsrcrev = False | ||
552 | srcuri = d.getVar('SRC_URI', True) | 553 | srcuri = d.getVar('SRC_URI', True) |
553 | for uri in srcuri.split(): | 554 | for uri in srcuri.split(): |
554 | (scheme, _ , path) = bb.fetch.decodeurl(uri)[:3] | 555 | (scheme, _ , path) = bb.fetch.decodeurl(uri)[:3] |
@@ -559,14 +560,17 @@ python () { | |||
559 | 560 | ||
560 | # Svn packages should DEPEND on subversion-native | 561 | # Svn packages should DEPEND on subversion-native |
561 | if scheme == "svn": | 562 | if scheme == "svn": |
563 | needsrcrev = True | ||
562 | d.appendVarFlag('do_fetch', 'depends', ' subversion-native:do_populate_sysroot') | 564 | d.appendVarFlag('do_fetch', 'depends', ' subversion-native:do_populate_sysroot') |
563 | 565 | ||
564 | # Git packages should DEPEND on git-native | 566 | # Git packages should DEPEND on git-native |
565 | elif scheme == "git": | 567 | elif scheme == "git": |
568 | needsrcrev = True | ||
566 | d.appendVarFlag('do_fetch', 'depends', ' git-native:do_populate_sysroot') | 569 | d.appendVarFlag('do_fetch', 'depends', ' git-native:do_populate_sysroot') |
567 | 570 | ||
568 | # Mercurial packages should DEPEND on mercurial-native | 571 | # Mercurial packages should DEPEND on mercurial-native |
569 | elif scheme == "hg": | 572 | elif scheme == "hg": |
573 | needsrcrev = True | ||
570 | d.appendVarFlag('do_fetch', 'depends', ' mercurial-native:do_populate_sysroot') | 574 | d.appendVarFlag('do_fetch', 'depends', ' mercurial-native:do_populate_sysroot') |
571 | 575 | ||
572 | # OSC packages should DEPEND on osc-native | 576 | # OSC packages should DEPEND on osc-native |
@@ -593,6 +597,9 @@ python () { | |||
593 | elif path.endswith('.src.rpm'): | 597 | elif path.endswith('.src.rpm'): |
594 | d.appendVarFlag('do_unpack', 'depends', ' file-native:do_populate_sysroot') | 598 | d.appendVarFlag('do_unpack', 'depends', ' file-native:do_populate_sysroot') |
595 | 599 | ||
600 | if needsrcrev: | ||
601 | d.setVar("SRCPV", "${@bb.fetch2.get_srcrev(d)}") | ||
602 | |||
596 | set_packagetriplet(d) | 603 | set_packagetriplet(d) |
597 | 604 | ||
598 | # 'multimachine' handling | 605 | # 'multimachine' handling |