Bug 329983 - Possibly wrong locale selected for testtrash
Summary: Possibly wrong locale selected for testtrash
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: trash (show other bugs)
Version: 4.11.5
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-15 00:44 UTC by Lisandro Damián Nicanor Pérez Meyer
Modified: 2017-05-13 16:58 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lisandro Damián Nicanor Pérez Meyer 2014-01-15 00:44:33 UTC
kioslave/trash/tests/testtrash.cpp::60 selects "en_US.utf-8" as locale for the tests. This results in a problem on a clean chroot, as you have to install the locale to be able to use it, else the tests will fail. A simple workaround is using "C.UTF-8" which is normally available on all setups.

Reproducible: Always

Steps to Reproduce:
Run testtrash on a system without the "en_US.utf-8" locale.
Comment 1 David Faure 2017-01-14 12:59:41 UTC
Git commit 459411055bb1236caf5d25d83fd4a62a58279fce by David Faure.
Committed on 14/01/2017 at 12:59.
Pushed by dfaure into branch 'master'.

Use C rather than en_US so that the locale doesn't have to be installed

M  +1    -1    src/ioslaves/trash/tests/testtrash.cpp

https://commits.kde.org/kio/459411055bb1236caf5d25d83fd4a62a58279fce
Comment 2 Maximiliano Curia 2017-04-04 09:11:21 UTC
(In reply to David Faure from comment #1)
> Git commit 459411055bb1236caf5d25d83fd4a62a58279fce by David Faure.
> Committed on 14/01/2017 at 12:59.
> Pushed by dfaure into branch 'master'.
> 
> Use C rather than en_US so that the locale doesn't have to be installed
> 
> M  +1    -1    src/ioslaves/trash/tests/testtrash.cpp
> 
> https://commits.kde.org/kio/459411055bb1236caf5d25d83fd4a62a58279fce

Please be aware that C.UTF-8 is a Debian (and derivatives) specific locale name (generated at build time by the debian/rules.d/build.mk file), and afaik, it hasn't been added to the vanilla glib's locale. So you might need to use plain "C" if C.UTF-8 is not available.

Happy hacking,
Comment 3 David Faure 2017-05-13 16:58:28 UTC
It works for me on OpenSuSE...