def _confirmLaterPackages(self, findTroveResults):
        relevantPackages = [ x for x in findTroveResults
                              if (not x[1]
                                  and (x[2] is None or x[2].isEmpty()))  ]
        localResults = self.db.findTroves(None, relevantPackages,
                                               allowMissing=True)
        downgrades = {}
        for troveSpec, localVersions in localResults.iteritems():
            reposVersions = findTroveResults[troveSpec]
            reposVersionsByLabel = {}
            localVersionsByLabel = {}
            for troveTup in reposVersions:
                label = troveTup[1].trailingLabel()
                reposVersionsByLabel.setdefault(label, set()).add(troveTup)
            for troveTup in localVersions:
                label = troveTup[1].trailingLabel()
                localVersionsByLabel.setdefault(label, set()).add(troveTup)
            for name, localVersion, localFlavor in localVersions:
                label = localVersion.trailingLabel()
                if reposVersionsByLabel not in label:
                    continue
                repoTups = reposVersionsByLabel[label]
                found = False
                for name, repoVersion, repoFlavor in repoTups:
                    # a package will definitely downgrade if all the versions
                    # listed from the repository are older than it.
                    if localVersion <= repoVersion:
                        found = True
                        break
                if not found:
                    downgrades[troveSpec,label] = (localVersionsByLabel[label],
                                                   reposVersionsByLabel[label])
        if not downgrades:
            return

        raise DowngradeError(downgrades)
dataset/ETHPy150Open sassoftware/conary/conary/conaryclient/update.py/ClientUpdate._confirmLaterPackages/swapped operands of `not in`