todooo
This commit is contained in:
@@ -39,9 +39,9 @@ Legend:
|
|||||||
|
|
||||||
2. Alpha
|
2. Alpha
|
||||||
- incremental build
|
- 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
|
- 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)
|
/ multi-package dependency analysis (eray)
|
||||||
+ design a package operation planner
|
+ design a package operation planner
|
||||||
- install operation
|
- install operation
|
||||||
@@ -65,7 +65,7 @@ Legend:
|
|||||||
- comar OM information (Provides) (baris)
|
- comar OM information (Provides) (baris)
|
||||||
- refactor actionsAPI
|
- refactor actionsAPI
|
||||||
- actionsAPI documentation
|
- actionsAPI documentation
|
||||||
- versioning information document
|
/ versioning information document (bunu ben yazmistim zaten - eray)
|
||||||
/ verify metodlari
|
/ verify metodlari
|
||||||
+ SpecFile
|
+ SpecFile
|
||||||
+ MetaData
|
+ MetaData
|
||||||
@@ -97,23 +97,25 @@ Legend:
|
|||||||
|
|
||||||
3. Beta
|
3. Beta
|
||||||
|
|
||||||
|
- exception handling (baris)
|
||||||
- system-wide upgrade (upgrade-all) komutu (eray)
|
- system-wide upgrade (upgrade-all) komutu (eray)
|
||||||
- multiple package repository
|
/ multiple package repository
|
||||||
/ decide how to implement
|
+ decide how to implement
|
||||||
- make a package and sourcedb for each repo
|
- make a package and sourcedb for each repo
|
||||||
- support medium types
|
- support medium types
|
||||||
- internet: http/ftp
|
- internet: http/ftp
|
||||||
- local repository
|
- local repository
|
||||||
- cdrom dvd
|
- 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
|
- GUI
|
||||||
- pyqt UI class to interface
|
- pyqt UI class to interface
|
||||||
- PISIMAT
|
- PISIMAT
|
||||||
- installation
|
- installation
|
||||||
- remove
|
- remove
|
||||||
- upgrade
|
- 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
|
||||||
|
|||||||
+12
-8
@@ -24,12 +24,14 @@ class Installer:
|
|||||||
"Installer class, provides install routines for pisi packages"
|
"Installer class, provides install routines for pisi packages"
|
||||||
|
|
||||||
def __init__(self, package_fname):
|
def __init__(self, package_fname):
|
||||||
|
"initialize from a file name"
|
||||||
self.package = Package(package_fname)
|
self.package = Package(package_fname)
|
||||||
self.package.read()
|
self.package.read()
|
||||||
self.metadata = self.package.metadata
|
self.metadata = self.package.metadata
|
||||||
self.files = self.package.files
|
self.files = self.package.files
|
||||||
|
|
||||||
def install(self):
|
def install(self):
|
||||||
|
"entry point"
|
||||||
self.pkginfo = self.metadata.package
|
self.pkginfo = self.metadata.package
|
||||||
self.check_requirements()
|
self.check_requirements()
|
||||||
self.check_relations()
|
self.check_relations()
|
||||||
@@ -102,34 +104,36 @@ class Installer:
|
|||||||
def reinstall(self):
|
def reinstall(self):
|
||||||
"check reinstall, confirm action, and remove package if reinstall"
|
"check reinstall, confirm action, and remove package if reinstall"
|
||||||
|
|
||||||
if installdb.is_installed(self.pkginfo.name): # is this a reinstallation?
|
pkg = self.pkginfo
|
||||||
(iversion, irelease) = installdb.get_version(self.pkginfo.name)
|
|
||||||
|
|
||||||
if self.pkginfo.version == iversion and self.pkginfo.release == irelease:
|
if installdb.is_installed(pkg.name): # is this a reinstallation?
|
||||||
|
(iversion, irelease) = installdb.get_version(pkg.name)
|
||||||
|
|
||||||
|
if pkg.version == iversion and pkg.release == irelease:
|
||||||
if not ui.confirm('Re-install same version package?'):
|
if not ui.confirm('Re-install same version package?'):
|
||||||
raise InstallError('Package re-install declined')
|
raise InstallError('Package re-install declined')
|
||||||
else:
|
else:
|
||||||
upgrade = False
|
upgrade = False
|
||||||
# is this an upgrade?
|
# is this an upgrade?
|
||||||
# determine and report the kind of upgrade: version, release, build
|
# 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')
|
ui.info('Upgrading to new upstream version')
|
||||||
upgrade = True
|
upgrade = True
|
||||||
elif self.pkginfo.release > irelease:
|
elif pkg.release > irelease:
|
||||||
ui.info('Upgrading to new distribution release')
|
ui.info('Upgrading to new distribution release')
|
||||||
upgrade = True
|
upgrade = True
|
||||||
|
|
||||||
# is this a downgrade? confirm this action.
|
# is this a downgrade? confirm this action.
|
||||||
if not upgrade:
|
if not upgrade:
|
||||||
if self.pkginfo.version < iversion:
|
if pkg.version < iversion:
|
||||||
x = 'Downgrade to old upstream version?'
|
x = 'Downgrade to old upstream version?'
|
||||||
elif self.pkginfo.release < irelease:
|
elif pkg.release < irelease:
|
||||||
x = 'Downgrade to old distribution release?'
|
x = 'Downgrade to old distribution release?'
|
||||||
if not ui.confirm(x):
|
if not ui.confirm(x):
|
||||||
raise InstallError('Package downgrade declined')
|
raise InstallError('Package downgrade declined')
|
||||||
|
|
||||||
# remove old package then
|
# remove old package then
|
||||||
operations.remove(self.pkginfo.name)
|
operations.remove(pkg.name)
|
||||||
|
|
||||||
def update_databases(self):
|
def update_databases(self):
|
||||||
"update databases"
|
"update databases"
|
||||||
|
|||||||
Reference in New Issue
Block a user