X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=natalie;h=4a5d62bca7ac641f41f32527bdf7c80727d74df8;hb=4d40ad73b577700f97128cdea5e2e177baf38e6a;hp=db65af993ec3b10ba79c5c3bb4d287ce85616645;hpb=a723386668c8fda6be8587f1df4b30a4ea63c4e2;p=dak.git diff --git a/natalie b/natalie index db65af99..4a5d62bc 100755 --- a/natalie +++ b/natalie @@ -2,7 +2,7 @@ # Manipulate override files # Copyright (C) 2000, 2001, 2002, 2003 James Troup -# $Id: natalie,v 1.5 2003-03-14 19:05:43 troup Exp $ +# $Id: natalie,v 1.7 2005-11-15 09:50:32 ajt Exp $ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -117,7 +117,7 @@ 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[:-1]).strip(); + line = utils.re_comments.sub('', line).strip(); if line == "": continue; @@ -164,7 +164,8 @@ 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: + ((old_maintainer_override == maintainer_override) or \ + (old_maintainer_override == "" and maintainer_override == None)): # If it's unchanged or we're in 'add only' mode, ignore it c_skipped += 1; continue; @@ -190,7 +191,7 @@ def process_file (file, suite, component, type, action): projectB.query("INSERT INTO override (suite, component, type, package, priority, section, maintainer) VALUES (%s, %s, %s, '%s', %s, %s, '%s')" % (suite_id, component_id, type_id, package, priority_id, section_id, maintainer_override)); else: - projectB.query("INSERT INTO override (suite, component, type, package, priority, section) VALUES (%s, %s, %s, '%s', %s, %s)" + projectB.query("INSERT INTO override (suite, component, type, package, priority, section,maintainer) VALUES (%s, %s, %s, '%s', %s, %s, '')" % (suite_id, component_id, type_id, package, priority_id, section_id)); if not update_p: