免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3376 | 回复: 0
打印 上一主题 下一主题

在本地建立android源码镜像 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-08-24 22:48 |只看该作者 |倒序浏览

               
Creating an OMAP-Android Mirror
This article describes how to create a mirror of the OMAP-Android
repositories on a local server. This allow users working on the local
server to create clones of the OMAP-Android repositories locally rather
than over the internet.

Prerequisites/Assumptions
This article assumes that you already have repo, git and a git
server installed on the local server. If you do not please refer to the
following articles.
Installing Repo:
"http://source.android.com/download"
Installing Git:
http://wiki.omap.com/index.php?title=Git#Installing_Gi
t
Setting up a Git Server:
http://wiki.omap.com/index.php?title=Git#Setting_up_a_Git_Server
IMPORTANT! If you are
working behind a firewall, you will need to use corkscrew in order to
create the mirror. When you configure corkscrew it is important that
you configure git to only use corkscrew when cloning from kernel.org
and omapzoom.org sites. If you do not then when you attempt to perform
a local clone of the mirror, git will try to go through the firewall
and will not find your local server. For instructions on installing
corkscrew and configuring git to use corkscrew click
here


HOWTO Create an OMAP-Android Mirror
On the local server create a new directory that where the local
mirror will reside. Note that the Git server should be configured to
export this server. See reference above for installing a Git server on
the Linux host. For example, if the Git server was configured to export
the directory "/pub/gittrees" on the Linux host, then the following
directory could be create for the OMAP-Android mirror...
mkdir /pub/gittrees/omap-android/

Create the mirror by executing the following commands.
cd /pub/gittrees/omap-android/
repo init -u git://git.omapzoom.org/repo/android/platform/omapmanifest.git --mirror
repo sync
Once the "sync" has completed it is then necessary to modify the
OMAP-Android manifest , so that when users attempt to create clones of
the OMAP-Android git trees it directs them to the local server and not
to the external servers. To do this create a clone of the OMAP-Android
manifest as shown below. The clone may be created as "user" and so long
as the user has write permission in the directory where the mirror is
located. Please note that in this example the IP address of the local
server is 192.168.0.100 and assumes the Git server is configured with
the option --base-path=/pub/gittrees.
cd ~
git clone git://192.168.0.100/omap-android/repo/android/platform/omapmanifest.git

Edit the file "~/omap-android-manifest.git/default.xml" in "and
replace the "fetch" location for the remote korg and omap with the IP
address and directory name of the OMAP-Android mirror. The below
illustrates the changes made to the default.xml file for this
example...


   
   
+           fetch="git://192.168.0.100/omap-android/" />
   

Finally, commit this change to the Git repository and push this
change back to the parent Git tree. Please note that "user" is the
username of the person that has modifed the manifest.
cd ~/omap-android-manifest.git
git commit -a
git push user@192.168.0.100:/pub/gittrees/omap-android/repo/android/platform/omapmanifest.git

The setup of the mirror is now complete.
IMPORTANT! Please note
that if you update the mirror by executing "repo sync" sometime later,
if the manifest has been updated, sync'ing the mirror will overwrite
the changes you have made. Hence, when updating the mirror check to see
if the manifest has been updated.


HOWTO Clone from the Local Mirror
On a developer system on the same network as the host, users may
make clones from the local mirror by executing the following commands.
cd ~
mkdir mydroid
cd mydroid
repo init -u git://192.168.0.100/omap-android/repo/android/platform/omapmanifest.git
repo sync

               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/64117/showart_2036087.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP