diff --git a/pisi/scenarioapi/package.py b/pisi/scenarioapi/package.py index 81db2b99..c873e9a0 100644 --- a/pisi/scenarioapi/package.py +++ b/pisi/scenarioapi/package.py @@ -63,19 +63,18 @@ class Package: return os.path.basename(pkg) def version_bump(self, *args): - if args: - for with in args: - if with.types == CONFLICT and with.action == ADDED: - self.pspec.add_conflicts(with.pkgs) + for with in args: + if with.types == CONFLICT and with.action == ADDED: + self.pspec.add_conflicts(with.pkgs) - if with.types == CONFLICT and with.action == REMOVED: - self.pspec.remove_conflicts(with.pkgs) + if with.types == CONFLICT and with.action == REMOVED: + self.pspec.remove_conflicts(with.pkgs) - if with.types == DEPENDENCY and with.action == ADDED: - self.pspec.add_dependencies(with.pkgs) - - if with.types == DEPENDENCY and with.action == REMOVED: - self.pspec.remove_dependencies(with.pkgs) + if with.types == DEPENDENCY and with.action == ADDED: + self.pspec.add_dependencies(with.pkgs) + + if with.types == DEPENDENCY and with.action == REMOVED: + self.pspec.remove_dependencies(with.pkgs) self.pspec.update_history(self.date, self.version) self.actions.name = self.name diff --git a/pisi/scenarioapi/repoops.py b/pisi/scenarioapi/repoops.py index 056ea253..4aadee5c 100644 --- a/pisi/scenarioapi/repoops.py +++ b/pisi/scenarioapi/repoops.py @@ -31,13 +31,12 @@ def repo_added_package(package, *args): dependencies = None conflicts = None - if args: - for with in args: - if with.types == CONFLICT and with.action == INIT: - conflicts = with.pkgs + for with in args: + if with.types == CONFLICT and with.action == INIT: + conflicts = with.pkgs - if with.types == DEPENDENCY and with.action == INIT: - dependencies = with.pkgs + if with.types == DEPENDENCY and with.action == INIT: + dependencies = with.pkgs repodb[package] = Package(package, dependencies, conflicts)