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

Re: [Xen-devel] [PATCH] tools/firmware: update OVMF Makefile



On Mon, Jan 14, 2019 at 05:44:57PM +0000, Wei Liu wrote:
> On Mon, Jan 14, 2019 at 06:27:44PM +0100, Olaf Hering wrote:
> > Am Mon, 14 Jan 2019 17:11:56 +0000
> > schrieb Anthony PERARD <anthony.perard@xxxxxxxxxx>:
> > 
> > > I think it's fine to keep the current `submodule update` call where it
> > > is. We could just make it check that it's an actual git worktree by
> > > checking for the presence of ".git" (file or directory) before executing
> > > git.
> > > 
> > > Would that be good enough?
> > 
> > Maybe. Whatever works with env WGET/GIT=/bin/false ./configure $options.
> > 
> 
> Can you try this?
> 
> diff --git a/tools/firmware/ovmf-makefile b/tools/firmware/ovmf-makefile
> index 3de2fc0300..649482bca8 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
>   +       [ -d .git ] && $(GIT) submodule update --init --recursive

Please, use -e or -r, it is perfectly reasonable to have .git been a
file. (someone could use `git worktree`, or even a submodule)

Also, I think we should use `if`, As make must not fail if it isn't a
git worktree. (or "|| true" or "||:", but that would hide git failures.)

>           OvmfPkg/build.sh -a X64 -b $(TARGET) -n 4
>                 cp Build/OvmfX64/$(TARGET)_GCC*/FV/OVMF.fd ovmf.bin
> 

-- 
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®.