Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 67742 - gettext's msginit does not really use the GETTEXTLIBDIR enviroment variable
gettext's msginit does not really use the GETTEXTLIBDIR enviroment variable
Product: Red Hat Linux
Classification: Retired
Component: gettext (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
Aaron Brown
Depends On:
  Show dependency treegraph
Reported: 2002-07-01 09:20 EDT by George Barbarosie
Modified: 2007-04-18 12:43 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-07-04 05:46:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description George Barbarosie 2002-07-01 09:20:25 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/20020606

Description of problem:
gettext's msginit is supposed to use the enviroment var GETTEXTLIBDIR to
indicate where the project-id and user-email scripts are stored. Now, while
project-id can be moved to a different libdir, msginit will continue to look for
 user-email in the default /user/lib/gettext/user-email.

How reproducible:

Steps to Reproduce:
1) do smth about bug #67741 ;)
2) move all /usr/lib/gettext/ to some /custom_lib/gettext/
3) export GETTEXTLIBDIR="/custom_lib/gettext/
4) create a project-version; 
5) xgettext files to get a po/PROJ.pot
6) cd po; LANG="fr_FR" msginit

Actual Results: 
will complain about:

/usr/lib/gettext/user-email: /usr/lib/gettext/user-email: No such file or directory
msginit: /usr/lib/gettext/user-email subprocess I/O error

Expected Results:
ask about email validity; create fr_FR.po; no errors;

Additional info:

I did not check to see if other gettext utils are supposed to use GETTEXTLIBDIR
and if they really obey by it. But, for msginit, here's the patch to fix this:

--- msginit.c.orig      Mon Jul  1 16:19:56 2002
+++ msginit.c   Mon Jul  1 16:21:38 2002
@@ -1062,7 +1062,8 @@
 static const char *
 get_user_email ()
-  char *prog = concatenated_pathname (LIBDIR, "gettext/user-email", NULL);
+  char *gettextlibdir;
+  char *prog;
   char *argv[4];
   pid_t child;
   int fd[1];
@@ -1072,6 +1073,12 @@
   size_t linelen;
   int exitstatus;
+  gettextlibdir = getenv ("GETTEXTLIBDIR");
+  if (gettextlibdir == NULL || gettextlibdir[0] == '\0')
+    gettextlibdir = concatenated_pathname (LIBDIR, "gettext", NULL);
+  prog = concatenated_pathname (gettextlibdir, "user-email", NULL);
   /* Ask the user for his email address.  */
   argv[0] = "/bin/sh";
   argv[1] = prog;
Comment 1 Trond Eivind Glomsrxd 2002-07-03 15:45:20 EDT
Where is GETTEXTLIBDIR documented?
Comment 2 George Barbarosie 2002-07-04 05:46:40 EDT
Except for two references in the po/Changelog and for the explicit use in
msginit.c, nowhere indeed. Suit yourself then.
Comment 3 Trond Eivind Glomsrxd 2002-07-09 11:35:33 EDT
Ok, just wondered since I couldn't find any docs about it. I'd recommend you
send your patch upstream to see if you can get any feedback on it.
Comment 4 Bruno Haible 2003-02-17 10:50:25 EST
Indeed GETTEXTLIBDIR is not documented. (Its only purpose is for "make check"
to work before "make install".) If you want to install gettext with a different
libdir, rebuild it with "configure --libdir=...".

Note You need to log in before you can comment on or make changes to this bug.