No.
> 2. Is there a way to mkdir in manifest.xml or make copyfile create
> the dir automatically?
No.
> 3. Is there a way to create symbol link in manifest.xml, not just
> copyfile?
No.
And worse... the development version of repo contains a new manifest
format based on git submodule, not an XML file format. There is no
equivalent of copyfile there, instead we put the file directly in the
submodule working directory. Which can't be done on this case because
you cannot add a file to a directory which is mounted as a submodule
(aka project in the XML format). So we're actually heading in a
direction *away* from what you are trying to use it for.
<copyfile> was built as a kludge to ensure we had a Makefile at the
top level in the Android build tree, because we couldn't support any
other files there. Originally I had just proposed that people create
this file by hand; if you look at any Android tree its literally just
3 lines, 2 of which are pointless noise:
$ cat Makefile
### DO NOT EDIT THIS FILE ###
include build/core/main.mk
### DO NOT EDIT THIS FILE ###
Given that I wanted to have people either create this file by hand, or
symlink to it, e.g.:
$ ln -s build/core/main.mk Makefile
(or)
$ echo include build/core/main.mk >Makefile
But some peer pressure applied by fellow engineers lead to copyfile
being introduced instead.
Yea, its actually supporting a more git submodule like structure. See
http://android.git.kernel.org/?p=tools/repo.git;a=blob;f=docs/manifest_submodule.txt;hb=HEAD
for more details on what's coming.
Use instead:
repo init -u git://test.com/manifest.git -b kernels
--repo-branch=master --no-repo-verify
> 3. When I use repo sync, it fail agian,
> Traceback (most recent call last):
...
> error.ManifestParseError: submodule "kernel/git/torvalds/linux-2.6"
> has no revision at "kernel/linux-2.6"
>
> What's wrong? And could your provide a sample .gitmodules based on
> android project, so I can test and know what's wrong.
Read that final error. You don't have a submodule gitlink in your
manifest repository. To put that there, you need to do something
like:
mkdir kernel
git clone git://test.com/kernel/git/torvalds/linux-2.6.git kernel/linux-2.6
git add kernel/linux-2.6
git commit -m "Initial revision of kernel/linux-2.6"