X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=utils.py;h=4d6115b4d819fe173555744002afdde080e78286;hb=1ba60087369248b566ecb50cde94a5cea86bef33;hp=59beb2af6df05421eb6b7bb8581685c9d3282417;hpb=4edf024f09a7e8d813804dbba797efb95c3abfe6;p=dak.git diff --git a/utils.py b/utils.py index 59beb2af..4d6115b4 100644 --- a/utils.py +++ b/utils.py @@ -1,6 +1,6 @@ # Utility functions # Copyright (C) 2000, 2001, 2002 James Troup -# $Id: utils.py,v 1.44 2002-05-18 23:54:51 troup Exp $ +# $Id: utils.py,v 1.47 2002-06-08 00:18:02 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 @@ -16,7 +16,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -import os, pwd, re, socket, shutil, string, sys, tempfile +import commands, os, pwd, re, socket, shutil, string, sys, tempfile import apt_pkg re_comments = re.compile(r"\#.*") @@ -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;