From a659a98d27d4c5769f506ceea18ab5c06d4e5aad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Mon, 25 Jul 2005 10:29:17 +0000 Subject: [PATCH] todooo --- TODO | 24 +++++++++++++----------- pisi/install.py | 20 ++++++++++++-------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/TODO b/TODO index f7ba6045..8a63519f 100644 --- a/TODO +++ b/TODO @@ -39,9 +39,9 @@ Legend: 2. Alpha - incremental build - - generate binary release number by comparing MD5s (MEREN) + - generate binary release number by comparing MD5s (meren) - keep track of successfully completed configure, make, install - steps (necessary for large-scale builds?) (MEREN) + steps (necessary for large-scale builds?) (meren) / multi-package dependency analysis (eray) + design a package operation planner - install operation @@ -65,7 +65,7 @@ Legend: - comar OM information (Provides) (baris) - refactor actionsAPI - actionsAPI documentation - - versioning information document + / versioning information document (bunu ben yazmistim zaten - eray) / verify metodlari + SpecFile + MetaData @@ -97,23 +97,25 @@ Legend: 3. Beta + - exception handling (baris) - system-wide upgrade (upgrade-all) komutu (eray) - - multiple package repository - / decide how to implement + / multiple package repository + + decide how to implement - make a package and sourcedb for each repo - support medium types - internet: http/ftp - local repository - cdrom dvd - - multi-architecture support - - design decisions - - extend XML specs to support that - - cross-platform building support - - transaction stuff for database - - incremental build/fetch for repository index (pisi-index.xml) - GUI - pyqt UI class to interface - PISIMAT - installation - remove - upgrade + - transaction stuff for database (eray) + - incremental build/fetch for repository index (pisi-index.xml) + - diffsets (caglar) + - multi-architecture support + / design decisions + / extend XML specs to support that + - cross-platform building support diff --git a/pisi/install.py b/pisi/install.py index 8631f495..abdcd9a8 100644 --- a/pisi/install.py +++ b/pisi/install.py @@ -24,12 +24,14 @@ class Installer: "Installer class, provides install routines for pisi packages" def __init__(self, package_fname): + "initialize from a file name" self.package = Package(package_fname) self.package.read() self.metadata = self.package.metadata self.files = self.package.files def install(self): + "entry point" self.pkginfo = self.metadata.package self.check_requirements() self.check_relations() @@ -102,34 +104,36 @@ class Installer: def reinstall(self): "check reinstall, confirm action, and remove package if reinstall" - if installdb.is_installed(self.pkginfo.name): # is this a reinstallation? - (iversion, irelease) = installdb.get_version(self.pkginfo.name) + pkg = self.pkginfo + + if installdb.is_installed(pkg.name): # is this a reinstallation? + (iversion, irelease) = installdb.get_version(pkg.name) - if self.pkginfo.version == iversion and self.pkginfo.release == irelease: + if pkg.version == iversion and pkg.release == irelease: if not ui.confirm('Re-install same version package?'): raise InstallError('Package re-install declined') else: upgrade = False # is this an upgrade? # determine and report the kind of upgrade: version, release, build - if self.pkginfo.version > iversion: + if pkg.version > iversion: ui.info('Upgrading to new upstream version') upgrade = True - elif self.pkginfo.release > irelease: + elif pkg.release > irelease: ui.info('Upgrading to new distribution release') upgrade = True # is this a downgrade? confirm this action. if not upgrade: - if self.pkginfo.version < iversion: + if pkg.version < iversion: x = 'Downgrade to old upstream version?' - elif self.pkginfo.release < irelease: + elif pkg.release < irelease: x = 'Downgrade to old distribution release?' if not ui.confirm(x): raise InstallError('Package downgrade declined') # remove old package then - operations.remove(self.pkginfo.name) + operations.remove(pkg.name) def update_databases(self): "update databases"