Subject: pkg/19425: cscope -q fails because sort doesn't support -y option
To: None <gnats-bugs@gnats.netbsd.org>
From: None <istvan+nb@redback.com>
List: netbsd-bugs
Date: 12/16/2002 23:30:28
>Number:         19425
>Category:       pkg
>Synopsis:       cscope -q fails because sort doesn't support -y option
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 16 23:31:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Istvan Marko
>Release:        1.6
>Organization:
>Environment:
NetBSD dys 1.6 NetBSD 1.6 (DYS) #31: Sat Sep  7 17:01:11 PDT 2002 notroot@dys:/netbsd15/nbsrc16/sys/arch/i386/compile/DYS i386
>Description:
Running "cscope -q" fails with "sort: unknown option -- y" because the new sort version shipped with NetBSD 1.6 doesn't know about the -y option. -y is some wacky Solaris compatibility option, it is just ignored in GNU sort. 
>How-To-Repeat:
cd /usr/pkgsrc/devel/cscope
make install
cd .../some/src/dir
cscope -q

>Fix:
--- cscope-15.3.orig/src/main.c Fri Jun  1 05:43:24 2001
+++ cscope-15.3/src/main.c      Mon Dec 16 23:08:10 2002
@@ -1056,7 +1056,7 @@
                }
                (void) fstat(fileno(postings), &statstruct);
                (void) fclose(postings);
-               (void) sprintf(sortcommand, "env LC_ALL=C sort -y -T %s %s", tmpdir, temp1);
+               (void) sprintf(sortcommand, "env LC_ALL=C sort -T %s %s", tmpdir, temp1);
                if ((postings = mypopen(sortcommand, "r")) == NULL) {
                        (void) fprintf(stderr, "cscope: cannot open pipe to sort command\n");
                        cannotindex();

>Release-Note:
>Audit-Trail:
>Unformatted: