From 26a05f587f17feb1b49802839c6790b19c4aa1bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Mon, 25 Jul 2005 13:02:31 +0000 Subject: [PATCH] * signify single ops --- pisi/install.py | 2 +- pisi/operations.py | 10 ++++++---- pisi/toplevel.py | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pisi/install.py b/pisi/install.py index abdcd9a8..b1707e50 100644 --- a/pisi/install.py +++ b/pisi/install.py @@ -133,7 +133,7 @@ class Installer: raise InstallError('Package downgrade declined') # remove old package then - operations.remove(pkg.name) + operations.remove_single(pkg.name) def update_databases(self): "update databases" diff --git a/pisi/operations.py b/pisi/operations.py index 6bdb334a..e5ce5ca3 100644 --- a/pisi/operations.py +++ b/pisi/operations.py @@ -10,9 +10,10 @@ import util # single package operations -def remove(package_name): +def remove_single(package_name): """Remove a single package""" from installdb import installdb + from packagedb import inst_packagedb from comariface import removeScripts #TODO: check dependencies @@ -32,16 +33,17 @@ def remove(package_name): else: os.unlink(fpath) installdb.remove(package_name) + inst_packagedb.remove_package(package_name) removeScripts(package_name) # TODO: repository'den okuma isi yas burada, bu degisecek -def install(pkg): +def install_single(pkg): url = PUrl(pkg) # Check if we are dealing with a remote file or a real path of # package filename. Otherwise we'll try installing a package from # the package repository. if url.isRemoteFile() or os.path.exists(url.uri): - install_package(pkg) + install_single_package(pkg) else: from os.path import join @@ -64,7 +66,7 @@ def install(pkg): return ui.error("Package %s not found in the index file.\n" %pkg) -def install_package(pkg_location): +def install_single_package(pkg_location): from install import Installer Installer(pkg_location).install() diff --git a/pisi/toplevel.py b/pisi/toplevel.py index e493bc7f..85a7ccb4 100644 --- a/pisi/toplevel.py +++ b/pisi/toplevel.py @@ -15,12 +15,12 @@ def install(packages): """install a list of packages (either files, urls, or names)""" #TODO: this for loop is just a placeholder for x in packages: - operations.install(x) + operations.install_single(x) def remove(packages): #TODO: this for loop is just a placeholder for x in packages: - operations.remove(x) + operations.remove_single(x) def info(package_name):