Adding new folder to repo?

922 views
Skip to first unread message

Chris C.

unread,
Jul 30, 2010, 1:12:27 PM7/30/10
to android-porting
Hello,

I created a new folder under the /external directory, but it is not
being recognized by "repo status". Is there a way to add this folder
to the working tree so that the repo command can see that it should be
added?

Chris

Magnus Bäck

unread,
Aug 1, 2010, 11:07:00 AM8/1/10
to android-porting
On Friday, July 30, 2010 at 19:12 CEST,
"Chris C." <ccf...@gmail.com> wrote:

I'm not sure what you actually want to accomplish here. A little
background would make it easier to give a good answer.

Repo reads the manifest, .repo/manifest.xml (which is a symlink, usually
to .repo/manifests/default.xml), to determine which Git repositories you
have in your workspace. Assuming the directory you've added is a git you
can add it to the manifest, but make sure you specify an alternate
remote for the git (see the <remote> tag at the top of the manifest)
that points to where the "master" for your git is located. If you don't
do that, Repo will try to fetch the git from the server from which
you've fetched the code.

This is probably more suited for the repo-discuss list than
android-porting.

--
Magnus B�ck Opinions are my own and do not necessarily
SW Configuration Manager represent the ones of my employer, etc.
Sony Ericsson

Chris C.

unread,
Aug 2, 2010, 4:10:23 PM8/2/10
to android-porting
Hi Magnus,

As far as background goes, I'm trying to add a new shared library to
the Android platform, and I have done this be creating a new folder
with the name of my library under the "/external" directory of the
android platoform (i.e. /external/mylibrary).

This is what I did to lead up to this point:

1) Checked out the master branch from the android git repository by
following the Android documentation:

repo init -u git://android.git.kernel.org/platform/manifest.git
repo sync

2) Created a new directory under /external for my library, so I have
the following folder with my library in it:

/external/mylibrary

3) Now I am wondering how to add this to the working copy, so that it
is recognized by repo, and I am able to submit it to Gerrit for code
review.

Thanks,
Chris


On Aug 1, 9:07 am, Magnus Bäck <magnus.b...@sonyericsson.com> wrote:
> On Friday, July 30, 2010 at 19:12 CEST,

Deva R

unread,
Aug 3, 2010, 4:13:36 AM8/3/10
to ccf...@gmail.com, android-porting
Hi,

/external directory today hosts all external 3Party modules used in android.

you can add /external/<mylib>, and  start building your module., (android uses monolithic build tree, so will include ur module)

since /external/<mylib> is not tracked under any GITs listed in your repo manifest, its under blindspot. 
if u have added under, say /external/opencore/<mylib>, repo status will shout opencore project got modified files.

- first of all, its not possible to add a folder directl to a repo.,as repo always operate over GIT, and usually fetches projects from same server where it picked manifest. 
  for eg,  http://git.omapzoom.org/  got various cusotm projects, modules added under various git, and is listed under manifest.
 
for a quick fix, u can add ur custom library to an existing relevant git as add-on, and post it to gerrit.

Regards,
Deva

Chris C.

unread,
Aug 3, 2010, 11:20:36 AM8/3/10
to android-porting
Deva,

Thanks for your reply. That clears things up quite a bit, although
could you elaborate on when you say "add my custom library to an
existing relevant git as an add-on"? My library is an embedded SSL
library - just to make things more applicable. Please understand that
I have very little experience before now using GIT, and as such am
slightly unfamiliar with methods of doing things.

Thanks,
Chris
> > unsubscribe: android-porti...@googlegroups.com<android-porting%2Bunsubscribe@ googlegroups.com>
> > website:http://groups.google.com/group/android-porting

Deva R

unread,
Aug 4, 2010, 4:55:52 AM8/4/10
to ccf...@gmail.com, android-porting
Hi,
I assume you work with android.git.kernel.org, and 

- ideally you should add your project as separate project under ./external/<myssl> 
  you should be able to build and work.

if you are good, no problem.
the problem comes only if you want to post the patch to gerrit.,  
since it doesn't belong to any of the project listed in your manifest, it may not be possible to publish the changes in gerrit (for review,validation,use by others)

Gerrit should  be good for bug fixes and patches on exisiting project, I'm not sure of what to be done for a new proj like this.

-Deva

PS.
Atleast i'll keep going like below for gerrit upload., but its a dirty way.
- you add your library to existing project like ./external/openssl/<merge-library-here>, 
  you should be able to build,compile and work. you can generate and upload patch to gerrit (i see no patches for openssl though - http://goo.gl/tWEe )



Reply all
Reply to author
Forward
0 new messages