[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#660409: Rewrite Britney's installability tester in python



Fixup patch for 0003.  I discovered that the live-data samples could run
for 10 minutes without completing the InstallabilityTester._optimize
call, when enabling all architectures.

With patches 0001..0004 applied, I get the following runtimes for my
branch with all architectures enabled in live-data.

Python2.7:

  Running live-2011-12-13... done (462.214s)
  Running live-2011-12-20... done (493.302s)
  Running live-2012-01-04... done (335.115s)

Python2.6

  Running live-2011-12-13... done (853.107s)
  Running live-2011-12-20... done (945.488s)
  Running live-2012-01-04... done (591.630s)

As a comparision, here is the master branch with Python2.6:

  Running live-2011-12-13... done (533.754s)
  Running live-2011-12-20... done (518.489s)
  Running live-2012-01-04... done (301.428s)

... and Python2.7:

  Running live-2011-12-13... done (450.644s)
  Running live-2011-12-20... done (427.680s)
  Running live-2012-01-04... done (261.718s)

~Niels

>From ad9da9382c541bdf6ec073647d90946d8f556497 Mon Sep 17 00:00:00 2001
From: Niels Thykier <niels@thykier.net>
Date: Sun, 19 Feb 2012 13:18:11 +0100
Subject: [PATCH 4/4] Fixup of "broken" loop in _optimize()

Signed-off-by: Niels Thykier <niels@thykier.net>
---
 installability.py |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/installability.py b/installability.py
index ad3476d..e90a483 100644
--- a/installability.py
+++ b/installability.py
@@ -360,10 +360,9 @@ class InstallabilityTester(object):
 
                 broken.add(t)
 
-            if t not in revuniverse:
+            if t not in revuniverse or t not in broken:
                 continue
-            for rdep in revuniverse[t][0]:
-                check.add(rdep)
+            check.update(revuniverse[t][0] - broken)
 
         if len(broken) > 0:
             # Since a broken package will never be installable, nothing that depends on it
-- 
1.7.9


Reply to: