'Apply constraints of other spec\'s dependencies to this spec.'

def _constrain_dependencies(self, other):

    other = self._autospec(other)
    if ((not self._dependencies) or (not other._dependencies)):
        return False
    if (not other.satisfies_dependencies(self)):
        raise UnsatisfiableDependencySpecError(other, self)
    changed = False
    for name in self.common_dependencies(other):
        changed |= self[name].constrain(other[name], deps=False)
        if (name in self._dependencies):
            changed |= self._dependencies[name].update_deptypes(other._dependencies[name].deptypes)
    for name in other.dep_difference(self):
        dep_spec_copy = other.get_dependency(name)
        dep_copy = dep_spec_copy.spec
        deptypes = dep_spec_copy.deptypes
        self._add_dependency(dep_copy.copy(), deptypes)
        changed = True
    return changed
