[OE-core] [PATCH] gitpkgv: Fix $GITPKV for a single named git source
Khem Raj
raj.khem at gmail.com
Fri Aug 12 05:49:02 UTC 2016
> On Aug 11, 2016, at 3:04 AM, Clemens Lang <Clemens.Lang at bmw-carit.de> wrote:
>
> Recipes that fetch from a single git source, assign a name to this
> source and do not set SRCREV_FORMAT to this name will always get
> a GITPKGV value of "default", which causes version-going-backwards QA
> errors.
>
> Fix this by automatically determining a suitable SRCREV_FORMAT from the
> SRC_URI if none is set explicitly. This code does not run for multiple
> git sources, because bitbake's fetcher enforces setting SRCREV_FORMAT
> when multiple version-controlled sources are used.
looks good.
>
> Signed-off-by: Clemens Lang <clemens.lang at bmw-carit.de>
> ---
> meta-oe/classes/gitpkgv.bbclass | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/meta-oe/classes/gitpkgv.bbclass b/meta-oe/classes/gitpkgv.bbclass
> index 1cba00c..f73304a 100644
> --- a/meta-oe/classes/gitpkgv.bbclass
> +++ b/meta-oe/classes/gitpkgv.bbclass
> @@ -61,7 +61,14 @@ def get_git_pkgv(d, use_tags):
> #
> format = d.getVar('SRCREV_FORMAT', True)
> if not format:
> - format = 'default'
> + names = []
> + for url in ud.values():
> + if url.type == 'git' or url.type == 'gitsm':
> + names.extend(url.revisions.keys())
> + if len(names) > 0:
> + format = '_'.join(names)
> + else:
> + format = 'default'
>
> found = False
> for url in ud.values():
> --
> 2.8.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20160811/a6c6143d/attachment-0002.sig>
More information about the Openembedded-core
mailing list