- popt: fix --usage (#62234).
authorjbj <devnull@localhost>
Thu, 25 Jul 2002 18:50:08 +0000 (18:50 +0000)
committerjbj <devnull@localhost>
Thu, 25 Jul 2002 18:50:08 +0000 (18:50 +0000)
CVS patchset: 5573
CVS date: 2002/07/25 18:50:08

33 files changed:
CHANGES
popt/po/cs.po
popt/po/da.po
popt/po/de.po
popt/po/es.po
popt/po/eu_ES.po
popt/po/fi.po
popt/po/fr.po
popt/po/gl.po
popt/po/hu.po
popt/po/id.po
popt/po/is.po
popt/po/it.po
popt/po/ja.po
popt/po/ko.po
popt/po/no.po
popt/po/pl.po
popt/po/popt.pot
popt/po/pt.po
popt/po/pt_BR.po
popt/po/ro.po
popt/po/ru.po
popt/po/sk.po
popt/po/sl.po
popt/po/sr.po
popt/po/sv.po
popt/po/tr.po
popt/po/uk.po
popt/po/wa.po
popt/po/zh.po
popt/po/zh_CN.GB2312.po
popt/popthelp.c
rpm.spec.in

diff --git a/CHANGES b/CHANGES
index 6d8d076..00bb19c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
        - add yellowdog as vendor.
        - python: remove the old initdb/rebuilddb methods, use ts.fooDB().
        - python: 1st crack at backport to 1.5.2.
+       - popt: fix --usage (#62234).
 
 4.0.3 -> 4.0.4:
        - solaris: translate i86pc to i386 (#57182).
index c86cd32..95285b6 100644 (file)
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: 2001-07-24 00:03+0100\n"
 "Last-Translator: Milan Kerslager <kerslage@linux.cz>\n"
 "Language-Team: Czech <cs@li.org>\n"
index 974b4ff..8db09dd 100644 (file)
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: Sun Jan 21 2001 04:30:32+0200\n"
 "Last-Translator: Martin Hansen <mah@k64.dk>\n"
 "Language-Team: Dansk <dansk@klid.dk>\n"
index 7bd8231..736af41 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index bbbf7ed..2f08e70 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: Leandro Lucarella <luca@linuxmendoza.org.ar>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 7bd8231..736af41 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 7bd8231..736af41 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 7bd8231..736af41 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index d058039..52fb006 100644 (file)
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: 2001-01-17 01:01+0100\n"
 "Last-Translator: Jesús Bravo Álvarez <jba@pobox.com>\n"
 "Language-Team: Galician <trasno@ceu.fi.udc.es>\n"
index 0f19c64..c6495bb 100644 (file)
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: 2000-08-03 23:26+0200\n"
 "Last-Translator: László Németh <nemeth@qwertynet.hu>\n"
 "Language-Team: Hungarian\n"
index 7bd8231..736af41 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 6cf08c8..eee26a0 100644 (file)
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: 2001-06-08 01:35+0000\n"
 "Last-Translator: Richard Allen <ra@hp.is>\n"
 "Language-Team: is <kde-isl@mmedia.is>\n"
index 7bd8231..736af41 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 7bd8231..736af41 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 6d273f7..bdcb332 100644 (file)
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: 2001-09-06 20:06+0900\n"
 "Last-Translator: Jong-Hoon Ryu <redhat4u@netian.com>\n"
 "Language-Team: GNU Translation project <ko@li.org>\n"
index ee34aa8..50473e2 100644 (file)
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: 2001-06-27 11:05+0200\n"
 "Last-Translator: Kjartan Maraas <kmaraas@online.no>\n"
 "Language-Team: Norwegian <no@li.org>\n"
index 7bd8231..736af41 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 98699ad..1e7c603 100644 (file)
@@ -7,7 +7,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 156435f..87c0065 100644 (file)
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: 2002-02-13 18:32+0000\n"
 "Last-Translator: Pedro Morais <morais@kde.org>\n"
 "Language-Team: pt <morais@kde.org>\n"
index 7bd8231..736af41 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index e6a8b34..f4fd8c1 100644 (file)
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: 2000-06-14 23:23+EST\n"
 "Last-Translator: Cristian Gafton <gafton@redhat.com>\n"
 "Language-Team: Romanian <ro@li.org>\n"
index a7d719e..d3e7880 100644 (file)
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: 2001-07-05 21:00-0500\n"
 "Last-Translator: Eugene Kanter <eugene@blackcatlinux.com>\n"
 "Language-Team: Black Cat Linux Team <blackcat-support@blackcatlinux.com>\n"
index 69dc5e4..2690d92 100644 (file)
@@ -5,7 +5,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: 1999-08-04 21:40+0200\n"
 "Last-Translator: Stanislav Meduna <stano@eunet.sk>\n"
 "Language-Team: Slovak <sk-i18n@rak.isternet.sk>\n"
index ea5ea88..0f97240 100644 (file)
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: 2000-09-05 12:30+0200\n"
 "Last-Translator: Roman Maurer <roman.maurer@hermes.si>\n"
 "Language-Team: Slovenian <sl@li.org>\n"
index 7bd8231..736af41 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index 1bf94d1..5a6f9ae 100644 (file)
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: 2001-07-12 22:26+0100\n"
 "Last-Translator: Christian Rose <menthos@menthos.com>\n"
 "Language-Team: Swedish <sv@li.org>\n"
index ea33233..371eb50 100644 (file)
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: 2000-02-11 13:01+0200\n"
 "Last-Translator: Nilgun Belma Buguner <nilgun@technologist.com>\n"
 "Language-Team: Turkish <tr@li.org>\n"
index 32bfb6e..a8b5f62 100644 (file)
@@ -5,7 +5,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: 1999-09-30 16:54+0200\n"
 "Last-Translator: Yuri Syrota <rasta@renome.rovno.ua>\n"
 "Language-Team: Ukrainian <uk@li.org>\n"
index 4752ade..b48a4de 100644 (file)
@@ -9,7 +9,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: 1999-03-18 23:11+0100\n"
 "Last-Translator: Nobody yet\n"
 "Language-Team: walon <linux-wa@chanae.alphanet.ch>\n"
index 7bd8231..736af41 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index b7cf54c..6522f81 100644 (file)
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: popt 1.6.3\n"
-"POT-Creation-Date: 2002-07-25 11:05-0400\n"
+"POT-Creation-Date: 2002-07-25 14:27-0400\n"
 "PO-Revision-Date: 1999-11-11 05:04+0800\n"
 "Last-Translator: Dillion Chen <dillon.chen@turbolinux.com.cn>\n"
 "Language-Team: TLDN\n"
index bb00e92..94af481 100644 (file)
@@ -521,24 +521,26 @@ static int singleOptionUsage(FILE * fp, int cursor,
        /*@globals fileSystem @*/
        /*@modifies *fp, fileSystem @*/
 {
-    int len = 3;
+    int len = 4;
     char shortStr[2] = { '\0', '\0' };
     const char * item = shortStr;
     const char * argDescrip = getArgDescrip(opt, translation_domain);
 
-fprintf(stderr, "*** singleOptionUsage(%p,%d,%p,%p)\n", fp, cursor, opt, translation_domain);
-    if (opt->shortName!= '\0' ) {
-       if (!(opt->argInfo & POPT_ARG_MASK)) 
-           return cursor;      /* we did these already */
+    if (opt->shortName != '\0' && opt->longName != NULL) {
+       len += 2;
+       if (!(opt->argInfo & POPT_ARGFLAG_ONEDASH)) len++;
+       len += strlen(opt->longName);
+    } else if (opt->shortName != '\0') {
        len++;
        shortStr[0] = opt->shortName;
        shortStr[1] = '\0';
     } else if (opt->longName) {
-       len += 1 + strlen(opt->longName);
+       len += strlen(opt->longName);
+       if (!(opt->argInfo & POPT_ARGFLAG_ONEDASH)) len++;
        item = opt->longName;
     }
 
-    if (len == 3) return cursor;
+    if (len == 4) return cursor;
 
     if (argDescrip) 
        len += strlen(argDescrip) + 1;
@@ -548,11 +550,19 @@ fprintf(stderr, "*** singleOptionUsage(%p,%d,%p,%p)\n", fp, cursor, opt, transla
        cursor = 7;
     } 
 
-    fprintf(fp, " [-%s%s%s%s]",
-       ((opt->shortName || (opt->argInfo & POPT_ARGFLAG_ONEDASH)) ? "" : "-"),
-       item,
-       (argDescrip ? (opt->shortName != '\0' ? " " : "=") : ""),
-       (argDescrip ? argDescrip : ""));
+    if (opt->shortName && opt->longName) {
+       fprintf(fp, " [-%c|-%s%s%s%s]",
+           opt->shortName, ((opt->argInfo & POPT_ARGFLAG_ONEDASH) ? "" : "-"),
+           opt->longName,
+           (argDescrip ? " " : ""),
+           (argDescrip ? argDescrip : ""));
+    } else {
+       fprintf(fp, " [-%s%s%s%s]",
+           ((opt->shortName || (opt->argInfo & POPT_ARGFLAG_ONEDASH)) ? "" : "-"),
+           item,
+           (argDescrip ? (opt->shortName != '\0' ? " " : "=") : ""),
+           (argDescrip ? argDescrip : ""));
+    }
 
     return cursor + len + 1;
 }
@@ -603,7 +613,6 @@ static int singleTableUsage(poptContext con, FILE * fp,
        /*@globals fileSystem @*/
        /*@modifies *fp, fileSystem @*/
 {
-fprintf(stderr, "*** singleTableUsage(%p,%p,%d,%p,%p)\n", con, fp, cursor, opt, translation_domain);
     /*@-branchstate@*/         /* FIX: W2DO? */
     if (opt != NULL)
     for (; (opt->longName || opt->shortName || opt->arg) ; opt++) {
index 8a60ad7..2c2c3db 100644 (file)
@@ -517,6 +517,7 @@ fi
 * Thu Jul 25 2002 Jeff Johnson <jbj@redhat.com>
 - python: remove the old initdb/rebuilddb methods, use ts.fooDB().
 - python: 1st crack at backport to 1.5.2.
+- popt: fix --usage (#62234).
 
 * Wed Jul 24 2002 Jeff Johnson <jbj@redhat.com> 4.1-0.55
 - imbue %ghost with missingok attribute with --verify (#68933).