FS#19860 - makepkg command line option to create gzip or xz files
Attached to Project:
Pacman
Opened by ef (fredre) - Saturday, 19 June 2010, 06:27 GMT
Last edited by Allan McRae (Allan) - Monday, 11 April 2011, 04:15 GMT
Opened by ef (fredre) - Saturday, 19 June 2010, 06:27 GMT
Last edited by Allan McRae (Allan) - Monday, 11 April 2011, 04:15 GMT
|
Details
Description:
makepkg should have options for producing .gz or .xz files. For example, makepkg -J (default) could produce .pkg.tar.xz, while makepkg -z could produce .pkg.tar.gz This would be similar to the effects of editing PKGEXT= array in /etc/makepkg.conf. Also, uncompressed tar files might also be useful option to avoid compression times, e.g. .pkg.tar Reasons for feature: Convenience and time-saving. Consider a user building a large package from AUR, such as sage-mathematics-bin which is 3.4 gb. Compressing a file that size into xz could take a very long time and is generally not practical if the file is not going to be distributed. (see http://bbs.archlinux.org/viewtopic.php?pid=721137#p721137 ) Currently users can use PKGEXT='.pkg.tar.gz' in /etc/makepkg.conf to achieve this effect, but it is cumbersome having to change the config for each package. Furthermore, as the PKGEXT config is not listed in the man pages, many users are likely unaware of it. A command line option would be listed in the man pages and would make the .gz feature more visible. |
This task depends upon
Closed by Allan McRae (Allan)
Monday, 11 April 2011, 04:15 GMT
Reason for closing: Implemented
Additional comments about closing: http://projects.archlinux.org/pacman.git /commit/?id=43dacceb
Monday, 11 April 2011, 04:15 GMT
Reason for closing: Implemented
Additional comments about closing: http://projects.archlinux.org/pacman.git /commit/?id=43dacceb
Even setting the variable to .pkg.tar in the PKGBUILD works (with a warning), but you can still install the generated package with pacman.
> A command line option would be listed in the man pages and would make the .gz feature more visible.
Actually, it is listed in makepkg.conf man page, but not documented. ;)
> PKGEXT, SRCEXT
> Do not touch these unless you know what you are doing.
> Currently users can use PKGEXT='.pkg.tar.gz' in /etc/makepkg.conf to achieve this effect,
> but it is cumbersome having to change the config for each package.
I don't understand what you mean by "change the config for each package". When you install arch, you change PKGEXT in makepkg.conf to gz and you're done for the next few years. Xz doesn't make much sense for packages that are not distributed.
> makepkg should have options for producing .gz or .xz files.
Since this is a feature that presumably won't be used often, I favor setting the PKGEXT variable from the commandline as it's already done for PKGDEST/SRCPKGDEST and SRCDEST:
PKGEXT=.tar.gz makepkg
> Since this is a feature that presumably won't be used often, I favor setting
> the PKGEXT variable from the commandline as it's already done for
> PKGDEST/SRCPKGDEST and SRCDEST
> PKGEXT=.tar.gz makepkg
Doesn't work.
makepkg doesn't treat PKGEXT as environmental:
$ echo PKGEXT=.pkg.tar.gz >> ~/.makepkg.conf
$ PKGEXT=.pkg.tar.xz makepkg >/dev/null
$ ls *.pkg.*
dwm-5.8.2-2-i686.pkg.tar.gz
On the other hand, {SRC,PKG}DEST does prioritize exported values.
PACMAN has the same inconsistency.
Of course it doesn't work. I just said I would prefer an environment variable over wasting a commandline flag for this.
PKGEXT=.pkg.tar.gz makepkg
SRCEXT=.pkg.tar.gz makepkg --source
to override these on the command line.