[coreutils/f20] Fix sorting by non-first field (#1003544)
Ondrej Oprala
ooprala at fedoraproject.org
Mon Jan 6 10:58:33 UTC 2014
commit 46a2c860622959af539354c1a336222a32c4d83a
Author: Ondrej Oprala <ooprala at redhat.com>
Date: Mon Jan 6 11:49:28 2014 +0100
Fix sorting by non-first field (#1003544)
coreutils-i18n.patch | 10 +++++-----
coreutils.spec | 5 ++++-
2 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch
index c68ad94..ecebadc 100644
--- a/coreutils-i18n.patch
+++ b/coreutils-i18n.patch
@@ -3251,12 +3251,12 @@ diff -urNp coreutils-8.21-orig/src/sort.c coreutils-8.21/src/sort.c
+ diff = - NONZERO (lenb);
+ else if (lenb == 0)
+ diff = 1;
++ else if (hard_LC_COLLATE && !folding)
++ {
++ diff = xmemcoll0 (texta, lena, textb, lenb);
++ }
+ else
-+ {
-+ diff = memcmp (texta, textb, MIN (lena,lenb));
-+ if (!diff)
-+ diff = xmemcoll (texta, lena, textb, lenb);
-+ }
++ diff = memcmp (texta, textb, MIN (lena + 1,lenb + 1));
+
+ if (ignore || translate)
+ free (texta);
diff --git a/coreutils.spec b/coreutils.spec
index 26872e0..3c0cf57 100644
--- a/coreutils.spec
+++ b/coreutils.spec
@@ -1,7 +1,7 @@
Summary: A set of basic GNU tools commonly used in shell scripts
Name: coreutils
Version: 8.21
-Release: 19%{?dist}
+Release: 20%{?dist}
License: GPLv3+
Group: System Environment/Base
Url: http://www.gnu.org/software/coreutils/
@@ -375,6 +375,9 @@ fi
%{_sbindir}/chroot
%changelog
+* Mon Jan 06 2014 Ondrej Oprala <ooprala at redhat.com> 8.21-20
+- fix sorting by non-first field (#1003544)
+
* Fri Jan 03 2014 Ondrej Oprala <ooprala at redhat.com> 8.21-19
- reverted an old change and constricted it's condition
More information about the scm-commits
mailing list