[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] tools: only call git when necessary in OVMF Makefile



On Tue, Jan 15, 2019 at 11:29:38AM +0000, Wei Liu wrote:
> On Tue, Jan 15, 2019 at 11:27:12AM +0000, Andrew Cooper wrote:
> > On 15/01/2019 11:09, Wei Liu wrote:
> > > Users may choose to export a snapshot of OVMF and build it
> > > with xen.git supplied ovmf-makefile. In that case we don't
> > > need to call `git submodule`.
> > >
> > > Fixes b16281870e.
> > >
> > > Reported-by: Olaf Hering <olaf@xxxxxxxxx>
> > > Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> > > ---
> > >  tools/firmware/ovmf-makefile | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/tools/firmware/ovmf-makefile b/tools/firmware/ovmf-makefile
> > > index 3de2fc0300..55f9992145 100644
> > > --- a/tools/firmware/ovmf-makefile
> > > +++ b/tools/firmware/ovmf-makefile
> > > @@ -16,7 +16,7 @@ all: build
> > >  
> > >  .PHONY: build
> > >  build:
> > > - $(GIT) submodule update --init --recursive
> > > + if test -e .git ; then $(GIT) submodule update --init --recursive ; fi
> > 
> > You want -d rather than -e.
> 
> Anthony said .git could be a link.

Actually, it can be a file. Example when `git worktree add` as been
used:

$ ls -l .git
-rw-r--r-- 1 user users 59 Dec  6 14:23 .git
$ cat .git
gitdir: /local/home/user/work/xen/.git/worktrees/git.72d1

And that's a submodule:

$ ls -l .git
-rw-r--r-- 1 user users 43 Oct 18  2017 .git
$ cat .git
gitdir: ../../.git/modules/ui/keycodemapdb

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.