From: Julian Andres Klode Date: Sun, 13 Mar 2016 14:01:46 +0000 (+0100) Subject: Only generate binary checksum fields for the requested ones X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=2961c54465fca8fb45790906cb9f715cc36e204e;p=dak.git Only generate binary checksum fields for the requested ones This is the second step. As we are simply concatenating things, we can just concatenate an empty string if we do not want a checksum. --- diff --git a/dak/generate_packages_sources2.py b/dak/generate_packages_sources2.py index e44d9cee..84983e16 100755 --- a/dak/generate_packages_sources2.py +++ b/dak/generate_packages_sources2.py @@ -205,9 +205,9 @@ SELECT || E'\nPriority\: ' || COALESCE(pri.priority, tmp.fallback_priority) || E'\nFilename\: pool/' || :component_name || '/' || tmp.filename || E'\nSize\: ' || tmp.size - || E'\nMD5sum\: ' || tmp.md5sum - || E'\nSHA1\: ' || tmp.sha1sum - || E'\nSHA256\: ' || tmp.sha256sum + || CASE WHEN sui.checksums && array['md5sum'] THEN E'\nMD5sum\: ' || tmp.md5sum ELSE '' END + || CASE WHEN sui.checksums && array['sha1'] THEN E'\nSHA1\: ' || tmp.sha1sum ELSE '' END + || CASE WHEN sui.checksums && array['sha256'] THEN E'\nSHA256\: ' || tmp.sha256sum ELSE '' END FROM tmp @@ -217,6 +217,7 @@ FROM AND o.component = :component LEFT JOIN section sec ON sec.id = o.section LEFT JOIN priority pri ON pri.id = o.priority + LEFT JOIN suite sui ON suite.id = :suite WHERE (