use get_metadata()... get rid of unneeded stuff.
This commit is contained in:
@@ -109,11 +109,5 @@ class Config(object):
|
|||||||
else:
|
else:
|
||||||
return userdir
|
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
|
#TODO: remove this
|
||||||
config = Config()
|
config = Config()
|
||||||
|
|||||||
+1
-6
@@ -112,12 +112,7 @@ class Index(XmlFile):
|
|||||||
|
|
||||||
def add_package(self, path, repo_uri):
|
def add_package(self, path, repo_uri):
|
||||||
package = Package(path, 'r')
|
package = Package(path, 'r')
|
||||||
# extract control files
|
md = package.get_metadata()
|
||||||
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.packageSize = os.path.getsize(path)
|
md.package.packageSize = os.path.getsize(path)
|
||||||
if ctx.config.options and ctx.config.options.absolute_urls:
|
if ctx.config.options and ctx.config.options.absolute_urls:
|
||||||
md.package.packageURI = os.path.realpath(path)
|
md.package.packageURI = os.path.realpath(path)
|
||||||
|
|||||||
Reference in New Issue
Block a user