
Andreas Jaeger is not on the time zone list; be sure to include Andreas in any reply. --ado ---------- From: Andreas Jaeger[SMTP:aj@arthur.rhein-neckar.de] Sent: Thursday, January 15, 1998 3:34 PM To: tz@elsie.nci.nih.gov Subject: zic using hardlinks:-( Hi, I received the following bug report for GNU libc. Jochen says that using a hard link doesn't work for his system since /etc and /usr/share are on different filesystems. zic is from tzcode1997h. I see three possibilities: - changing the link call in zic.c to symlink. - if link fails with error EXDEV (oldpath and newpath are not on the same filesystem) retry with a symlink. - leave it the way it is. Should symbolic links used in general or only for localtime? Andreas -- Andreas Jaeger aj@arthur.rhein-neckar.de
Number: 413 Category: libc Synopsis: `zic -l' tries to hard link a file between different disk partitions Confidential: no Severity: non-critical Priority: low Responsible: libc-gnats State: open Class: sw-bug Submitter-Id: unknown Arrival-Date: Thu Jan 15 07:32:17 EST 1998 Last-Modified: Originator: Jochen Voss Organization: Department of Mathematics, University of Kaiserslautern/Germany Release: libc-2.0.6 Environment: Host type: i486-pc-linux-gnu System: Linux tatonka 2.0.33 #2 Fri Jan 9 20:20:45 MET 1998 i486 Architecture: i486
Addons: localedata crypt linuxthreads Build CFLAGS: -O3 -m486 -fomit-frame-pointer Build CC: gcc -B$(common-objpfx) Build shared: yes Build profile: no Build omitfp: no Stdio: libio
Description: The command "zic -l MET" should set the local time zone by linking the file "/usr/share/zoneinfo/MET" to "/etc/localtime". It uses a hard link for this purpose. On my system this fails, because the directories "/etc" and "/usr/share/zoneinfo" are located on different disk partitions on my system. This results in the output
zic: Kann nicht von /usr/share/zoneinfo/MET nach /etc/localtime linken: Ungltiger Link ber Gertegrenzen hinweg when I execaute the above command (obviously I use `LANG=de').
How-To-Repeat: Find a system, which uses disk partitions as described above, and execute the command "zic -l MET". Fix: Modify the code in "time/zic.c" to use symlinks (if available) or to copy the file if the hard link fails. Audit-Trail: Unformatted:

Andreas Jaeger schrieb:
I see three possibilities: - changing the link call in zic.c to symlink. - if link fails with error EXDEV (oldpath and newpath are not on the same filesystem) retry with a symlink. - leave it the way it is.
I suggest a slightly more complex, but more generally useful, solution. Have a configuration variable such as HAVE_SYMLINKS. If defined, use a symlink always. If not defined, try to make a hard link, and if that fails, copy the file. Hard links (and copies) are Posix, but symlinks are not, and those of us who use Posix-but-not-Unix will not be pleased if symlinks are the only option.
Should symbolic links used in general or only for localtime?
In the main directory, only hard links should be used; this permits people who wish to do so, to delete any undesired entries without worrying about it. Symlinks are suitable when there is a "real name" and an "alias", but in the tz context it is not clear that any name is "realer" than any other. Hard links preserve this equality. -- John Cowan cowan@ccil.org e'osai ko sarji la lojban.
participants (2)
-
John Cowan
-
Olson, Arthur David