0

I am compiling xen from source and each time I do a make world it basically gives some or the other error my problem are not those errors ( I am trying to debug them) but the problem is each time when I do a make world

Xen basically pulls things from git repository

+ rm -rf linux-2.6-pvops.git linux-2.6-pvops.git.tmp
+ mkdir linux-2.6-pvops.git.tmp
+ rmdir linux-2.6-pvops.git.tmp
+ git clone -o xen -n git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git linux-2.6-pvops.git.tmp
Initialized empty Git repository in /usr/src/xen-4.0.1/linux-2.6-pvops.git.tmp/.git/
remote: Counting objects: 1941611, done.
remote: Compressing objects: 100% (319127/319127), done.

remote: Total 1941611 (delta 1614302), reused 1930655 (delta 1604595) **Receiving objects: 20% (1941611/1941611), 98.17 MiB | 87 KiB/s, done.**

and if you notice the last line it is still consuming my bandwidth pulling things from internet.How can I stop this step each time and use existing git repository?

Registered User
  • 1,463
  • 5
  • 18
  • 37

2 Answers2

0

To elaborate on Tobu's response (his frustration is clear... this is a really stupid way to do a Makefile); there is a Makefile that has the following in there:

rm -rf linux-2.6-pvops.git linux-2.6-pvops.git.tmp
mkdir linux-2.6-pvops.git.tmp
rmdir linux-2.6-pvops.git.tmp
git clone -o xen -n git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git linux-2.6-pvops.git.tmp

What it should really be doing is something like (in pseudocode):

if git repository exists:
    update using `git pull`
else:
    clone a fresh copy using `git clone`

Basically, its being horribly inefficient by ALWAYS cloning a fresh copy of the entire repository. If you're not familiar with the process, I'd recommend filing a bug report with details.

Andrew M.
  • 11,182
  • 2
  • 35
  • 29
  • ok what I did was I pulled the git repository manually and then compiled the kernel.Is that the right way to do? because I now lost my wifi connectivity after that. – Registered User Feb 28 '11 at 20:03
  • The only difference is whether or not you're pulling a fresh copy of the entire repository, or just the differences between your copy of the repository and the source. I.e., update versus full clone. I can't help with these other issues. – Andrew M. Feb 28 '11 at 22:10
0

Hi thanks all I found a solution to my problem.

in the directory xen-4.0.1/buildconfigs open file src.git-clone following lines are responsible for this pull

   if ! [ -d $(LINUX_SRCDIR) ]; then \
           rm -rf $(LINUX_SRCDIR) $(LINUX_SRCDIR).tmp; \
           mkdir $(LINUX_SRCDIR).tmp; rmdir $(LINUX_SRCDIR).tmp; \
           $(GIT) clone -o $(XEN_GIT_ORIGIN) -n $(XEN_LINUX_GIT_URL) $(LINUX_SRCDIR).tmp; \
               (cd $(LINUX_SRCDIR).tmp; git checkout -b $(XEN_LINUX_GIT_LOCALBRANCH) $(XEN_LINUX_GITREV) ); \
           mv $(LINUX_SRCDIR).tmp $(LINUX_SRCDIR); \

   fi

so add a hash # at the beginning of following lines

#       if ! [ -d $(LINUX_SRCDIR) ]; then \
#               rm -rf $(LINUX_SRCDIR) $(LINUX_SRCDIR).tmp; \
#               mkdir $(LINUX_SRCDIR).tmp; rmdir $(LINUX_SRCDIR).tmp; \
#               $(GIT) clone -o $(XEN_GIT_ORIGIN) -n $(XEN_LINUX_GIT_URL) $(LINUX_SRCDIR).tmp; \
#               (cd $(LINUX_SRCDIR).tmp; git checkout -b $(XEN_LINUX_GIT_LOCALBRANCH) $(XEN_LINUX_GITREV) ); \
#               mv $(LINUX_SRCDIR).tmp $(LINUX_SRCDIR); \
#
#       fi

This will solve the problem of git pull happening each time.Assuming you already have pulled the required tree and do a make dist because make world will pull where as you can proceed with make dist if you have the tree inside.

Registered User
  • 1,463
  • 5
  • 18
  • 37
  • 1
    Um... you WANT a `git pull` to happen everytime. What you DON'T want is a `git clone` to happen every time. Verify that a `git pull` is being done and you'll have a good answer--otherwise, you'll be working with potentially old data. – Andrew M. Mar 05 '11 at 04:17
  • @Redmumba Ok actually I am doing it daily.So in this situation should I do a git pull daily? – Registered User Mar 05 '11 at 11:42