[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] docker: Don't enable networking as a side-ef
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH v2] docker: Don't enable networking as a side-effect of DEBUG=1 |
Date: |
Fri, 14 Jul 2017 20:12:23 +0800 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
On Fri, 07/14 12:52, Daniel P. Berrange wrote:
> > > > > @@ -132,7 +134,8 @@ docker-run: docker-qemu-src
> > > > > $(SRC_PATH)/tests/docker/docker.py run
> > > > > \
> > > > > $(if $(NOUSER),,-u $(shell id -u)) -t
> > > > > \
> > > > > $(if $V,,--rm)
> > > > > \
> > > > > - $(if $(DEBUG),-i,--net=none)
> > > > > \
> > > > > + $(if $(DEBUG),-i,)
> > > > > \
> > > > > + $(if $(NETWORK),$(if $(subst
> > > > > $(NETWORK),,1)$(subst 1,,$(NETWORK)),--net=$(NETWORK),),--net=none) \
> > > >
> > > > Isn't the first subst enough? We already know $(NETWORK) is non-empty.
> > > > If it is
> > > > "1", $(subst 1,,1) is empty; otherwise, $(subst foo,,1) is non-empty:
> > > >
> > > > $(if $(NETWORK),$(if $(subst
> > > > $(NETWORK),,1),,--net=$(NETWORK)),--net=none) \
> > >
> > > This looks inverted to me - NETWORK=1, will generate --net=1 and
> > > NETWORK=foo generates empty string.
> >
> > You are right, I was confused (subst succeed is FALSE branch of if). I think
> > s/,,/,/ and it will work?
>
> Yep
OK, so dropping the second "$(subst ...)" and the comma we have:
$(if $(NETWORK),$(if $(subst
$(NETWORK),,1),--net=$(NETWORK)),--net=none) \
With that, queued for 2.10:
https://github.com/famz/qemu/tree/staging
Fam