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: