X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fgenerate_index_diffs.py;h=097707d8a5848a5b1a67df95d1b8d81773c83446;hb=db36ba4ad09f2b03f51e376c94b3f3879d7a01f2;hp=f3f7a4a16bfec70f48db0b62268519c36031c6e1;hpb=af486e867c2809515c09ae4f854a95355112010e;p=dak.git diff --git a/dak/generate_index_diffs.py b/dak/generate_index_diffs.py index f3f7a4a1..097707d8 100755 --- a/dak/generate_index_diffs.py +++ b/dak/generate_index_diffs.py @@ -1,7 +1,8 @@ #!/usr/bin/env python +""" generates partial package updates list""" + ########################################################### -# generates partial package updates list # idea and basic implementation by Anthony, some changes by Andreas # parts are stolen from 'dak generate-releases' @@ -37,6 +38,7 @@ import subprocess import time import apt_pkg from daklib import utils +from daklib import database ################################################################################ @@ -253,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=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() @@ -324,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")