[pkg-golang-devel] Add tzdata to golang-go install dependencies?
Potter, Tim (HPE Linux Support)
timothy.potter at hpe.com
Wed Oct 5 10:50:21 UTC 2016
Hi everyone. Lucas Nussbaum recently filed a bunch of serious priority bugs again
various golang packages - 839474, 839461, 839433, 839417. These bugs can be
easily fixed by adding tzdata as a build dependency to each of the packages in
question. Mostly the issues are related to accessing timezone data in tests caused
by the tzdata package being reduced in priority (and Lucas' stretch chroot not having
I was wondering if there was a better solution though. In 839474 an error is caused by
the tests calling time.LoadLocation() and this causing a runtime error. Would it not
make more sense to have tzdata always installed by adding it as an install dependency?
The documentation for time.LoadLocation() says:
If the name is "" or "UTC", LoadLocation returns UTC. If the name is "Local", LoadLocation returns Local.
Otherwise, the name is taken to be a location name corresponding to a file in the IANA Time Zone database, such as "America/New_York".
The time zone database needed by LoadLocation may not be present on all systems, especially non-Unix systems. LoadLocation looks in the directory or uncompressed zip file named by the ZONEINFO environment variable, if any, then looks in known installation locations on Unix systems, and finally looks in $GOROOT/lib/time/zoneinfo.zip.
It seems a bit silly to leave it up to someone else to ensure that something as fundamental
as timezone data is installed. Realistically though, the package will probably be installed
anyway but it would be nice to make this explicit and not leave it up to the developer or
user to figure out why their Go application crashes.
Thoughts? I'm happy to do the build/test/upload part of things if that makes the decision easier. (-:
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
More information about the pkg-golang-devel