Check definition of package resources

bug 1195162

Tempest is installing some very common packages
which are likely to conflict with other modules.
This patch checks to see if the resources are
already defined, which will prevent compile time
errors relating to duplicate resources.

Change-Id: I9b4eb46ec0b9affb905e19a034a26d16e01119e2