wdas/reposado — pull request #10 by timsutton (2011-10-11 20:58:42+00:00)
Title: repoutil option to print the contents of the product's .dist file

Open to feedback on this. I considered folding this into the --info option, but decided to keep it separate as it's a lot of information and mostly useful for knowing about machine-specific updates or other esoteric requirements.

It could also make sense for this to be invoked as an optional flag to --info, ie. "repoutil --info=PRODUCT_ID --dist" But as there aren't other options with optional flags (to my knowledge), maybe it's clearer to keep this as a separate option.

The deep nest of ifs for checking the existence of the product:CatalogEntry:Distributions:[localization] is mostly just my following the logic of get_info() function. It also prints a copy of the dist for every language localization available in the list given in preferences.plist. Reading the .dist is just doing an fd read on the local file, though maybe there are other suggestions for printing the contents.