“mock”, Fedora 24, perl, and locales

If your Mock builds are complaining about perl locales, like

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = "en_US:en",
	LC_ALL = (unset),
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

you can fix or work around this in a number of ways:

  • Manually pre-install glibc-langpack-en:
    mock --no-cleanup-after -r mytarget --install glibc-langpack-en
    mock ...do my normal build here ...
    
  • Tell Perl to stop whining. In /etc/mock/site-defaults.cfg add a new line:
    config_opts['environment']['BADLANG'] = '0'
    

The correct fix would be to get mock to automatically install the correct langpack for the current locale when init’ing a root.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *