args kontrol etme

This commit is contained in:
Faik Uygur
2006-08-21 11:45:29 +00:00
parent 4c690b14e2
commit 96d254a41a
2 changed files with 15 additions and 17 deletions
+9 -10
View File
@@ -63,19 +63,18 @@ class Package:
return os.path.basename(pkg) return os.path.basename(pkg)
def version_bump(self, *args): def version_bump(self, *args):
if args: for with in args:
for with in args: if with.types == CONFLICT and with.action == ADDED:
if with.types == CONFLICT and with.action == ADDED: self.pspec.add_conflicts(with.pkgs)
self.pspec.add_conflicts(with.pkgs)
if with.types == CONFLICT and with.action == REMOVED: if with.types == CONFLICT and with.action == REMOVED:
self.pspec.remove_conflicts(with.pkgs) self.pspec.remove_conflicts(with.pkgs)
if with.types == DEPENDENCY and with.action == ADDED: if with.types == DEPENDENCY and with.action == ADDED:
self.pspec.add_dependencies(with.pkgs) self.pspec.add_dependencies(with.pkgs)
if with.types == DEPENDENCY and with.action == REMOVED: if with.types == DEPENDENCY and with.action == REMOVED:
self.pspec.remove_dependencies(with.pkgs) self.pspec.remove_dependencies(with.pkgs)
self.pspec.update_history(self.date, self.version) self.pspec.update_history(self.date, self.version)
self.actions.name = self.name self.actions.name = self.name
+5 -6
View File
@@ -31,13 +31,12 @@ def repo_added_package(package, *args):
dependencies = None dependencies = None
conflicts = None conflicts = None
if args: for with in args:
for with in args: if with.types == CONFLICT and with.action == INIT:
if with.types == CONFLICT and with.action == INIT: conflicts = with.pkgs
conflicts = with.pkgs
if with.types == DEPENDENCY and with.action == INIT: if with.types == DEPENDENCY and with.action == INIT:
dependencies = with.pkgs dependencies = with.pkgs
repodb[package] = Package(package, dependencies, conflicts) repodb[package] = Package(package, dependencies, conflicts)