HomePhorge

(#4142) Fix module check not to fail when empty metadata.json
45b3908e0373Unpublished

Unpublished Commit · Learn More

Repository Importing: This repository is still importing.

Description

(#4142) Fix module check not to fail when empty metadata.json

Even though the puppet module tool was fixed to generate the required
metadata attributes when it packages modules, it still creates an empty
metadata.json file that gets checked into everybody's module repos.
This causes the module to be unusable straight from a git clone since
puppet was requiring all the required metadata attributes just with the
presence of that file, and resulting in the error:

No source module metadata provided for mcollective at

This change makes it so that if you have an empty metadata.json (like
the moduletool generates), puppet doesn't consider it to have metadata.
If you have ANY metadata attributes in that file, it will still check to
make sure all the required attributes are present.

The work around up to this point has just been to delete the
metadata.json file in git cloned modules.

This also fixed the tests around this to actually run, since previously
the tests depended on the a json feature, which we didn't have. We do,
however, have a pson feature.

Reviewed-by: Nick Lewis <nick@puppetlabs.com>

Details

Event Timeline

Matt Robinson <matt@puppetlabs.com> committed rPU45b3908e0373: (#4142) Fix module check not to fail when empty metadata.json (authored by Matt Robinson <matt@puppetlabs.com>).Jul 13 2011, 1:06 AM