Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#35226 - makepkg does not use the COMPRESSION DEFAULTS from makepkg.conf to extract source files

Attached to Project: Pacman
Opened by Christian Krause (wookietreiber) - Sunday, 12 May 2013, 20:33 GMT
Last edited by Allan McRae (Allan) - Sunday, 29 June 2014, 10:14 GMT
Task Type Feature Request
Category makepkg
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 4.1.0
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: makepkg does not use the COMPRESSION DEFAULTS from makepkg.conf to extract source files.

From what I can tell (see function extract_file), bsdtar from libarchive is used for all tarballs and hard-coded gzip/bzip2/xz are used for compressed non-tarball files.

This extraction process could be improved. I tend to use pigz and pbzip2 as drop-in replacements for gzip and bzip2 (full compatibility), because they make use of all my cores instead of just one. bsdtar might be nice because it extracts all the application/x-tar application/zip application/x-zip application/x-cpio file types (see function extract_file) with a single command, but it wastes a lot of time by using just one core.

Please improve the extract_file function to make use of the user-defined COMPRESSION DEFAULTS of makepkg.conf to allow quicker extraction, especially in multi-core environments -- for large sources, a lot of time gets wasted by not allowing the use of all cores.


Additional info:
* package version: 4.1.1-1
* https://www.archlinux.org/packages/?q=pigz
* https://www.archlinux.org/packages/?q=pbzip2
* config example from makepkg.conf:

#########################################################################
# COMPRESSION DEFAULTS
#########################################################################
#
COMPRESSGZ=(pigz -c -f -n)
COMPRESSBZ2=(pbzip2 -c -f)
This task depends upon

Closed by  Allan McRae (Allan)
Sunday, 29 June 2014, 10:14 GMT
Reason for closing:  Won't implement
Comment by KaiSforza (KaiSforza) - Monday, 13 May 2013, 00:27 GMT
I'm just thinking there would need to be a separate DECOMPRESS{GZ,BZ2,...} for this.
Comment by Christian Krause (wookietreiber) - Monday, 13 May 2013, 07:03 GMT
Not necessarily, since all conform compression tools accept a '-d' flag for decompression. Thus:

DECOMPRESS="$COMPRESS -d"
Comment by Phillip Smith (fukawi2) - Tuesday, 14 May 2013, 05:18 GMT
I don't see how we can take (by definition) commands used for compressing, and reliably/sanely convert them to commands for decompressing.

For example, the current default for GZ files is COMPRESSGZ=(gzip -c -f -n)
Now which flags do we strip?
Do we strip them all? Not ideal and will result in (unexpected) behaviour.
Do we assume that '-c' means compress so change that to a -d? Not very safe.

Appending a -d to override a previous -c isn't very sane either.
Comment by Christian Krause (wookietreiber) - Tuesday, 14 May 2013, 10:41 GMT
Yeah, you're right, that's propably not a good idea.

Loading...