"zic -l" complains about "empty component" in /etc/localtime
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
Thanks for the bug report. I installed the attached more-elaborate patch into the experimental version on github. It should fix the problem in a different way.
On Tue, May 19, 2015 at 5:27 AM, Paul Eggert <eggert@cs.ucla.edu> wrote:
Thanks for the bug report. I installed the attached more-elaborate patch into the experimental version on github. It should fix the problem in a different way.
Thanks for the patch. Works well here. Leonardo
participants (2)
-
Leonardo Chiquitto -
Paul Eggert