Issue #21530 has been updated by Brian Cain. Assignee set to Clay Caviness
I’ve put this ticket’s status into “Needs more Information” and assigned it to you. Please either (a) update it with the information I’ve requested and re-assign it to me if you need more help, or (b) change the status to “Closed” if you were able to resolve the issue on your own. ---------------------------------------- Bug #21530: cfpropertylist .to_plist method doesn't output Apple standard XML format https://projects.puppetlabs.com/issues/21530#change-94620 * Author: Clay Caviness * Status: Needs More Information * Priority: Normal * Assignee: Clay Caviness * Category: * Target version: * Keywords: * Branch: * Affected Facter version: ---------------------------------------- The output when using FORMAT_XML isn't in Apple style, with tab indention, but is instead all on one line. While this is valid XML, it's not pretty. We generally like to write XML plists and not binary, as they're simpler to read without extra tools. <pre> $ ruby -r facter -r facter/util/plist -e "p = {'foo'=>'bar', 'baz'=>[1,2,3]}.to_plist(); puts p" <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>baz</key> <array> <integer>1</integer> <integer>2</integer> <integer>3</integer> </array> <key>foo</key> <string>bar</string> </dict> </plist> $ facter --version 1.6.2 $ sudo pkgutil --forget com.reductivelabs.facter Forgot package 'com.reductivelabs.facter' on '/'. $ sudo installer -target / -pkg /Volumes/facter-1.7.1/facter-1.7.1.pkg installer: Package name is facter-1.7.1 installer: Installing at base path / installer: The install was successful. $ ruby -r facter -r facter/util/cfpropertylist -e "p = {'foo'=>'bar', 'baz'=>[1,2,3]}.to_plist({:plist_format=>2}); puts p" <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"><dict><key>baz</key><array><integer>1</integer><integer>2</integer><integer>3</integer></array><key>foo</key><string>bar</string></dict></plist> $ facter --version 1.7.1 </pre> -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" 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-bugs. For more options, visit https://groups.google.com/groups/opt_out.
