From 07643f4c30c5a4b679f928b316bb2f89f176cfc9 Mon Sep 17 00:00:00 2001 From: Ivo De Decker Date: Fri, 4 Jan 2019 22:48:29 +0000 Subject: [PATCH] Define BuildDepResult object (based on IntEnum) Signed-off-by: Ivo De Decker --- britney2/policies/policy.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/britney2/policies/policy.py b/britney2/policies/policy.py index 43a09d9..1668ddb 100644 --- a/britney2/policies/policy.py +++ b/britney2/policies/policy.py @@ -3,6 +3,7 @@ import logging import os import re import time +from enum import IntEnum, unique from urllib.parse import quote import apt_pkg @@ -747,6 +748,15 @@ class PiupartsPolicy(BasePolicy): return summary +@unique +class BuildDepResult(IntEnum): + # relation is satisfied in target + OK = 1 + # relation can be satisfied by other packages in source + DEPENDS = 2 + # relation cannot be satisfied + FAILED = 3 + class BuildDependsPolicy(BasePolicy): def __init__(self, options, suite_info):