]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/utils.py
create uncompressed Packages files for etch/sid while Contents generation bug exists
[dak.git] / daklib / utils.py
index 47978228663aa5ee42033a9b95556ddf671305a0..527f76b0b585cb1b42754560de9d2f1923ba2185 100644 (file)
@@ -2,7 +2,6 @@
 
 # Utility functions
 # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006  James Troup <james@nocrew.org>
-# $Id: utils.py,v 1.73 2005-03-18 05:24:38 troup Exp $
 
 ################################################################################
 
@@ -23,7 +22,7 @@
 ################################################################################
 
 import codecs, commands, email.Header, os, pwd, re, select, socket, shutil, \
-       string, sys, tempfile, traceback
+       sys, tempfile, traceback
 import apt_pkg
 import database
 
@@ -98,14 +97,6 @@ def our_raw_input(prompt=""):
 
 ################################################################################
 
-def str_isnum (s):
-    for c in s:
-        if c not in string.digits:
-            return 0
-    return 1
-
-################################################################################
-
 def extract_component_from_section(section):
     component = ""
 
@@ -617,7 +608,7 @@ argument:
 
     orig_filename = filename
     if filename.endswith(".dak"):
-        filename = filename[:-6]+".changes"
+        filename = filename[:-4]+".changes"
 
     if not filename.endswith(".changes"):
         error = "invalid file type; not a changes file"
@@ -683,7 +674,7 @@ def parse_args(Options):
             else:
                 suite_ids_list.append(suite_id)
         if suite_ids_list:
-            con_suites = "AND su.id IN (%s)" % ", ".join(map(str, suite_ids_list))
+            con_suites = "AND su.id IN (%s)" % ", ".join([ str(i) for i in suite_ids_list ])
         else:
             fubar("No valid suite given.")
     else:
@@ -699,7 +690,7 @@ def parse_args(Options):
             else:
                 component_ids_list.append(component_id)
         if component_ids_list:
-            con_components = "AND c.id IN (%s)" % ", ".join(map(str, component_ids_list))
+            con_components = "AND c.id IN (%s)" % ", ".join([ str(i) for i in component_ids_list ])
         else:
             fubar("No valid component given.")
     else:
@@ -720,7 +711,7 @@ def parse_args(Options):
                 else:
                     arch_ids_list.append(architecture_id)
         if arch_ids_list:
-            con_architectures = "AND a.id IN (%s)" % ", ".join(map(str, arch_ids_list))
+            con_architectures = "AND a.id IN (%s)" % ", ".join([ str(i) for i in arch_ids_list ])
         else:
             if not check_source:
                 fubar("No valid architecture given.")