[WorkAround] pisi paketlerini zaten varsa çekme. İlerde pisi-index.xml içinde paketlerin sha1sum'ları gelince buraya onunla karşılaştırma da eklenmeli...

This commit is contained in:
S.Çağlar Onur
2005-09-22 17:05:21 +00:00
parent f3d07aea0f
commit 915af66888
+9 -3
View File
@@ -15,7 +15,7 @@
# maintainer: baris and meren
from os.path import join
from os.path import join, exists
import pisi
import pisi.context as ctx
@@ -38,9 +38,15 @@ class Package:
if url.is_remote_file():
from fetcher import fetch_url
dest = ctx.config.packages_dir()
fetch_url(url, dest, ctx.ui.Progress)
self.filepath = join(dest, url.filename())
# FIXME: exists is not enough, also sha1sum check needed \
# when implemented in pisi-index.xml
if not exists(self.filepath):
fetch_url(url, dest, ctx.ui.Progress)
else:
ctx.ui.info('%s [cached]' % url.filename())
self.impl = archive.ArchiveZip(self.filepath, 'zip', mode)
def add_to_package(self, fn):