diff --git a/osclib/checkrepo.py b/osclib/checkrepo.py index 07564484..86212712 100644 --- a/osclib/checkrepo.py +++ b/osclib/checkrepo.py @@ -27,6 +27,7 @@ from osc.core import http_DELETE from osc.core import http_GET from osc.core import http_POST from osc.core import makeurl +from osclib.conf import Config from osclib.stagingapi import StagingAPI from osclib.memoize import memoize from osclib.pkgcache import PkgCache @@ -141,6 +142,7 @@ class CheckRepo(object): """CheckRepo constructor.""" self.apiurl = apiurl self.project = 'openSUSE:%s' % project + Config(self.project) self.staging = StagingAPI(apiurl, self.project) self.pkgcache = PkgCache(BINCACHE, force_clean=force_clean) diff --git a/osclib/cycle.py b/osclib/cycle.py index 8eded577..99fea33b 100644 --- a/osclib/cycle.py +++ b/osclib/cycle.py @@ -295,7 +295,7 @@ class CycleDetector(object): # project (i.e Factory) cycles as a set of packages, so we can # check in the new cycle (also as a set of package) is # included here. - project_cycles_pkgs = {frozenset(cycle) for cycle in project_cycles} + project_cycles_pkgs = [set(cycle) for cycle in project_cycles] for cycle in current_graph.cycles(): if cycle not in project_cycles: project_edges = set((u, v) for u in cycle for v in project_graph.edges(u) if v in cycle) @@ -303,4 +303,4 @@ class CycleDetector(object): current_pkgs = set(cycle) yield (cycle, sorted(current_edges - project_edges), - current_pkgs in project_cycles_pkgs) + not any(current_pkgs.issubset(cpkgs) for cpkgs in project_cycles_pkgs))