Subject: Re: linuxls core dumps
To: Scott Barron <sb125499@oak.cats.ohiou.edu>
From: Frederick Bruckman <fredb@immanent.net>
List: current-users
Date: 05/11/2002 11:39:51
On Sat, 11 May 2002, Scott Barron wrote:

> On Sat, May 11, 2002 at 01:05:02PM +0200, Julio Merino wrote:
> >
> > linuxls --color=auto
> >
> > It coredumps for me. Using --color alone works fine, but when using = to
> > add some argument, it fails. Maybe is a problem in gnu getopt? Or in
> > linuxls?

> The cause of the failure is in the color-ls-3.12.0.2.patch.gz that
> pkgsrc applies.  I'm not sure who maintains this or what the procedure
> for patching a patch is.  Adding a NULL to the end of color_args (ends
> up in src/ls.c:599 after the color-ls patch is applied) seems to correct
> the problem.  What is the procedure for fixing this kind of patch (one
> that is not in patches/ but fetched)?

The patches in ${PATCHDIR} are applied after the ${PATCHFILES}
patches, so you can copy "src/ls.c" to "src/ls.c.orig", fix the file,
then generate the patch for ${PATCHDIR} the ordinary way (via
"mkpatches"  or whatever). Of course you don't want the diff from
"src/ls.c.orig" left by the ${PATCHFILES} patch -- that would lead to
"patch" complaining that the patch had already been applied.

You might follow with "make distinfo; make clean; make" to verify that
the patch applies cleanly, and that the package still builds, and that
that fixes the problem. You could then submit a problem report (with
"send-pr"), category "pkg". There's a huge backlog, but the easy ones
often get picked up quickly (no promises).

Frederick