[oe] [PATCH] metadata_scm.bbclass: get the metadata revision for current HEAD

Khem Raj raj.khem at gmail.com
Thu Nov 4 15:59:07 UTC 2010


On Thu, Nov 4, 2010 at 7:07 AM, Chris Larson <clarson at kergoth.com> wrote:
> On Wed, Nov 3, 2010 at 11:01 PM, Khem Raj <raj.khem at gmail.com> wrote:
>
>> >> bitbake at jama ~/oe $ git show-ref HEAD
>> >> b3246d96069fd11caee42ec6ebcbf6dca2d62449 refs/remotes/origin/HEAD
>> >
>> >
>> > No, this is broken.  It shouldn't be determining the METADATA_REVISION
>> from
>> > a ref you don't even have checked out.  Right now it's pulling the HEAD
>> ref
>> > from upstream, it should be pulling the local HEAD ref.  So NACK on this
>> > patch, the metadata revision code needs to be fixed to either not use
>> > show-ref or pass the necessary args to not operate based on a HEAD of a
>> > remote.
>>
>> whats wrong with this patch. or what is it that we need additionally.
>
>
> The issue is, show-ref shows all refs which match the supplied search
> string.  show-ref HEAD will show all the HEAD refs, both local and the ones
> in all your remotes, which isn't what we want for METADATA_REVISION.  I'm
> testing a patch which changes it to use rev-parse to get the commit hash for
> HEAD rather than show-ref.

FWIW you could also use git show-ref --head <branch>

Thanks for catching this, by the way, I don't
> want to sound unappreciative, its just that this patch is more of a
> workaround, rather than a fix for the root problem. :)
> --
> Christopher Larson
> clarson at kergoth dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Maintainer - Tslib
> Senior Software Engineer, Mentor Graphics
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>




More information about the Openembedded-devel mailing list