X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fgenerate_index_diffs.py;h=097707d8a5848a5b1a67df95d1b8d81773c83446;hb=db36ba4ad09f2b03f51e376c94b3f3879d7a01f2;hp=3fe86e112d18d01cc8fafe18a0ee9cd049827840;hpb=46ca5f337b777e413b80774e2e19669779988944;p=dak.git diff --git a/dak/generate_index_diffs.py b/dak/generate_index_diffs.py index 3fe86e11..097707d8 100755 --- a/dak/generate_index_diffs.py +++ b/dak/generate_index_diffs.py @@ -38,6 +38,7 @@ import subprocess import time import apt_pkg from daklib import utils +from daklib import database ################################################################################ @@ -254,11 +255,8 @@ def genchanges(Options, outdir, oldfile, origfile, maxdiffs = 14): if not os.path.isdir(outdir): os.mkdir(outdir) - cmd = "diff --ed - %s | gzip -c -9 > %s.gz" % (newfile, difffile) - # Do we need shell=True? - w = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE).stdin - - # I bet subprocess can do that better than this, but lets do little steps + w = os.popen("diff --ed - %s | gzip -c -9 > %s.gz" % + (newfile, difffile), "w") pipe_file(oldf, w) oldf.close() @@ -325,7 +323,9 @@ def main(): suite = suite.lower() - architectures = SuiteBlock.ValueList("Architectures") + architectures = database.get_suite_architectures(suite) + if architectures == None: + architectures = [] if SuiteBlock.has_key("Components"): components = SuiteBlock.ValueList("Components")