Hi,

On Mon, 29 Jul 2013, Guillem Jover wrote:
> > The linux maintainers chose to pass -Zgzip -z0 to dpkg-deb to retain
> > backwards compatibility.
> 
> To retain compatibility they should either not have specified -z at all
> or used -z9. dpkg-deb(1) is pretty clear that -z0 for gzip is equivalent
> to no compression.

They want no compression but they want to work with old dpkg too:

# We don't want to recompress, but -Znone is not compatible with older
# tools and is currently rejected by dak.  -Zgzip -z0 has almost the
# same effect.

> At this point I'm tempted to just deprecate -Zgzip -z0. I'll fix this
> in any way for 1.17.2.

Suggested patch (untested):

$ git diff
diff --git a/lib/dpkg/compress.c b/lib/dpkg/compress.c
index 12c694c..63df7af 100644
--- a/lib/dpkg/compress.c
+++ b/lib/dpkg/compress.c
@@ -771,6 +771,8 @@ compressor_get_strategy(const char *name)
 bool
 compressor_check_params(struct compress_params *params, struct dpkg_error *err)
 {
+       compressor_fixup_params(params);
+
        if (params->strategy == compressor_strategy_none)
                return true;
 
The fixup function for gzip already switches the compression_type to none, but
it's only called in compress_filter() which happens in a sub-process. Calling
it when we validate the parameters seems a good way to have it happen in the
main process as well and avoid this problem.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Discover the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to