[pacman-dev] [PATCH] Use pipe to create compressed package instead of an intermediate tar file

Jürgen Hötzel juergen at archlinux.org
Fri Aug 27 12:23:09 EDT 2010


2010/8/27 Dan McGee <dpmcgee at gmail.com>:
>> +       # TODO: Maybe this can be set globally for robustness
>> +       shopt -s -o pipefail
>> +       bsdtar -cf - $comp_files *|
> Can we get a space between * and |? I spent a few minutes trying to
> figure out what the *| operator was.

For sure this was bad style formating.
>> +       case "$PKGEXT" in
>> +           *tar.gz)  gzip -c -f -n ;;
>> +           *tar.bz2) bzip2 -c -f ;;
>> +           *tar.xz)  xz -c -z - ;;
>> +           *tar)     cat ;;
>> +       esac >>${pkg_file} || ret=$?
> Append seems no good here- if you used -f, won't you get a nice
> invalid package file? We should just be able to use >, and please
> stick a space between the > and the filename to match our style
> elsewhere. Also a trailing space here.

Ups. Really good catch Dan. This would have introdroduce a subtle bug.

Jürgen


More information about the pacman-dev mailing list