Open arsenalpoll opened 1 year ago
@adrianschroeter
Can you help me to take a look at this pull request? Thanks !
Can it be approved?
I'd like to keep the compression handling in the compress service to avoid a double implementation.
Is there any reason why we should duplicate the code?
I'd like to keep the compression handling in the compress service to avoid a double implementation.
Is there any reason why we should duplicate the code?
@adrianschroeter Hi, thank you very much for your reply.
My project uses the debbuild
tool, and debbuild can use the Spec file to build a Ubuntu software package.
During the use of debbuild, using the default TAR method to compress 'tar.gz', an error will be reported during decompression. After testing, it is found that changing to TAR.GZ can solve the problem. Therefore, the tar.gz compression method is added.
This is my use example: _service
<services>
<service name="tar_scm">
<param name="scm">git</param>
<param name="url">http://gitlab.xx.xx/xxx/xyz.git</param>
<param name="version">_none_</param>
<param name="revision">origin/dev</param>
<param name="filename">abc</param>
<param name="extension">tar.gz</param>
<param name="extract">abc.spec</param>
</service>
</services>
I'd like to keep the compression handling in the compress service to avoid a double implementation. Is there any reason why we should duplicate the code?
@adrianschroeter Hi, thank you very much for your reply.
My project uses the
debbuild
tool, and debbuild can use the Spec file to build a Ubuntu software package.During the use of debbuild, using the default TAR method to compress 'tar.gz', an error will be reported during decompression. After testing, it is found that changing to TAR.GZ can solve the problem. Therefore, the tar.gz compression method is added.
This is my use example:
_service
<services> <service name="tar_scm"> <param name="scm">git</param> <param name="url">http://gitlab.xx.xx/xxx/xyz.git</param> <param name="version">_none_</param> <param name="revision">origin/dev</param> <param name="filename">abc</param> <param name="extension">tar.gz</param> <param name="extract">abc.spec</param> </service> <service name="recompress"> <param name="file">*.tar</param> <param name="compression">gz</param> </service> </services>
This commit introduces the option to create a gzip compressed tarball when the 'tar.gz' extension is selected. The open mode for the tarfile is determined based on the chosen extension.
If the extension is 'tar.gz', a gzip compressed tarball will be created. Otherwise, a regular uncompressed tarball will be created.
This allows for greater flexibility when creating tarballs, without breaking existing setups that do not use gzip compression.