]> git.ipfire.org Git - pakfire.git/commitdiff
Fix hash comparison issue.
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 21 Jul 2011 20:27:07 +0000 (22:27 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 21 Jul 2011 20:27:07 +0000 (22:27 +0200)
pakfire/repository/local.py

index 2ff6dea939cd2af2fba67445ca55547686bbc27a..00d3f84b519e0743815071b4ce4bfd9c76dcf546 100644 (file)
@@ -50,7 +50,7 @@ class RepositoryDir(base.RepositoryFactory):
 
                                # Check UUID at first (faster) and check the file hash to be
                                # absolutely sure.
-                               if pkg.uuid == pkg_exists.uuid and pkg.hash1 and pkg_exists.hash1:
+                               if pkg.uuid == pkg_exists.uuid and pkg.hash1 == pkg_exists.hash1:
                                        # Do not copy the file if it is already okay.
                                        copy = False
 
@@ -59,8 +59,10 @@ class RepositoryDir(base.RepositoryFactory):
                                else:
                                        os.unlink(repo_filename)
 
+                               del pkg_exists
+
                        if copy:
-                               logging.debug("Copying package '%s' to repository." % pkg.friendly_name)
+                               logging.debug("Copying package '%s' to repository." % pkg)
                                repo_dirname = os.path.dirname(repo_filename)
                                if not os.path.exists(repo_dirname):
                                        os.makedirs(repo_dirname)