RPM Community Forums

Mailing List Message of <rpm-users>

Re: Two small bugs in popt-1.15

From: Jeff Johnson <n3npq@mac.com>
Date: Fri 28 Aug 2009 - 02:14:32 CEST
Message-id: <D70F273E-B326-42B2-AF4D-7C603D97A20C@mac.com>

On Aug 27, 2009, at 6:21 PM, Charles Wilson wrote:

> Typo in libpopt.vers, and extra ';' in popthelp.c.  The second error
> only causes problems if you explicitly #undef POPT_WCHAR_HACK at the  
> top
> of the file -- which I had to do because my platform doesn't support
> mbsrtowcs.
>

Fixes checked in.

BTW, you are unlikely to find joy with POPT_WCHAR_HACK undefined.
The issue has been there -- unfinished -- since popt-1.11.

Several patches were sent to fix --help alignment problems
were sent from someone (from Sun iirc) on the GNOME project
were sent. Unfortunately, the patches broken non-UTF8 alignment.

popt has flip-flopped several times on aligned --help displays
with mixed (and iconv() retrofitted) PO file encodings.

I have a reproducer for the non-UTF8 issues, but not for the
UTF8 issues requested by GNOME. I do not even know what PO
file illustrated the retro-fit fixing in popt, nor can
I read JA/KO.

So you can expect --help alignment issues with (iirc) UTF-8 encoded
PO files until I actually get a reproducer for whatever issue is
involved.

If you know anyone interested in solving the problem, well, so am I.

Meanwhile --help alignment hardly matters to popt option processing.

Thanks for the patches.

73 de Jeff

> diff -urN old/popt-1.15/libpopt.vers new/popt-1.15/libpopt.vers
> --- old/popt-1.15/libpopt.vers	2009-04-12 03:08:59.000000000 -0400
> +++ new/popt-1.15/libpopt.vers	2009-08-27 18:18:27.069500000 -0400
> @@ -11,7 +11,7 @@
>     poptBadOption;
>     poptConfigFileToString;
>     poptDupArgv;
> -    poptFinit;
> +    poptFini;
>     poptFreeContext;
>     poptGetArg;
>     poptGetArgs;
> diff -urN old/popt-1.15/popthelp.c new/popt-1.15/popthelp.c
> --- old/popt-1.15/popthelp.c	2009-04-12 14:14:38.000000000 -0400
> +++ new/popt-1.15/popthelp.c	2009-08-27 18:18:39.353500000 -0400
> @@ -144,7 +144,7 @@
>     n = mbsrtowcs (NULL, &s, n, &t);
> #else
>     n = 0;
> -    for (; *s; s = POPT_next_char(s));
> +    for (; *s; s = POPT_next_char(s))
> 	n++;
> #endif
>
>
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> User Communication List                             rpm-users@rpm5.org
Received on Fri Aug 28 02:15:08 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.