]> git.decadent.org.uk Git - dak.git/blobdiff - natalie
Add new top level directories
[dak.git] / natalie
diff --git a/natalie b/natalie
index d626130cdf6518ac03940636113d2f51a575fad6..4a5d62bca7ac641f41f32527bdf7c80727d74df8 100755 (executable)
--- a/natalie
+++ b/natalie
@@ -1,8 +1,8 @@
 #!/usr/bin/env python
 
 # Manipulate override files
-# Copyright (C) 2000, 2001, 2002  James Troup <james@nocrew.org>
-# $Id: natalie,v 1.4 2002-10-16 02:47:32 troup Exp $
+# Copyright (C) 2000, 2001, 2002, 2003  James Troup <james@nocrew.org>
+# $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
 
 ################################################################################
 
+# On 30 Nov 1998, James Troup wrote:
+# 
+# > James Troup<2> <troup2@debian.org>
+# > 
+# >    James is a clone of James; he's going to take over the world.
+# >    After he gets some sleep.
+# 
+# Could you clone other things too? Sheep? Llamas? Giant mutant turnips?
+# 
+# Your clone will need some help to take over the world, maybe clone up an
+# army of penguins and threaten to unleash them on the world, forcing
+# governments to sway to the new James' will!
+# 
+# Yes, I can envision a day when James' duplicate decides to take a horrific
+# vengance on the James that spawned him and unleashes his fury in the form
+# of thousands upon thousands of chickens that look just like Captin Blue
+# Eye! Oh the horror.
+# 
+# Now you'll have to were name tags to people can tell you apart, unless of
+# course the new clone is truely evil in which case he should be easy to
+# identify!
+# 
+# Jason
+# Chicken. Black. Helicopters.
+# Be afraid.
+
+# <Pine.LNX.3.96.981130011300.30365Z-100000@wakko>
+
+################################################################################
+
 import pg, sys, time;
 import utils, db_access, logging;
 import apt_pkg;
@@ -87,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;
 
@@ -134,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;
@@ -160,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: