'Instead of a --distro, set the parent of this object to another profile
and use the values from the parent instead of this one where the values
for this profile aren\'t filled in, and blend them together where they
are dictionaries.  Basically this enables profile inheritance.  To use this,
the object MUST have been constructed with is_subobject=True or the
default values for everything will be screwed up and this will likely NOT
work.  So, API users -- make sure you pass is_subobject=True into the
constructor when using this.'

def set_parent(self, parent_name):

    old_parent = self.get_parent()
    if isinstance(old_parent, item.Item):
        old_parent.children.pop(self.name, 'pass')
    if ((parent_name is None) or (parent_name == '')):
        self.parent = ''
        return
    if (parent_name == self.name):
        raise CX(_('self    parentage    is    weird'))
    found = self.collection_mgr.profiles().find(name=parent_name)
    if (found is None):
        raise CX((_('profile    %s    not    found,    inheritance    not    possible') % parent_name))
    self.parent = parent_name
    self.depth = (found.depth + 1)
    parent = self.get_parent()
    if isinstance(parent, item.Item):
        parent.children[self.name] = self
