use get_metadata()... get rid of unneeded stuff.

This commit is contained in:
Faik Uygur
2006-09-28 09:01:11 +00:00
parent 900b48a20b
commit 6a131b2acf
2 changed files with 1 additions and 12 deletions
-6
View File
@@ -109,11 +109,5 @@ class Config(object):
else:
return userdir
# bu dizini neden kullanıyoruz? Yalnızca index.py içerisinde
# kullanılıyor ama /var/tmp/pisi/install gibi bir dizine niye
# ihtiyacımız var? (baris)
def install_dir(self):
return self.tmp_dir() + ctx.const.install_dir_suffix
#TODO: remove this
config = Config()
+1 -6
View File
@@ -112,12 +112,7 @@ class Index(XmlFile):
def add_package(self, path, repo_uri):
package = Package(path, 'r')
# extract control files
util.clean_dir(ctx.config.install_dir())
package.extract_PISI_files(ctx.config.install_dir())
md = metadata.MetaData()
md.read(os.path.join(ctx.config.install_dir(), ctx.const.metadata_xml))
md = package.get_metadata()
md.package.packageSize = os.path.getsize(path)
if ctx.config.options and ctx.config.options.absolute_urls:
md.package.packageURI = os.path.realpath(path)