Skip to contentSkip to conversation

How to leave original git remote in unpacked repository?

DISCUSSION Alex J Lennon 2 participants 3 messages May 30, 2014 – Jun 12, 2014

lore
Share & tools
lore
#0 lore raw

Hi,

When I drop into a devshell for an unpacked SRV_REV from a particular git SRC_URI I have the git remote origin set to a local archive in the ~/downloads tree.

Is there a build variable, say, I can set to leave the original git remote set as well so that I can more easily push back changes I make?

(Or is that a bad idea for some reason?)

Thanks,

Alex

#1 lore raw

Hi Alex,

Quoted 8 lines · On Friday 30 May 2014 12:39:13 Alex J Lennon wrote:

When I drop into a devshell for an unpacked SRV_REV from a particular git SRC_URI I have the git remote origin set to a local archive in the ~/downloads tree.

Is there a build variable, say, I can set to leave the original git remote set as well so that I can more easily push back changes I make?

(Or is that a bad idea for some reason?)

There isn't a way to do this, and to be honest with the discussions we've had recently about developer workflow, I'm not sure we want to encourage doing development within the workdir for a recipe because it's managed by the build system, and if you're not careful (e.g. with -c clean, rm_work or just changing SRC_URI) the sources can vanish taking your changes with it. Our alternative at the moment is to use externalsrc [1]. This is a little more work though and at the OEDAM meeting [2] there was some discussion about how we could make this easier in future.

Cheers,
Paul

[1] http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#building-software-from-an-external-source
[2] http://openembedded.org/wiki/OEDAM#Minutes

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#2 lore raw
Quoted 11 lines · Paul Eggleton

Hi Alex,

Quoted 8 lines · On Friday 30 May 2014 12:39:13 Alex J Lennon wrote:

When I drop into a devshell for an unpacked SRV_REV from a particular git SRC_URI I have the git remote origin set to a local archive in the ~/downloads tree.

Is there a build variable, say, I can set to leave the original git remote set as well so that I can more easily push back changes I make?

(Or is that a bad idea for some reason?)

Quoted 9 lines

There isn't a way to do this, and to be honest with the discussions we've had recently about developer workflow, I'm not sure we want to encourage doing development within the workdir for a recipe because it's managed by the build system, and if you're not careful (e.g. with -c clean, rm_work or just changing SRC_URI) the sources can vanish taking your changes with it. Our alternative at the moment is to use externalsrc [1]. This is a little more work though and at the OEDAM meeting [2] there was some discussion about how we could make this easier in future.

OK thanks Paul. I understand what you mean, having wiped various changes out in the past with inadvertent -c clean 'ing

That said I do find it quite productive to work in-tree with a development git fork, ${AUTOREV} in the recipe and frequent work in progress pushes to the remote repo just in case.

I'll take a look at what's involved in externalsrc as you recommend.

Thanks again,

Alex