From: Michael Tremer Date: Sun, 22 Apr 2012 12:47:43 +0000 (+0200) Subject: Select packages from the database by their UUIDs. X-Git-Tag: 0.9.23~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b8f51d988734a75e8e41496a5d272057d18ecfda;p=pakfire.git Select packages from the database by their UUIDs. --- diff --git a/python/pakfire/repository/database.py b/python/pakfire/repository/database.py index 11321ae77..6f8f39750 100644 --- a/python/pakfire/repository/database.py +++ b/python/pakfire/repository/database.py @@ -334,9 +334,9 @@ class DatabaseLocal(Database): # Get the ID of the package in the database. c = self.cursor() - #c.execute("SELECT id FROM packages WHERE uuid = ? LIMIT 1", (pkg.uuid,)) - c.execute("SELECT id FROM packages WHERE name = ? AND epoch = ? AND version = ?" - " AND release = ? LIMIT 1", (pkg.name, pkg.epoch, pkg.version, pkg.release,)) + c.execute("SELECT id FROM packages WHERE uuid = ? LIMIT 1", (pkg.uuid,)) + #c.execute("SELECT id FROM packages WHERE name = ? AND epoch = ? AND version = ?" + # " AND release = ? LIMIT 1", (pkg.name, pkg.epoch, pkg.version, pkg.release,)) id = None for row in c: