pulp/pulp_rpm — pull request #343 by jdob (2013-09-27 15:01:06+00:00)
Title: Moved RPM metadata extraction on upload from client to server

Pretty simple to follow. The parts that pulled out the metadata on the client were moved to the plugin, being sure to check that they are only run for RPMs/SRPMs (i.e. not groups). The original method in the client did both unit key and metadata, so it wasn't a total cut/paste, so don't be surprised to see the diff be more complex than that.

The only real trick is that the client command subclass now overrides generate_unit_key instead of generate_unit_key_and_metadata for obvious reasons.

There's a note in the code but the user-input metadata can still be specified on upload if the user wish to add fields. I decided to let those values override the ones extracted from the RPM itself on the off chance the user wants to do so.