]> git.decadent.org.uk Git - dak.git/blobdiff - utils.py
2.2r7 was released
[dak.git] / utils.py
index b2adbaa64ca5d72c659f6c5b4802510f0068a884..b019d2ef8d58ac4898e39f067bc8ec0e9149ef6c 100644 (file)
--- a/utils.py
+++ b/utils.py
@@ -1,6 +1,6 @@
 # Utility functions
 # Copyright (C) 2000, 2001, 2002  James Troup <james@nocrew.org>
-# $Id: utils.py,v 1.45 2002-05-19 00:47:27 troup Exp $
+# $Id: utils.py,v 1.48 2002-06-22 22:34:35 troup 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
@@ -29,7 +29,7 @@ re_issource = re.compile (r"(.+)_(.+?)\.(orig\.tar\.gz|diff\.gz|tar\.gz|dsc)$");
 
 re_single_line_field = re.compile(r"^(\S*)\s*:\s*(.*)");
 re_multi_line_field = re.compile(r"^\s(.*)");
-re_taint_free = re.compile(r"^[-+\.\w]+$");
+re_taint_free = re.compile(r"^[-+~\.\w]+$");
 
 re_parse_maintainer = re.compile(r"^\s*(\S.*\S)\s*\<([^\> \t]+)\>");
 
@@ -506,6 +506,7 @@ def prefix_multi_line_string(str, prefix):
 def validate_changes_file_arg(file, fatal=1):
     error = None;
 
+    orig_filename = file
     if file[-6:] == ".katie":
         file = file[:-6]+".changes";
 
@@ -520,15 +521,20 @@ def validate_changes_file_arg(file, fatal=1):
 
     if error:
         if fatal:
-            fubar("%s: %s." % (file, error));
+            fubar("%s: %s." % (orig_filename, error));
         else:
-            warn("Skipping %s - %s" % (file, error));
+            warn("Skipping %s - %s" % (orig_filename, error));
             return None;
     else:
         return file;
 
 ################################################################################
 
+def real_arch(arch):
+    return (arch != "source" and arch != "all");
+
+################################################################################
+
 def get_conf():
        return Cnf;