From: Michael Tremer Date: Mon, 3 Oct 2011 22:14:14 +0000 (+0200) Subject: Fix transaction check. X-Git-Tag: 0.9.12~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1881477f5c5ac67065b539b173223213a561b194;p=pakfire.git Fix transaction check. --- diff --git a/python/pakfire/filelist.py b/python/pakfire/filelist.py index 2eb7e7fc0..14e7af927 100644 --- a/python/pakfire/filelist.py +++ b/python/pakfire/filelist.py @@ -23,16 +23,6 @@ class _File(object): def __init__(self, pakfire): self.pakfire = pakfire - -class File(_File): - def __init__(self, pakfire): - _File.__init__(self, pakfire) - - self.name = "" - self.pkg = None - self.size = -1 - self.hash1 = "" - def __cmp__(self, other): ret = cmp(self.name, other.name) @@ -51,6 +41,16 @@ class File(_File): return False +class File(_File): + def __init__(self, pakfire): + _File.__init__(self, pakfire) + + self.name = "" + self.pkg = None + self.size = -1 + self.hash1 = "" + + class FileDatabase(_File): def __init__(self, pakfire, db, row_id): _File.__init__(self, pakfire) diff --git a/python/pakfire/transaction.py b/python/pakfire/transaction.py index 487e2795e..15cea9d7b 100644 --- a/python/pakfire/transaction.py +++ b/python/pakfire/transaction.py @@ -130,7 +130,7 @@ class TransactionCheck(object): if file.is_dir(): continue - if not self.filelist.has_key(file): + if not self.filelist.has_key(file.name): continue for f in self.filelist[file.name]: