-
Notifications
You must be signed in to change notification settings - Fork 443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't compress debian packages #787
Conversation
Thanks @pauldraper for your contribution. Disabling compression sounds like a reasonable default. Also you could achieve a similar effect by using Your code looks good. Could you implement a new test that sets the |
ece12f0
to
43c227a
Compare
Also allow custom options to dpkg-deb --build
43c227a
to
662dbe3
Compare
Tests and documentation added. |
@@ -43,6 +43,7 @@ trait DebianNativePackaging extends DebianPluginLike { | |||
* package. | |||
*/ | |||
private[debian] def debianNativeSettings: Seq[Setting[_]] = inConfig(Debian)(Seq( | |||
debianNativeBuildOptions += "-Znone", // packages are largely JARs, which are already compressed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't scope this. The setting is already prefixed with debian. I just realised it after reading the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is a bit too much refactoring for you, I can adjust that after merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that debian...
keys are scoped to the Debian
config whenever possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This more a bug then a feature :( I think we clean this up in another PR. Thanks a lot for your work :)
Representative example:
A Play project takes 30 seconds for
dpkg-deb
to build a 70MB deb with compression.The same project takes 1 second to build a 79MB deb without compression.
Since JARs are already compressed archives, a sensible default is to not compress them again. (In fact, I'd be surprised if the small gains in client downloads weren't almost entirely overcome by the time to decompress.)
Users can use
debianNativeBuildOptions
to override options fordpkg-deb
if they would like a different compression type, level, etc.