Date: Fri, 2 Apr 2021 10:03:48 +0200 From: Gian Piero Carrubba <gpiero@rm-rf.it> To: freebsd-questions@freebsd.org Subject: Re: How to override pkgng's proxy configuration settings Message-ID: <20210402080348.zhojt2ywohx7d74v@robinhood.fdc.rm-rf.it> In-Reply-To: <20210317102243.2a2vb5hftkebqj54@robinhood.fdc.rm-rf.it> References: <20210317102243.2a2vb5hftkebqj54@robinhood.fdc.rm-rf.it>
next in thread | previous in thread | raw e-mail | index | archive | help
* [Wed, Mar 17, 2021 at 11:22:43AM +0100] Gian Piero Carrubba: >As soon as I modify pkg.conf for including the lines > > pkg_env: { > http_proxy: "http://myproxy:9999" > } > >I cannot override the setting anymore. > ># pkg -o http_proxy=myotherproxy:8008 update ># pkg -o http_proxy= update #this is the case I'm mostly interested on For reference, the solution is: # pkg -o PKG_ENV=envvar1=value1,envvar2=value2,... command So, in my case: # pkg -o PKG_ENV=http_proxy= update While I've tried it before, I failed to have it work because, when used in combination with the '-o' option, PKG_ENV *must* be spelled uppercase. In order to set an environment variable to the null value, you have to put it at the end: # pkg -o PKG_ENV=empty=,valued=1 config pkg_env empty: ,valued=1 valued: 1 It seems there's no way to null more than one variable at once (but I could have misread the source).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210402080348.zhojt2ywohx7d74v>