Bug 7883 - find-provides does not correctly extract symbol versions when locale is not english
Summary: find-provides does not correctly extract symbol versions when locale is not e...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords: NEEDINFO, PATCH
Depends on:
Blocks:
 
Reported: 2012-10-23 14:19 CEST by Olivier Blin
Modified: 2012-10-24 01:34 CEST (History)
3 users (show)

See Also:
Source RPM: rpm-mageia-setup
CVE:
Status comment:


Attachments
is that fix enough? (437 bytes, patch)
2012-10-23 14:31 CEST, Thierry Vignaud
Details | Diff

Description Olivier Blin 2012-10-23 14:19:03 CEST
The find-provides script does not correctly extract symbol versions when locale is not english, because the objdump output can be localized.
Thus, this will not work as expected with a non-english locale:
	    objdump -p $f 2>/dev/null | awk '
		BEGIN { START=0 ; }
		/Version definitions:/ { START=1; }
		/^[0-9]/ && (START==1) { print $4; }
		/^$/ { START=0; }
	    '

For example, when rebuilding gcc with a french locale, the generated libstdc++6 package is missing this kind of provides:
libstdc++.so.6(CXXABI_TM_1)
libstdc++.so.6(CXXABI_TM_1)(64bit)
libstdc++.so.6(GLIBCXX_3.4)
libstdc++.so.6(GLIBCXX_3.4)(64bit)
Comment 1 Thierry Vignaud 2012-10-23 14:31:22 CEST
Created attachment 2983 [details]
is that fix enough?
Thierry Vignaud 2012-10-23 14:31:31 CEST

Keywords: (none) => NEEDINFO, PATCH

Comment 2 Olivier Blin 2012-10-23 14:53:33 CEST
That's enough for my bug, but shouldn't we export LC_ALL=C at top of the file?
There may be other issues, like sorting behavior, or localized output of other commands.
Same holds for find-requires.
Comment 3 Thierry Vignaud 2012-10-24 01:17:18 CEST
Fixed

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 4 Olivier Blin 2012-10-24 01:34:01 CEST
Thanks dear

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