Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 131355 - net-dns/djbdns using obsolete sort parameters
Summary: net-dns/djbdns using obsolete sort parameters
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Michael Hanselmann (hansmi) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-26 09:00 UTC by Kevin Korb
Modified: 2006-04-26 13:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Korb 2006-04-26 09:00:32 UTC
The /usr/bin/dnstracesort script installed by net-dns/djbdns (including the latest masked ebuild) contains this line:

' | sort -t: +0 -2 +4 +3 -4 +2 -3 | uniq | awk -F: '

This syntax is no longer supported by the sort command from coreutils and needs to be updated.
Comment 1 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2006-04-26 11:26:31 UTC
Can you provide a patch, please?
Comment 2 Kevin Korb 2006-04-26 12:55:22 UTC
I don't really feel like decoding the new sort syntax which is very ugly so here is a quick shortcut...

--- dnstracesort.orig   2006-04-26 15:52:53.000000000 -0400
+++ dnstracesort        2006-04-26 15:52:28.000000000 -0400
@@ -14,7 +14,7 @@
     }
     print
   }
-' | sort -t: +0 -2 +4 +3 -4 +2 -3 | uniq | awk -F: '
+' | _POSIX2_VERSION=199209 sort -t: +0 -2 +4 +3 -4 +2 -3 | uniq | awk -F: '
   {
     type = $1
     q = $2


Of course the GNU people can always break that again which they seem to like to do.
Comment 3 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2006-04-26 12:58:59 UTC
In the mean time, I came up with this:

-' | sort -t: +0 -2 +4 +3 -4 +2 -3 | uniq | awk -F: '
+' | sort -t: -k 1,3 -k 5 -k 4,5 -k 3,4 | uniq | awk -F: '

Does this look better than yours? I can't test the old syntax, because I've no system such an old sort.
Comment 4 Kevin Korb 2006-04-26 13:07:03 UTC
It seems to work fine either way.

Mine modifies less of DJB's code but I have no idea how long sort will maintain that compatibility feature so yours is probably a better idea.

Your sort params were accepted by the sort on my OpenBSD system which is:
# sort --version
sort (GNU textutils) 2.0
Written by Mike Haertel.
Comment 5 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2006-04-26 13:09:47 UTC
Thanks for the confirmation. I added my patch to the tree a few minutes ago. The ebuild will go stable in a few days. No need to stay in unstable because of this minor fix.
Comment 6 Kevin Korb 2006-04-26 13:13:14 UTC
Agreed.  This is a minor fix to a component that almost nobody uses anyways.

Thanks.