pulp/pulp_puppet — pull request #47 by binrush (2013-03-27 12:05:51+00:00)
Title: Dash support in puppet modules version

According to puppet labs (http://docs.puppetlabs.com/puppet/2.7/reference/modules_publishing.html#write-a-modulefile ), puppet modules are using semantic version ( http://semver.org/spec/v1.0.0.html ). This specification allows modules to use dash in version number (i.e. 1.0.1-build22). When one tries to upload module with such version number to pulp repository (pulp-admin puppet repo uploads upload --repo-id puppet -f /root/author-mod-8.1.0-SNAPSHOT.tar.gz ), error is occured:
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/pulp/client/extensions/core.py", line 478, in run
exit_code = Cli.run(self, args)
File "/usr/lib/python2.6/site-packages/okaara/cli.py", line 966, in run
exit_code = command_or_section.execute(self.prompt, remaining_args)
File "/usr/lib/python2.6/site-packages/pulp/client/extensions/extensions.py", line 224, in execute
return self.method(*arg_list, **clean_kwargs)
File "/usr/lib/python2.6/site-packages/pulp/client/commands/repo/upload.py", line 163, in run
unit_key, unit_metadata = self.generate_unit_key_and_metadata(filename, **kwargs)
File "/usr/lib/python2.6/site-packages/pulp/client/commands/repo/upload.py", line 279, in generate_unit_key_and_metadata
unit_key = self.generate_unit_key(filename, **kwargs)
File "/usr/lib/python2.6/site-packages/pulp_puppet/extensions/admin/repo/upload.py", line 45, in generate_unit_key
author, name, version = root_filename.split('-')
ValueError: too many values to unpack

That's because dash is used as separator to find author, name and version from filename without above in mind.