From a18b1e1748f95d53bc558b0ae8c276f59e87861e Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Wed, 29 Nov 2006 19:29:52 +0000 Subject: [PATCH] What you ever you were, you are no more. Thanks to meren for the tip. :) BUG:FIXED:4113 --- pisi/package.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pisi/package.py b/pisi/package.py index 0f5089ad..af413ffd 100644 --- a/pisi/package.py +++ b/pisi/package.py @@ -47,8 +47,12 @@ class Package: dest = ctx.config.packages_dir() self.filepath = join(dest, url.filename()) - #FIXME: also check sha1sum - if not exists(self.filepath): + sha1sum = None + if exists(self.filepath): + sha1sum = util.sha1_file(self.filepath) + + name, version = util.parse_package_name(basename(self.filepath)) + if sha1sum != ctx.packagedb.get_package(name).packageHash: try: fetch_url(url, dest, ctx.ui.Progress) except pisi.fetcher.FetchError: