bodhi/controllers.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 6d3833c7a9f40894c3acd8e15bf227e1e27d4026
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Jun 29 22:38:35 2010 -0400
Fix a bug with the new auto-obsoletion code (#444)
Be kind to the locals()
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 3a48897..bffb70d 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -805,8 +805,8 @@ class Root(controllers.RootController):
# Ensure that all of the packages in the old update are
# present in the new one.
pkgs = [get_nvr(b)[0] for b in releases[update.release]]
- for build in update.builds:
- if build.package.name not in pkgs:
+ for _build in update.builds:
+ if _build.package.name not in pkgs:
obsoletable = False
break
if rpm.labelCompare(util.get_nvr(oldBuild.nvr), nvr) < 0:
commit cee58d40461259b748ad3c9f307cbcd75bebfc26
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Jun 29 22:26:30 2010 -0400
Avoid self-obsoletion
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index ec28322..3a48897 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -788,6 +788,8 @@ class Root(controllers.RootController):
# all updates are safe to obsolete, or else just skip it.
for oldBuild in package.builds:
obsoletable = False
+ if oldBuild.nvr == build:
+ continue
for update in oldBuild.updates:
if update.status not in ('pending', 'testing') or \
update.request or \
Show replies by date