One of our RPM packages has some UTF-8 characters in its description, 
leading to an exception ("Error: Could not prefetch package provider 'yum': 
invalid byte sequence in US-ASCII")  in rpm.rb, causing no packages to be 
upgraded as the yumhelper.py invocation code raises that error. I'm using 
the following workaround:

--- lib/puppet/provider/package/rpm.rb.orig 2013-10-10 16:54:55.582784848 
-0700
+++ lib/puppet/provider/package/rpm.rb 2013-10-10 16:52:41.062222465 -0700
@@ -150,7 +150,7 @@
     line.strip!
     hash = {}

-    if self::RPM_PACKAGE_NOT_FOUND_REGEX.match(line)
+    if 
self::RPM_PACKAGE_NOT_FOUND_REGEX.match(line.force_encoding('UTF-8'))
       # pass through, package was not found
     elsif match = self::NEVRA_REGEX.match(line)
       self::NEVRA_FIELDS.zip(match.captures) { |f, v| hash[f] = v }

Fyi,
Jos


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-dev.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to