(Resending with correct mailing list address.) Hi, when checking a diff between tzcode2006o and the current glibc CVS, I've noticed two changes in glibc which were AFAICS never pushed upstream. Both were committed by Ulrich Drepper: [PATCH] (tofile;): Fix typo in symlink creation. Tue, 20 Dec 2005 07:55:45 +0000 timezone/zic.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/timezone/zic.c b/timezone/zic.c index 57dc531..4e3f42f 100644 --- a/timezone/zic.c +++ b/timezone/zic.c @@ -650,7 +650,7 @@ const char * const tofile; "../"); symlinkcontents = ecatalloc(symlinkcontents, - fromfile); + fromname); result = symlink(symlinkcontents, toname); if (result == 0) [PATCH] Fix spelling in message. Thu, 21 Sep 2006 03:57:30 +0000 timezone/zdump.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/timezone/zdump.c b/timezone/zdump.c index 45ce641..d525da1 100644 --- a/timezone/zdump.c +++ b/timezone/zdump.c @@ -389,7 +389,7 @@ _("%s: usage is %s [ --version ] [ -v ] } if (fflush(stdout) || ferror(stdout)) { (void) fprintf(stderr, "%s: ", progname); - (void) perror(_("Error writing standard output")); + (void) perror(_("Error writing to standard output")); exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); -- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ The meaning of Stonehenge in Traflamadorian, when viewed from above, is: "Replacement part being rushed with all possible speed." -- Kurt Vonnegut, Sirens from Titan
diff --git a/timezone/zic.c b/timezone/zic.c index 57dc531..4e3f42f 100644 --- a/timezone/zic.c +++ b/timezone/zic.c @@ -650,7 +650,7 @@ const char * const tofile; "../"); symlinkcontents =
ecatalloc(symlinkcontents,
- fromfile); + fromname); result = symlink(symlinkcontents, toname); if (result == 0)
I don't believe so. "fromname" is the time zone name that appears in the input files; "fromfile" is this name with the name of the directory where output is supposed to go prepended. Using "fromname" above would yield the moral equivalent of "/America/New_York" as a symbolic link, which is not what we want.
diff --git a/timezone/zdump.c b/timezone/zdump.c index 45ce641..d525da1 100644 --- a/timezone/zdump.c +++ b/timezone/zdump.c @@ -389,7 +389,7 @@ _("%s: usage is %s [ --version ] [ -v ] } if (fflush(stdout) || ferror(stdout)) { (void) fprintf(stderr, "%s: ", progname); - (void) perror(_("Error writing standard output")); + (void) perror(_("Error writing to standard output")); exit(EXIT_FAILURE); } exit(EXIT_SUCCESS);
I'll go ahead and buy this change (if only to make the lives of GNU folks easier).
Olson, Arthur David (NIH/NCI) [E] wrote:
I don't believe so. "fromname" is the time zone name that appears in the input files;
fromname is the completed file name, an absolute path. fromfile can be relative name. If it is, then then filename is extended by prepending the common directory name. In the code the patch is changing symlinkcontents is a first prepended with enough ../ to get to the root directory. Then in your version fromfile is appended. This is wrong when fromfile is not an absolute path. fromname is the correct value. -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----Original Message----- From: Olson, Arthur David (NIH/NCI) [E]
diff --git a/timezone/zic.c b/timezone/zic.c index 57dc531..4e3f42f 100644 --- a/timezone/zic.c +++ b/timezone/zic.c @@ -650,7 +650,7 @@ const char * const tofile; "../"); symlinkcontents =
ecatalloc(symlinkcontents,
- fromfile); + fromname); result = symlink(symlinkcontents, toname); if (result == 0)
I don't believe so. "fromname" is the time zone name that appears in the input files; "fromfile" is this name with the name of the directory where output is supposed to go prepended. Using "fromname" above would yield the moral equivalent of "/America/New_York" as a symbolic link, which is not what we want.
It appears that this change was submitted despite Arthur's comment. This impact is that symlinks are created with absolute path names rather than relative path names. This isn't a big deal if the link is being created directly on the target system. It does impact anyone who attempts to build/install in a non-standard location and then installs the files in the correct location on the target system. This is often the case when cross compiling or when building packages as a non-root userid. I would prefer to see fromfile used rather than fromname to keep the soft links relative. Gary
Gary Mussar wrote:
I would prefer to see fromfile used rather than fromname to keep the soft links relative.
You can prefer whatever you want and create a binary accordingly. We use the change for many y ears now and it was created because there were problems otherwise. The beauty of free software is you can do whatever you want. I'm not going to change anything. -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
participants (4)
-
Gary Mussar -
Olson, Arthur David (NIH/NCI) [E] -
Petr Baudis -
Ulrich Drepper