All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Richard Purdie" <richard.purdie@linuxfoundation.org>
To: Rasmus Villemoes <rasmus.villemoes@prevas.dk>,
	 bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH] fetch: git: add reference parameter
Date: Mon, 19 Oct 2020 14:15:26 +0100	[thread overview]
Message-ID: <7f7068b5f5c2a3e8a476df0fccbe5b28809f2889.camel@linuxfoundation.org> (raw)
In-Reply-To: <e5368445-2d7d-511f-d6ff-41c323aac7d2@prevas.dk>

On Mon, 2020-10-19 at 14:56 +0200, Rasmus Villemoes wrote:
> On 19/10/2020 14.28, Richard Purdie wrote:
> > > But, uh, how does this avoid the checksum/sstate issue?
> > > BBFETCH_GIT_REFERENCEDIR will need to be exempt somehow, right? I
> > > mean, I do want to be able to use sstate artifacts generated by
> > > our
> > > CI, but not setting up BBFETCH_GIT_REFERENCEDIR (at least not
> > > necessarily setting it up in exactly the same way).
> > 
> > The dependency code would have no idea the variable is being used
> > as it
> > doesn't know how to peek that deeply inside the fetcher.
> 
> Which is of course totally non-obvious for everybody but a handful of
> people.

Variable dependency tracking does not go into *any* library functions,
be it lib/oe/*, scripts/lib/* or bitbake itself. Whether obvious or
not, it is how it works and always has worked and the line is quite
clear.

>  But that means one might as well make it slightly more flexible and
> not force every reference repo to live in the same directory, and go
> back to the keyword-style
> 
> BBFETCH_GIT_REFERENCEDIR[linux-kernel] = "/some/path"
> BBFETCH_GIT_REFERENCEDIR[chromium] = "/totally/different/place"
> 
> But if you insist, it doesn't matter much, testing suggests that git
> is fine with the reference actually being a symlink to the real repo.

My preference is for simple API where we can. Users are much more used
to SSTATE_DIR = "XXX" rather than setting flags variables for each
repo.

> > > > This avoids all the messing with vardeps, keeps the SRC_URIs
> > > > simple
> > > > and
> > > > should generally be much more usable/scalable?
> > > > 
> > > > If BBFETCH_GIT_REFERENCEDIR is set, we'd also probably want to
> > > > make
> > > > successful clones push references into that directory to cache
> > > > them?
> > > 
> > > Absolutely not, the referenced repository is not to be modified
> > > in
> > > any way.
> > 
> > I'd like something which can be used by others so we need a way to
> > populate/update it. If its read-only in your case, fine, we can
> > detect
> > and not update but in the general case I'd like others to be able
> > to
> > benefit and use this too.
> 
> I really don't see the point of doing that (pushing "references" into
> the referenced repo). Why do you claim that we need a way to
> populate/update it? Keeping a  mirror of the upstream is exactly what
> we
> do under DL_DIR/git2/munged-path-to-upstream, why should some other
> local, but completely external to bitbake, repository also act like
> that? The purpose is just to speed up the initial clone (say, by
> having
> a clone of Linus' upstream repo lying around). I really don't get it.

You need to step back and think about how others might use this. I
think that most users will want to use a single common storage
location. They may have multiple BSPs, each using a kernel git repo so
being able to have a central store of those git references would be
useful. In the common case people will want the first clone to populate
it, the second clone to benefit from the speedup (regardless of which
BSP they build first, or whether they have local clone originally or
not).

I'd actually argue for making it part of the standard DL_DIR and drop
the references inside the other pieces of DL_DIR so its all more space
efficient. Its probably better to do this one step at a time though but
that would be a nice speedup/efficiency to ultimately have.

Whilst I appreciate this isn't exactly the problem you're trying to
solve, I'm interested in the solution which lets us be generally useful
to a majority of users.

Cheers,

Richard


  reply	other threads:[~2020-10-19 13:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-18 21:33 [PATCH] fetch: git: add reference parameter Rasmus Villemoes
2020-10-19  9:09 ` Richard Purdie
2020-10-19 10:25   ` Rasmus Villemoes
2020-10-19 10:43     ` Richard Purdie
2020-10-19 11:25       ` Rasmus Villemoes
2020-10-19 11:37         ` Richard Purdie
2020-10-19 12:11           ` Rasmus Villemoes
2020-10-19 12:28             ` Richard Purdie
2020-10-19 12:56               ` Rasmus Villemoes
2020-10-19 13:15                 ` Richard Purdie [this message]
2020-10-22 13:38 ` [PATCH v2] " Rasmus Villemoes
     [not found] ` <1640541B397C8D4C.8847@lists.openembedded.org>
2020-10-30  8:52   ` [bitbake-devel] " Rasmus Villemoes
2020-10-30  9:39     ` Richard Purdie
2020-10-30 15:06       ` Rasmus Villemoes

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=7f7068b5f5c2a3e8a476df0fccbe5b28809f2889.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=rasmus.villemoes@prevas.dk \
    /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.