Bug 329983

Summary: Possibly wrong locale selected for testtrash
Product: [Unmaintained] kio Reporter: Lisandro Damián Nicanor Pérez Meyer <perezmeyer>
Component: trashAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: normal CC: maxy, simonandric5
Priority: NOR    
Version: 4.11.5   
Target Milestone: ---   
Platform: Debian unstable   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

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...