do not fetch again, if fetched

This commit is contained in:
Faik Uygur
2009-10-21 12:49:08 +00:00
parent cda3d7586c
commit ef351bde8f
+4
View File
@@ -386,6 +386,10 @@ def fetch(packages=[], path=os.path.curdir):
package, repo = packagedb.get_package_repo(name)
ctx.ui.info(_("%s package found in %s repository") % (package.name, repo))
uri = pisi.uri.URI(package.packageURI)
output = os.path.join(path, uri.path())
if os.path.exists(output) and package.packageHash == pisi.util.sha1_file(output):
ctx.ui.warning(_("%s package already fetched") % uri.path())
continue
if uri.is_absolute_path():
url = str(pkg_uri)
else: