You are not logged in.

#1 2016-05-20 20:05:29

rubenvb
Member
Registered: 2011-01-14
Posts: 99

makepkg and LANG!=C

I set my LANG to nl_BE.UTF-8 and run makepkg, I get weird errors regarding printf:

==> Bronnen ophalen...
/usr/share/makepkg/util/message.sh: regel 58: printf: <some_filename_here>: ongeldig getal

The first is "==> Retrieving sources...". The rest is (freely translated as it doesn't show with LANG=C: "/usr/share/makepkg/util/message.sh: line 58: printf: <some_filename_here>: invalid number".

How come and how do I fix this?

Offline

#2 2016-05-20 20:56:27

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: makepkg and LANG!=C

Which package did you try to compile?

Offline

#3 2016-05-20 21:03:51

rubenvb
Member
Registered: 2011-01-14
Posts: 99

Re: makepkg and LANG!=C

The last time I saw this was just now, when compiling my gcc49 package in the AUR. But it happens with other packages as well. I can't say with 100% certainty that rvery package has this, but I'd say chances are real.

Offline

#4 2016-05-20 21:20:53

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: makepkg and LANG!=C

Do you have the name of another example? Something that is small and not large like gcc49.

EDIT: I tried it with gcc49, and I get the same weird messages you mention. What's weird is that it's happening with only "LANGUAGE=nl_BE makepkg" which is the translations for messages. I left everything about the LC_* variables, which control the look of numbers, dates, etc., as something English, but the errors still happened.

Last edited by Ropid (2016-05-20 21:36:03)

Offline

#5 2016-05-20 21:47:11

rubenvb
Member
Registered: 2011-01-14
Posts: 99

Re: makepkg and LANG!=C

Extra datapoint: with another locale, like e.g. de_DE.UTF-8, I do not have this problem...

Offline

#6 2016-05-20 22:16:31

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: makepkg and LANG!=C

I found the bug. It's in the file "/usr/share/locale/nl/LC_MESSAGES/pacman-scripts.mo". You can see it for yourself like this:

$ msgunfmt /usr/share/locale/nl/LC_MESSAGES/pacman-scripts.mo | grep -A1 'Found'
msgid "Found %s"
msgstr "% is gevonden"

That "%" has to be "%s". That's where printf's error message comes from.

Someone has to make a bug report for the "pacman" package. That's the package that owns that file.

If you want to fix it right now in your local file, run this here:

msgunfmt /usr/share/locale/nl/LC_MESSAGES/pacman-scripts.mo | sed '/Found %s/,+1 s/% /%s /' | msgfmt -o /tmp/pacman-scripts.mo - && sudo cp /tmp/pacman-scripts.mo /usr/share/locale/nl/LC_MESSAGES/pacman-scripts.mo

This overwrites the file. I hope I didn't make a mistake there. You can get the original file back by reinstalling the "pacman" package.

Offline

#7 2016-05-22 09:51:37

rubenvb
Member
Registered: 2011-01-14
Posts: 99

Re: makepkg and LANG!=C

Indeed, I found this as well. I added the suggestion to the transifex project:
https://www.transifex.com/toofishes/arc … ot/1629282

But unfortunately it's a "reviewed" string and I can't edit it directly.

Offline

#8 2016-05-22 12:59:25

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,390
Website

Re: makepkg and LANG!=C

I'll deal with it in the coming days.

Offline

#9 2016-05-22 13:00:47

rubenvb
Member
Registered: 2011-01-14
Posts: 99

Re: makepkg and LANG!=C

Thanks Allan!

Offline

Board footer

Powered by FluxBB