[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
debian gettext and java
From: |
Santiago Vila |
Subject: |
debian gettext and java |
Date: |
Fri, 8 Jul 2005 18:54:42 +0200 (CEST) |
Hello.
Some time ago somebody submitted a bug about strange java messages
being shown when using msginit, see http://bugs.debian.org/244215.
A little bit naively (I admit), I decided to fix this by building
gettext using gcj, but as a side effect, the gettext package ended up
depending on libgcj4, which is a very big package, and nobody was
happy with this.
A closer look at the problem in #244215 (thanks go to Denis Barbier)
showed that the ugly warning message could be avoided with little effort.
Quoting Denis:
> I did not have a close look at gnu.gettext.DumpResource, but
> gnu.gettext.GetURL (which triggered #244215) is only used by
> /usr/lib/gettext/urlget. Now have a look at
> gettext-tools/src/urlget.c and you will see that the fetch() command
> tries several scenarios to download a file from an URL. For all
> except gnu.gettext.GetURL, it first checks whether the tool seems to
> work (here nothing is sent do stdout or stderr), and then perform the
> download with normal stdout and stderr so that problems can be
> reported. So #244215 is due to the fact that gnu.gettext.GetURL is
> run without first checking whether it can run. A fix is to let
> gnu.gettext.GetURL.main handle a --version option, and treat
> gnu.gettext.GetURL like other alternatives in the fetch() function.
So what I did as a simple and effective fix to remove the ugly warning
was to apply the following patch to the Debian gettext package:
diff -ru gettext-0.14.5.orig/gettext-tools/src/urlget.c
gettext-0.14.5/gettext-tools/src/urlget.c
--- gettext-0.14.5.orig/gettext-tools/src/urlget.c 2005-05-20
22:44:41.000000000 +0200
+++ gettext-0.14.5/gettext-tools/src/urlget.c 2005-05-25 19:37:23.657696728
+0200
@@ -239,7 +239,7 @@
fetch (const char *url, const char *file)
{
/* First try: using Java. */
- {
+ if (0) {
const char *class_name = "gnu.gettext.GetURL";
const char *gettextjexedir;
const char *gettextjar;
and then added a fields "Recommends: curl | wget | lynx" to the package
to ensure that people honoring the recommends have at least one of the
other alternatives.
However, it would be nice if gnu.gettext.GetURL.main could handle
a --version option, as suggested by Denis, so that I do not need to
disable the java part in urlget.c. This is currently the only
modification (other than the debian/* files) which the Debian gettext
package makes to the original source.
Thanks.
- debian gettext and java,
Santiago Vila <=