[xen-tools-dev] apt-proxy setting (was Bug#610457...)
Alex Tomlins
alex.tomlins at unboxedconsulting.com
Mon Apr 4 16:07:19 CEST 2011
On 31/03/2011 18:36, Alex Tomlins wrote:
> On 31/03/11 15:29, Alex Tomlins wrote:
>> On 31/03/11 15:00, Axel Beckert wrote:
>>> Hi Alex,
>>>
>>> Alex Tomlins wrote:
>>>>>> I've implemented this here:
>>>>>> https://gitorious.org/~alext/xen-tools/alext-xen-tools/commits/apt_proxy
>>>>> Thanks!
>>>>>
>>>>> From a first glance it looks good and I'll probably include your
>>>>> patches. I'd though change two things:
>>>>>
>>>>> * Change the option's name from apt_proxy to apt-proxy.
>>>> Makes sense. I wasn't sure which way to go as the existing options seem
>>>> to use a mixture.
>>> Well, yeah, historically grown. But I'd prefer to not have underscores
>>> in long options. Maybe we'll once change all of them to dashes, but
>>> supoort underscores for backwards-compatibility.
>>>
>>
> I've realised a problem here... xen-create-image exports all the
> config variables as ENV vars so that they're available to the hook and
> role scripts. The trouble is that bash doesn't seem to like variables
> with - in them, I'm pretty sure it's not valid.
>
> I guess either they need to all use the _ variant, or when exporting
> the environment the names need to be converted to use the _ variant.
> That way they'd use the - variant on the commandline and in the
> %CONFIG hash, but would use the _ variant in the %ENV hash, and in
> hook scripts etc...
>
> There's even an argument for it to treat - and _ interchangeably both
> on the commandline and in the config file.
>
> I'd be happy to take this on if it's considered a good idea.
>
Ok, I've made a small change to exportEnvironment in xen-create-image so
that it converts - to _ in variable names. This option now works well
as apt-proxy, and is referenced as apt_proxy within the hook scripts.
I've pushed this up to my apt_proxy branch on gitorious, and updated the
merge request.
thanks,
Alex
--
Alex Tomlins
Unboxed
Consulting
E: alex.tomlins at unboxedconsulting.com
<mailto:alex.tomlins at unboxedconsulting.com>
M: +44 7824 696 890
T: +44 20 3137 2930
F: +44 20 7183 4251
17 Blossom Street
London, E1 6PL
United Kingdom
www.unboxedconsulting.com <http://www.unboxedconsulting.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://xen-tools.org/pipermail/xen-tools-dev/attachments/20110404/416cab36/attachment.htm>
More information about the xen-tools-dev
mailing list