[tz] "zic -l" complains about "empty component" in /etc/localtime

Leonardo Chiquitto leonardo.lists at gmail.com
Mon May 18 13:57:40 UTC 2015


Hello,

With 2015d I can no longer use "zic -l" to recreate /etc/localtime.
I'm getting the following error:

# ./zic -l America/Sao_Paulo
./zic: file name '/etc/localtime' contains empty component

If I comment out the check introduced by commit 0ddac5ef7e
in componentcheck(), then it works fine again:

# ./zic -l America/Sao_Paulo
# ls -lai /etc/localtime
1183669 -rw-r--r-- 5 root root 2015 May 17 20:20 /etc/localtime
# ls -lai /usr/share/zoneinfo/America/Sao_Paulo
1183669 -rw-r--r-- 5 root root 2015 May 17 20:20
/usr/share/zoneinfo/America/Sao_Paulo

A quick analysis: when "/etc/localtime" is passed to namecheck(),
in the first loop iteration componentcheck() will be called with all
three arguments set to "/etc/localtime". A possible fix is to skip
this call to componentcheck() in the first iteration (patch attached).

Leonardo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zic-empty-comp.patch
Type: text/x-patch
Size: 282 bytes
Desc: not available
URL: <http://mm.icann.org/pipermail/tz/attachments/20150518/4e0b874c/zic-empty-comp.patch>


More information about the tz mailing list