All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [bitbake-devel] [PATCH] Change git lfs support to allow for destsuffix being set.
       [not found] <00fa7401-7894-3c86-6b25-3ad62d184260@braneaudio.com>
@ 2022-10-03 21:06 ` Luca Ceresoli
  0 siblings, 0 replies; only message in thread
From: Luca Ceresoli @ 2022-10-03 21:06 UTC (permalink / raw)
  To: Richard Greer; +Cc: bitbake-devel

Hello Richard,

On Mon, 3 Oct 2022 12:58:14 -0500
"Richard Greer" <rg@braneaudio.com> wrote:

> From: Richard Greer <rg@braneaudio.com>
> 
> When getting large files with git lfs need to try and recreate the path 
> where the repo
> is actually located after the unpack.
> 
> If destsuffix or subdir (where subdir is not an absolute path) is set 
> then it will not be in
> tmpdir/git.
> 
> It looks like the more correct place would be in ud.destdir.
> 
> This does not address the issue where it will fail in the unpack if 
> subdir is an absolute path
> since it cannot possibly be in the same path as the tmpdir.  I have no 
> idea as to how to
> deal with that.

Text wrapping seems broken in the text. Not necessarily a big problem,
but not nice to read.

> Signed-off-by: Richard Greer <rg@braneaudio.com>
> ---
>   bitbake/lib/bb/fetch2/git.py | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
> index f0df6fb69b..fa454a1c07 100644
> --- a/bitbake/lib/bb/fetch2/git.py
> +++ b/bitbake/lib/bb/fetch2/git.py
> @@ -421,8 +421,8 @@ class Git(FetchMethod):
>                   # Only do this if the unpack resulted in a .git/lfs 
> directory being
>                   # created; this only happens if at least one blob 
> needed to be
>                   # downloaded.
> -                if os.path.exists(os.path.join(tmpdir, "git", ".git", 
> "lfs")):
> -                    runfetchcmd("tar -cf - lfs | tar -xf - -C %s" % 
> ud.clonedir, d, workdir="%s/git/.git" % tmpdir)
> +                if os.path.exists(os.path.join(ud.destdir, ".git", "lfs")):
> +                    runfetchcmd("tar -cf - lfs | tar -xf - -C %s" % 

Here wrapping is also wrong, but this one is definitely a problem. You
must not wrap a line in a patch, otherwise it won't apply.

I strongly suggest to use 'git format-patch' + 'git send-email' to send
a patch. Those tools will ensure the patch is not mangled, and it will
apply correctly. More info at
https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded

Can you please send a v2 with that fixed?

Best regards.
-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-03 21:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <00fa7401-7894-3c86-6b25-3ad62d184260@braneaudio.com>
2022-10-03 21:06 ` [bitbake-devel] [PATCH] Change git lfs support to allow for destsuffix being set Luca Ceresoli

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.