On Tuesday, July 10, 2012 2:16:14 PM UTC-5, Matthew Rayfield wrote:
Thanks for your reply jcbollinger!
I think that this could actually be a bug.
After reading your response I edited my manifest to only install the first package. I then went in and used pacman manually and noticed a pattern: The packages that were getting this error displayed "optional dependencies" after pacman ran. The packages with no optional dependencies installed fine through puppet. I'm wondering if somehow that display of text is breaking whatever confirmation-of-installation check puppet does.
Perhaps so. Puppet's code is often tricky to follow, but it appears that when the pacman provider attempts to install a package, it executes the command
/usr/bin/pacman --noconfirm --noprogressbar -Sy <resource name>
in the "C" locale, captures the standard output in a file, and afterwards returns the full output as a (byte) string. (Or it uses a slightly different command if you specify the 'source' parameter to install from a local file.)
I didn't check the wider scope to see what it ultimately does with the output, but it's reasonable to suppose (especially in light of the error message) that it passes it to an output routine. I speculate that your pacman is generating non-ASCII output, and Puppet is failing the resource when it is therefore unable to log that output (because Ruby 1.8 is not very clueful about character encoding).
If I have guessed correctly, then that's a pretty significant bug (though that's an indication that my guess may be wrong): puppet should not fail resources on account of being unable to log the output.