def do(self):
        for comp in self.recipe.autopkg.components.items():
            capsule =  self.recipe._getCapsule(comp[0])

            if capsule and capsule[0] == 'rpm':
                if not self.filters:
                    self.filters = [(x, filter.Filter(x, self.macros))
                               for x in self.excepts]

                path = capsule[1]
                matchFound = False
                for regexp, f in self.filters:
                    if f.match(path):
                        self.unusedFilters['exceptions'].discard(regexp)
                        matchFound=True
                if matchFound:
                    continue

                h = rpmhelper.readHeader(file(path))
                rReqs, rProv = h.getDeps(mergeKmodSymbols=self.mergeKmodSymbols,
                    enableRPMVersionDeps=self.recipe.cfg.enableRPMVersionDeps)

                # integrate user specified requirements
                if self.requirements:
                    userReqs = self.requirements.get(comp[0])
                    if userReqs:
                        rReqs.union(userReqs)

                # remove rpm provisions from the requirements
                rReqs = rReqs.difference(rProv)

                # cull duplicate rpm reqs that have a standard conary
                # representations
                # currently we only handle perl and sonames
                culledReqs = deps.DependencySet()
                cnyReqs = comp[1].requires
                cnyProv = comp[1].provides
                if rReqs.hasDepClass(deps.RpmDependencies):
                    soDeps = deps.DependencySet()
                    soDeps.addDeps(deps.SonameDependencies, \
                        list(cnyReqs.iterDepsByClass(deps.SonameDependencies))+\
                        list(cnyProv.iterDepsByClass(deps.SonameDependencies)))

                    for r in list(rReqs.iterDepsByClass(deps.RpmDependencies)):
                        reMatch = self.rpmStringRe.match(r.name)
                        if reMatch and reMatch.groups():
                            rpmFile = reMatch.group(1)
                            rpmFlags = reMatch.group(2).strip()
                        else:
                            rpmFile = r.name
                            rpmFlags = ''
                        if rpmFile == 'perl' and rpmFlags:
                            ds = deps.DependencySet()
                            dep = deps.Dependency(rpmFlags)
                            dep.flags = r.flags
                            ds.addDep(deps.PerlDependencies, dep)
                            if cnyReqs.satisfies(ds) or \
                                    cnyProv.satisfies(ds):
                                culledReqs.addDep(
                                    deps.RpmDependencies,r)
                        elif rpmFile in '.so':
                            ds = deps.DependencySet()
                            if rpmFlags == '64bit':
                                elfPrefix = 'ELF64/'
                            else:
                                elfPrefix = 'ELF32/'
                            dep = deps.Dependency(elfPrefix + rpmFile)
                            dep.flags = r.flags
                            ds.addDep(deps.SonameDependencies, dep)
                            if soDeps.satisfies(ds):
                                culledReqs.addDep(deps.RpmDependencies,r)
                rReqs = rReqs.difference(culledReqs)

                # remove any excepted deps
                for filt, exceptRe in self.exceptDeps:
                    if filt.match(path):
                        for depClass, dep in list(rReqs.iterDeps()):
                            matchName = '%s: %s' %(depClass.tagName, str(dep))
                            if exceptRe.match(matchName):
                                rReqs.removeDeps(depClass, [ dep ])
                cnyReqs.union(rReqs)
dataset/ETHPy150Open sassoftware/conary/conary/build/capsulepolicy.py/RPMRequires.do/swapped operands of `in`