puppetlabs/puppetdb — pull request #217 by grimradical (2012-07-11 23:55:15+00:00)
Title: Don't alias resources with composite namevars

Normally, as part of converting a catalog to the PuppetDB wire format,
we ensure that every resource has its namevar as one of its aliases.
This allows us to handle edges that refer to said resource using its
namevar instead of its title.

However, Puppet implements `#namevar` for resources with composite
namevars in a strange way, only returning part of the composite name.
This can result in bugs in the generated catalog, where we may have 2
resources with the same alias (because `#namevar` returns the same thing
for both of them).

Because resources with composite namevars can't be referred to by
anything other than their title when declaring relationships, there's no
real point to adding their aliases in anyways. That neatly side-steps
the problem.

Signed-off-by: Deepak Giridharagopal