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

Re: ITM: Britney2 branch britney-patch-bundle-201611 into master -- small update



Hello Niels,

Niels Thykier [2016-11-13 12:53 +0000]:
> I intend to merge the branch [britney-patch-bundle-201611] consisting
> of 21 patches into master no later than Monday the 21st of November.  It
> has been tested with [no regressions].

Thanks!

>  * It cherry-picks 4 commits proposed by Martin Pitt to assist Ubuntu
>    with refactoring some their changes into policies.
> 
> Martin Pitt (4):
>       Move build checks before running policies

This needs another small refinement which we previously overlooked:
With that patch excuse.is_valid was only updated after *all* policies
ran. But the idea was that some "expensive" policy can detect whether
a previous policy already invalidated the excuse, and for that we need
to update excuse.is_valid after each policy run.

Patch from Robert attached (I added a more complete changelog).

I'll keep that in our branch for now, but if you take the above I
think you should also take this one so that this actually works.

Thanks for considering,

Martin
-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
From 4bde6d48cd51690cff7135248585c9bb33cb30ff Mon Sep 17 00:00:00 2001
From: Robert Bruce Park <robert.park@canonical.com>
Date: Tue, 15 Nov 2016 13:02:16 -0800
Subject: [PATCH] Invalidate excuse after each policy run

This fixes commit 497edc to really allow policies to see if the excuse has
already been invalidated by previous policies.
---
 britney.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/britney.py b/britney.py
index 783b291..124e6d6 100755
--- a/britney.py
+++ b/britney.py
@@ -1616,9 +1616,8 @@ class Britney(object):
                 v = policy.apply_policy(policy_info, suite, src, source_t, source_u, excuse)
                 if v.value > policy_verdict.value:
                     policy_verdict = v
-
-        if policy_verdict.is_rejected:
-            excuse.is_valid = False
+                    if policy_verdict.is_rejected:
+                        excuse.is_valid = False
 
         if suite in ('pu', 'tpu') and source_t:
             # o-o-d(ish) checks for (t-)p-u
-- 
2.10.2

Attachment: signature.asc
Description: PGP signature


Reply to: