summaryrefslogtreecommitdiff
path: root/dpkg-deb/build.c
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2015-05-25 06:00:54 +0200
committerGuillem Jover <guillem@debian.org>2015-05-30 02:57:59 +0200
commit2ae3e07e436175b8424534539c63565bb70f67f2 (patch)
tree58e44a64dc96740cd434d817cb3cb714a9b11cca /dpkg-deb/build.c
parent0fc916a4a8cf43cf22abd720bd14d8ca355366ff (diff)
downloaddpkg-2ae3e07e436175b8424534539c63565bb70f67f2.tar.gz
dpkg-deb: Set correct default compression value for control.tar.gz member
Regression introduced in commit f1f9887b8f96965d6046857d12fda24c053c6d4b. The compressor independent way to denote the default value has been to use -1, but that needs to be fixed up to the actual default value per compressor, before the compressor specific setup. When using the gzip command-line tool this is a fatal error as it does not recognize the argument «-c-1». When using the zlib shared library this makes the code always default to the compression level 1, as ‘-’ is ignored by gzdopen(). The current minimal fix is to call compressor_check_params() when setting up the default control.tar compressor paramaters, although that makes the API hard to use correctly. This will be improved in the future. Closes: #786654
Diffstat (limited to 'dpkg-deb/build.c')
-rw-r--r--dpkg-deb/build.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
index 3a68cad7e..94d75ff4f 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
@@ -527,6 +527,8 @@ do_build(const char *const *argv)
control_compress_params.type = COMPRESSOR_TYPE_GZIP;
control_compress_params.strategy = COMPRESSOR_STRATEGY_NONE;
control_compress_params.level = -1;
+ if (!compressor_check_params(&control_compress_params, &err))
+ internerr("invalid control member compressor params: %s", err.str);
}
c2 = subproc_fork();