]> git.ipfire.org Git - pbs.git/commitdiff
jobs: Fix UUID comparison that differs in type
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 13 Sep 2023 15:52:19 +0000 (15:52 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 13 Sep 2023 15:52:19 +0000 (15:52 +0000)
We use UUID for PostgreSQL and now receive the UUID in Python's UUID
type which surprisingly does not compare to strings...

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/jobs.py

index d0ff8e193cb7f1c7da9291a1118fbdd313a485ad..08a6720c1cb28b39a79ca8785778d1b01001aa37 100644 (file)
@@ -1054,7 +1054,7 @@ class Job(base.DataObject):
                                for pkg in p.whatprovides("%s = %s" % (package.name, package.evr)):
                                        # XXX we should search straight away for the UUID here,
                                        # but that doesn't seem to work right now
-                                       if not package.uuid == pkg.uuid:
+                                       if not ("%s" % package.uuid) == ("%s" % pkg.uuid):
                                                continue
 
                                        # Find all packages that depend on the current package