FW: zic using hardlinks:-(

Olson, Arthur David OLSONA at dc37a.nci.nih.gov
Sat Jan 17 19:31:18 UTC 1998

Andreas Jaeger is not on the time zone list; be sure to include Andreas
in any reply.


From: 	Andreas Jaeger[SMTP:aj at arthur.rhein-neckar.de]
Sent: 	Thursday, January 15, 1998 3:34 PM
To: 	tz at elsie.nci.nih.gov
Subject: 	zic using hardlinks:-(


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 Jaeger   aj at 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
>Originator:     Jochen Voss
 Department of Mathematics, University of Kaiserslautern/Germany
>Release:        libc-2.0.6
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

	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').
	Find a system, which uses disk partitions as described above,
	and execute the command "zic -l MET".
	Modify the code in "time/zic.c" to use symlinks (if available)
	or to copy the file if the hard link fails.

More information about the tz mailing list