Bug 1094065 - [PATCH] --last option does not sort correctly with some non-en locales
Summary: [PATCH] --last option does not sort correctly with some non-en locales
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-04 21:25 UTC by larchunix
Modified: 2015-03-27 09:01 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-03-27 09:01:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Fix rpm --last sorting with some non-en locales (1.93 KB, patch)
2014-05-04 21:25 UTC, larchunix
no flags Details | Diff

Description larchunix 2014-05-04 21:25:58 UTC
Created attachment 892339 [details]
Fix rpm --last sorting with some non-en locales

The attached (oneliner) patch fix the following issue:

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.

Comment 1 Jaroslav Reznik 2015-03-03 15:45:41 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 2 Florian Festi 2015-03-27 09:01:15 UTC
Added upstream as 55735113178642ab4bcbd75c1adf7d7f9fc65894. Thanks for the patch! Sorry for the delay!


Note You need to log in before you can comment on or make changes to this bug.