From: Ansgar Burchardt Date: Wed, 4 Sep 2013 20:03:21 +0000 (+0200) Subject: Revert "Finds newer or equal versions in lowersuite_name" X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5fb0d3bf83deaba2e916eb21efec583114bef75;p=dak Revert "Finds newer or equal versions in lowersuite_name" This reverts commit 76b59a19769bc4468e528bb1e35623da2bc6ad5c. In case packages in testing get binNMU'ed, testing-proposed-updates will contain the same source version as testing, but binaries with a higher version. The cruft-report should not suggest removing these packages. --- diff --git a/daklib/cruft.py b/daklib/cruft.py index fc98eafb..f060085d 100644 --- a/daklib/cruft.py +++ b/daklib/cruft.py @@ -28,10 +28,10 @@ from sqlalchemy.orm import object_session def newer_version(lowersuite_name, highersuite_name, session): ''' - Finds newer or equal versions in lowersuite_name than in highersuite_name. - Returns a list of tuples (source, higherversion, lowerversion) where - higherversion is the newest version from highersuite_name and lowerversion - is the newest version from lowersuite_name. + Finds newer versions in lowersuite_name than in highersuite_name. Returns a + list of tuples (source, higherversion, lowerversion) where higherversion is + the newest version from highersuite_name and lowerversion is the newest + version from lowersuite_name. ''' lowersuite = get_suite(lowersuite_name, session) @@ -43,7 +43,7 @@ def newer_version(lowersuite_name, highersuite_name, session): list = [] for (source, higherversion) in query: lowerversion = session.query(func.max(DBSource.version)). \ - filter_by(source = source).filter(DBSource.version >= higherversion). \ + filter_by(source = source).filter(DBSource.version > higherversion). \ with_parent(lowersuite).group_by(DBSource.source).scalar() if lowerversion is not None: list.append((source, higherversion, lowerversion))