def do(self):
        flags = []
        if self.recipe.isCrossCompileTool():
            flags.append((_getTargetDepFlag(self.macros), deps.FLAG_SENSE_REQUIRED))
        components = self.recipe.autopkg.components
        for packageName in [x.name for x in self.recipe.autopkg.packageMap]:
            if packageName in self.overridesMap:
                d = self.overridesMap[packageName]
            else:
                d = self.depMap
            for requiredComponent in d:
                for requiringComponent in d[requiredComponent]:
                    reqName = ':'.join((packageName, requiredComponent))
                    wantName = ':'.join((packageName, requiringComponent))
                    if (reqName in components and wantName in components and
                        components[reqName] and components[wantName]):
                        if (d == self.depMap and
                            reqName in self.recipe._componentReqs and
                            wantName in self.recipe._componentReqs):
                            # this is an automatically generated dependency
                            # which was not in the parent of a derived
                            # pacakge. don't add it here either
                            continue

                        # Note: this does not add dependencies to files;
                        # these dependencies are insufficiently specific
                        # to attach to files.
                        ds = deps.DependencySet()
                        depClass = deps.TroveDependencies

                        ds.addDep(depClass, deps.Dependency(reqName, flags))
                        p = components[wantName]
                        p.requires.union(ds)