From patchwork Thu Jun 23 11:18:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: RFC One recipe with two git repository as sources Date: Thu, 23 Jun 2011 11:18:51 -0000 From: Holger Freyther X-Patchwork-Id: 6399 Message-Id: <4E03211B.40205@freyther.de> To: openembedded-devel@lists.openembedded.org 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://git@....git;protocol=ssh;name=first \ git://git@....git;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 Date: Thu Jun 23 04:50:13 2011 +0800 fetch2/git: Allow to specify the name of the checkout directory diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 6979bea..4d45b48 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py @@ -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)