| |
@@ -111,13 +111,15 @@
|
| |
pkg = session.query(
|
| |
primary.Package
|
| |
).filter(
|
| |
- primary.Package.basename == pkg_name
|
| |
+ primary.Package.rpm_sourcerpm.like('{}%'.format(pkg_name))
|
| |
).order_by(
|
| |
primary.Package.epoch.desc(),
|
| |
primary.Package.version.desc(),
|
| |
primary.Package.release.desc(),
|
| |
)
|
| |
- output = pkg.first()
|
| |
+ for pkg in pkg.all():
|
| |
+ if pkg.basename == pkg_name:
|
| |
+ return pkg
|
| |
except SQLAlchemyError as err:
|
| |
cnt += 1
|
| |
if cnt > RETRY_ATTEMPT:
|
| |
This commit finished undoing the approach we once had to use a
hybrid_property to figure out the base name which turned out to not
be as reliable as first thought.
Fixes https://pagure.io/mdapi/issue/59
Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr