Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 892339 Details for
Bug 1094065
[PATCH] --last option does not sort correctly with some non-en locales
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Fix rpm --last sorting with some non-en locales
0001-Fix-last-sorting-with-non-en-locales.patch (text/plain), 1.93 KB, created by
larchunix
on 2014-05-04 21:25:58 UTC
(
hide
)
Description:
Fix rpm --last sorting with some non-en locales
Filename:
MIME Type:
Creator:
larchunix
Created:
2014-05-04 21:25:58 UTC
Size:
1.93 KB
patch
obsolete
>From 446404276266205c7c661ec8b8f23956f2e316f8 Mon Sep 17 00:00:00 2001 >From: Denis Ollier <larchunix@gmail.com> >Date: Sun, 4 May 2014 22:34:48 +0200 >Subject: [PATCH] Fix --last sorting with non-en locales > >On some locales (e.g: french), sort interprets the space character as a >thousands separator. As a result, digit(s) at the beginning of package >names (e.g: '0' for 0ad), are merged with package installation >timestamp and the output of rpm -qa --last is wrong. > >For instance, the following list: > > 1398777401 0ad-0.0.15-3.fc20.x86_64 > 1397901236 kernel-3.13.10-200.fc20.x86_64 > 1399198174 kernel-3.14.2-200.fc20.x86_64 > >is sorted like this: > > 1398777401 0ad-0.0.15-3.fc20.x86_64 > 1399198174 kernel-3.14.2-200.fc20.x86_64 > 1397901236 kernel-3.13.10-200.fc20.x86_64 > >instead of: > > 1399198174 kernel-3.14.2-200.fc20.x86_64 > 1398777401 0ad-0.0.15-3.fc20.x86_64 > 1397901236 kernel-3.13.10-200.fc20.x86_64 > >This patch ensures that the space character is not interpreted as a >thousands separator anymore by setting the environment variable >LC_NUMERIC to C locale for numeric sorts. >--- > rpmpopt.in | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/rpmpopt.in b/rpmpopt.in >index 036ab4e..fe4f40f 100644 >--- a/rpmpopt.in >+++ b/rpmpopt.in >@@ -116,7 +116,7 @@ rpm alias --triggers --triggerscripts \ > --POPTdesc=$"list trigger scriptlets from package(s)" > > rpm alias --last --qf '%|INSTALLTIME?{%{INSTALLTIME}}:{000000000}| %{NVRA} %|INSTALLTIME?{%{INSTALLTIME:date}}:{(not installed)}|\n' \ >- --pipe "sort -r -n | sed 's,^[0-9]\+ ,,' | awk '{printf(\"%-45s %-s\n\", $1, substr($0,length($1)+2))}' " \ >+ --pipe "LC_NUMERIC=C sort -r -n | sed 's,^[0-9]\+ ,,' | awk '{printf(\"%-45s %-s\n\", $1, substr($0,length($1)+2))}' " \ > --POPTdesc=$"list package(s) by install time, most recent first" > > rpm alias --dupes --qf '%|SOURCERPM?{%{name}.%{arch}}:{%|ARCH?{%{name}}:{%{name}-%{version}}|}|\n' --pipe "sort | uniq -d" \ >-- >1.9.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1094065
: 892339