Skip to contentSkip to conversation

RFC One recipe with two git repository as sources

PATCH Holger Freyther 4 participants 7 messages Jun 23, 2011 – Jul 1, 2011

lore
Share & tools
lore
#0 lore raw

Hi all,

I have some messy source (as the cleanup is going on), I need to pull the new code from one repo and some files from the old one. Now in the recipes I have:

SRC_URI = "git://[email protected];protocol=ssh;name=first \
           git://[email protected];protocol=ssh;name=second"

SRCREV_FORMAT = "first-rsecond"
SRCREV_first = "ABC"
SRCREV_second = "DEF"
PV = "0.0+git${SRCPV}"
(too bad that we have inconsistency between git, gitr again)

This is all fluffy, the right things seem to be cloned but there is only one ${WORKDIR}/git and one or the other will end up in there. Somehow I think we had something like this before but here is the proposal:

Introduce a ;destsuffix=DEST so the code will be checked out to DEST/ instead of git/.

comments?
holger

commit e45b5b3b917eaba42052760c82c9b4ca57670136

Author: Holger Hans Peter Freyther <[email protected]>
Date:   Thu Jun 23 04:50:13 2011 +0800

fetch2/git: Allow to specify the name of the checkout directory

bitbake/lib/bb/fetch2/git.py +3 -1
index 6979bea..4d45b48 100644
@@ -209,7 +209,9 @@ class Git(FetchMethod):
         else:
             readpathspec = ""
 
-        destdir = os.path.join(destdir, "git/")
+        destsuffix = ud.parm.get("destsuffix", "git/")
+        print destsuffix
+        destdir = os.path.join(destdir, destsuffix)
         if os.path.exists(destdir):
             bb.utils.prunedir(destdir)
 
#1 lore raw

bitbake/lib/bb/fetch2/git.py class Git(FetchMethod): · line 214

Quoted 4 lines · Holger Freyther
bitbake/lib/bb/fetch2/git.py +3 -1
-        destdir = os.path.join(destdir, "git/")
+        destsuffix = ud.parm.get("destsuffix", "git/")
+        print destsuffix
+        destdir = os.path.join(destdir, destsuffix)

I think that "print" might be extraneous, but other than this your patch
looks awesome. I think this would resolve the problem that I was having
in
http://lists.linuxtogo.org/pipermail/openembedded-core/2011-June/004375.html and to which I never found a solution which didn't involve patching bitbake.

p.

#2 lore raw
Quoted 9 lines · Phil Blundell

bitbake/lib/bb/fetch2/git.py class Git(FetchMethod): · line 214

Quoted 4 lines · Holger Freyther
bitbake/lib/bb/fetch2/git.py +3 -1
-        destdir = os.path.join(destdir, "git/")
+        destsuffix = ud.parm.get("destsuffix", "git/")
+        print destsuffix
+        destdir = os.path.join(destdir, destsuffix)

I think that "print" might be extraneous, but other than this your patch looks awesome. I think this would resolve the problem that I was having in.

great, yeah the print is bogus and the question if and how this applies to fetch/git.py is also unresolved (i had a quick look but have not found the dirname it uses to create the tarball).

#3 lore raw
Quoted 7 lines · Holger Freyther
Quoted 6 lines · Phil Blundell
Quoted 4 lines · Holger Freyther
bitbake/lib/bb/fetch2/git.py +3 -1
-        destdir = os.path.join(destdir, "git/")
+        destsuffix = ud.parm.get("destsuffix", "git/")
+        print destsuffix
+        destdir = os.path.join(destdir, destsuffix)
Quoted 7 lines
Quoted 3 lines

I think that "print" might be extraneous, but other than this your patch looks awesome. I think this would resolve the problem that I was having in.

great, yeah the print is bogus and the question if and how this applies to fetch/git.py is also unresolved (i had a quick look but have not found the dirname it uses to create the tarball).

I'm not entirely clear on what's going on with fetch vs fetch2 at all, in terms of whether fetch is going away at some point or the two of them are meant to be existing in parallel. Can one of the TSC überhackers shed any light on what the intent is there?

p.

#4 lore raw
Quoted 12 lines · Phil Blundell
Quoted 11 lines · Holger Freyther
Quoted 9 lines · Phil Blundell

bitbake/lib/bb/fetch2/git.py class Git(FetchMethod): · line 214

Quoted 4 lines · Holger Freyther
bitbake/lib/bb/fetch2/git.py +3 -1
-        destdir = os.path.join(destdir, "git/")
+        destsuffix = ud.parm.get("destsuffix", "git/")
+        print destsuffix
+        destdir = os.path.join(destdir, destsuffix)

I think that "print" might be extraneous, but other than this your patch looks awesome. I think this would resolve the problem that I was having in.

Quoted 9 lines
Quoted 3 lines

great, yeah the print is bogus and the question if and how this applies to fetch/git.py is also unresolved (i had a quick look but have not found the dirname it uses to create the tarball).

I'm not entirely clear on what's going on with fetch vs fetch2 at all, in terms of whether fetch is going away at some point or the two of them are meant to be existing in parallel. Can one of the TSC überhackers shed any light on what the intent is there?

"fetch" is remaining for compatibility for the time being. I believe the intent is that fetch will go away when compatibility is no longer needed or desired.

--Mark

Quoted 7 lines

p.

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#5 lore raw
In reply to Phil Blundell

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 12 lines · Phil Blundell
Quoted 11 lines · Holger Freyther
Quoted 9 lines · Phil Blundell

bitbake/lib/bb/fetch2/git.py class Git(FetchMethod): · line 214

Quoted 4 lines · Holger Freyther
bitbake/lib/bb/fetch2/git.py +3 -1
-        destdir = os.path.join(destdir, "git/")
+        destsuffix = ud.parm.get("destsuffix", "git/")
+        print destsuffix
+        destdir = os.path.join(destdir, destsuffix)

I think that "print" might be extraneous, but other than this your patch looks awesome. I think this would resolve the problem that I was having in.

Quoted 8 lines
Quoted 3 lines

great, yeah the print is bogus and the question if and how this applies to fetch/git.py is also unresolved (i had a quick look but have not found the dirname it uses to create the tarball).

I'm not entirely clear on what's going on with fetch vs fetch2 at all, in terms of whether fetch is going away at some point or the two of them are meant to be existing in parallel. Can one of the TSC überhackers shed any light on what the intent is there?

Fetch2 is being used in OE-core, fetch is there for "old-style" OE like .dev and 2011.03-maintenance.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFOA0+0MkyGM64RGpERAsmAAJ9D/PrqNupsL/pIF6ClrD39r+RZhQCgpbM+ Rj2c9UxKldqANJJiua4rRNA=
=xv3k
-----END PGP SIGNATURE-----

#6 lore raw
In reply to Phil Blundell
Quoted 11 lines · Phil Blundell

Review

Quoted 4 lines · Holger Freyther
(quoted diff) +3 -1
-        destdir = os.path.join(destdir, "git/")
+        destsuffix = ud.parm.get("destsuffix", "git/")
+        print destsuffix
+        destdir = os.path.join(destdir, destsuffix)

I think that "print" might be extraneous, but other than this your patch
looks awesome. I think this would resolve the problem that I was having
in
http://lists.linuxtogo.org/pipermail/openembedded-core/2011-June/004375.html and to which I never found a solution which didn't involve patching bitbake.

Hi all,

updated patch without the debug print statement in it. what do you think? could this be applied to the bitbake repository?

holger

From 5f58446bd2022c149b58a9f8faf738d1b56597a6 Mon Sep 17 00:00:00 2001
From: Holger Hans Peter Freyther <[email protected]>
Date: Thu, 23 Jun 2011 04:50:13 +0800
Subject: [PATCH] fetch2/git: Allow to specify the name of the checkout directory

---
 lib/bb/fetch2/git.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
lib/bb/fetch2/git.py +2 -1
index f3bc793..534c87d 100644
@@ -212,7 +212,8 @@ class Git(FetchMethod):
         else:
             readpathspec = ""
 
-        destdir = os.path.join(destdir, "git/")
+        destsuffix = ud.parm.get("destsuffix", "git/")
+        destdir = os.path.join(destdir, destsuffix)
         if os.path.exists(destdir):
             bb.utils.prunedir(destdir)
 
Signature · 1 line
1.7.4.1