All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cliff Brake <cliff.brake@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: How to use externalsrc with git workspace
Date: Fri, 25 Mar 2016 17:07:15 -0400	[thread overview]
Message-ID: <56F5A883.5040306@gmail.com> (raw)
In-Reply-To: <56F59D2B.2010108@gmail.com>

This change gets things parsing again, but still testing to see if it does what
I want it to do:

diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index 9bd87ad..fb44fdc 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -358,7 +358,7 @@ class Git(FetchMethod):
         """
         output = self._lsremote(ud, d, "")
         # Tags of the form ^{} may not work, need to fallback to other form
-        if ud.unresolvedrev[name][:5] == "refs/":
+        if ud.unresolvedrev[name][:5] == "refs/" or ud.unresolvedrev[name] ==
"HEAD":
             head = ud.unresolvedrev[name]
             tag = ud.unresolvedrev[name]
         else:

Cliff

On 03/25/2016 04:18 PM, Cliff Brake wrote:
> Hi,
>
> In the past (say Dora era), I've used externalsrc like:
>
> ====================
> DESCRIPTION = "MyApp"
> LICENSE = "CLOSED"
>
> inherit externalsrc
>
> SRCREV = "${AUTOREV}"
> PV = "1.4+gitr${SRCPV}"
> PR = "r1"
>
> SRC_URI = "git://${FILE_DIRNAME};protocol=file;branch=HEAD"
> S = "${FILE_DIRNAME}"
>
> ...
> ====================
>
> This was very nice in that it set SRCPV to to the git version of the HEAD of my
> local workspace.  When building from a local git workspace, this makes sense to
> me -- I want the Git version of the workspace, not a remote version.
>
> Now with Jethro, I get errors like:
>
> ERROR: ExpansionError during parsing myapp.bb: Failure expanding variable SRCPV,
> expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError:
> Fetcher failure: Unable to resolve 'HEAD' in upstream git repository in git
> ls-remote output for /scratch/externalsrc/MyApp
>
> Do you have any suggestions how to use externalsrc + a local git workspace and
> avoid the above error.  I can set branch=master, etc and bitbake will then parse
> it, but the remote master version is not really what I'm building.
>
> Thanks,
> Cliff
>



  reply	other threads:[~2016-03-25 21:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-25 20:18 How to use externalsrc with git workspace Cliff Brake
2016-03-25 21:07 ` Cliff Brake [this message]
2016-03-26  7:41 ` Richard Purdie
2016-03-28 19:58   ` Cliff Brake
2016-03-28 22:28     ` Richard Purdie
2016-03-29 12:25       ` Cliff Brake
2016-03-29 12:28         ` Richard Purdie
2016-03-29 13:50           ` Cliff Brake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56F5A883.5040306@gmail.com \
    --to=cliff.brake@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.