* ilk basarisiz install gerceklesti, popt-libs gettext'e depend ettigi

icin install edilemiyor. bu simdi basari sayilir mi? :P
* bir iki ufak hata duzeltip pre-alpha'ya gercekten yaklas
* name'leri unicode olarak cikariyor minidom ama ben str'ye ceviriyorum
  unicode olmayacak herhalde paket adlari? neyse, simdilik olmuyor
This commit is contained in:
Eray Özkural
2005-06-24 13:42:35 +00:00
parent 11988073ef
commit 9178b8bc55
5 changed files with 23 additions and 14 deletions
+7 -5
View File
@@ -8,6 +8,7 @@ from optparse import OptionParser
sys.path.append("./lib")
import pisi.install
import pisi.util
from pisi.ui import ui
class ArgError(Exception):
pass
@@ -37,12 +38,13 @@ def main():
else:
package_fn = args[0]
try:
# try:
ui.info('* Installing ' + package_fn)
pisi.install.install(package_fn)
except pisi.install.InstallError, (errno, errstr):
print '*** An installation error has occured:'
print ' ', errstr
sys.exit(1)
# except pisi.install.InstallError, (errno, errstr):
# print '*** An installation error has occured:'
# print ' ', errstr
# sys.exit(1)
if __name__ == "__main__":
main()
+3 -3
View File
@@ -3,7 +3,7 @@
import installdb
import packagedb
import ui
from ui import ui
from version import Version
def satisfiesDep(pkg, depinfo):
@@ -38,8 +38,8 @@ def satisfiesRuntimeDeps(pkg):
def installable(pkg):
"""calculate if pkg is installable currently
which means it has to satisfy both install and runtime dependencies"""
if not packagedb.has_key(pkgname):
ui.info("package " + pkgname + " not installable");
if not packagedb.has_package(pkg):
ui.info("package " + pkg + " not installable");
return False
else:
return satisfiesRuntimeDeps(pkg) and satisfiesInstallDeps(pkg)
+1 -2
View File
@@ -80,8 +80,7 @@ class MetaData(XmlFile):
self.writexml(filename)
def verify(self):
assert self.getAllNodes("Package")==1
assert self.source.name != None
assert self.source.homepage != None
assert self.source.packager != None
assert self.package != None
return True
+8 -4
View File
@@ -26,13 +26,17 @@ class Package:
extract_dir('', outdir) # means package root
def extract_files(self, paths, outdir):
"""Extract file with path to outdir"""
"""Extract paths to outdir"""
self.impl.unpack_files(paths, outdir)
def extract_file(self, path, outdir):
"""Extract file with path to outdir"""
self.extract_files([path], outdir)
def extract_dir(self, dir, outdir):
"""Extract directory recursively, this function
copies the directory archiveroot/dir to outdir"""
self.impl.unpack_dir(path, outdir)
self.impl.unpack_dir(dir, outdir)
def extract_dir_flat(self, dir, outdir):
"""Extract directory recursively, this function
@@ -43,6 +47,6 @@ class Package:
def extract_PISI_files(self, outdir):
"""Extract PISI control files: metadata.xml, files.xml,
action scripts, etc."""
self.extract_files([const.metadata_xml,
const.files_xml,'Config'], outdir)
self.extract_files([const.metadata_xml, const.files_xml], outdir)
self.extract_dir('config', outdir)
+4
View File
@@ -15,13 +15,17 @@ util.check_dir(config.db_dir())
d = shelve.open(config.db_dir() + '/package.bdb')
def has_package(name):
name = str(name)
return d.has_key(name)
def get_package(name):
name = str(name)
return d[name]
def add_package(name, package_info):
name = str(name)
d[name] = package_info
def remove_package(name):
name = str(name)
del d[name]