X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=dak%2Fcontrol_overrides.py;h=aaf3fc1482752f80a0802565e99a2c28fe049106;hb=7bdd3fe987963f6e7b02eca604153eff04b010d8;hp=0af5c48b35897733a9b32a89a548c45c380c5640;hpb=16f731a893f0ba036a995c25b8b5f3490394070e;p=dak.git diff --git a/dak/control_overrides.py b/dak/control_overrides.py old mode 100644 new mode 100755 index 0af5c48b..aaf3fc14 --- a/dak/control_overrides.py +++ b/dak/control_overrides.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Bulk manipulation of the overrides +""" Bulk manipulation of the overrides """ # Copyright (C) 2000, 2001, 2002, 2003, 2006 James Troup # This program is free software; you can redistribute it and/or modify @@ -54,6 +54,7 @@ import apt_pkg from daklib import utils from daklib import database from daklib import logging +from daklib.regexes import re_comments ################################################################################ @@ -118,11 +119,11 @@ def process_file (file, suite, component, type, action): start_time = time.time() projectB.query("BEGIN WORK") for line in file.readlines(): - line = utils.re_comments.sub('', line).strip() + line = re_comments.sub('', line).strip() if line == "": continue - maintainer_override = None + maintainer_override = "" if type == "dsc": split_line = line.split(None, 2) if len(split_line) == 2: @@ -165,8 +166,7 @@ def process_file (file, suite, component, type, action): (old_priority_id, old_section_id, old_maintainer_override, old_priority, old_section) = original[package] if action == "add" or old_priority_id == priority_id and \ old_section_id == section_id and \ - ((old_maintainer_override == maintainer_override) or \ - (old_maintainer_override == "" and maintainer_override == None)): + old_maintainer_override == maintainer_override: # If it's unchanged or we're in 'add only' mode, ignore it c_skipped += 1 continue