[pacman-dev] [PATCH 2/2] makepkg: allow to specify an alternative pacman command

Cedric Staniewski cedric at gmx.ca
Wed Dec 2 10:03:08 EST 2009

On 12/01/2009 04:02 AM, Allan McRae wrote:
> Dan McGee wrote:
>> On Thu, Nov 19, 2009 at 10:14 PM, Allan McRae <allan at archlinux.org>
>> wrote:
>>>> @@ -350,7 +350,7 @@ check_deps() {
>>>>        if (( ret == 127 )); then #unresolved deps
>>>>                echo "$pmout"
>>>>        elif (( ret )); then
>>>> -               error "$(gettext "Pacman returned a fatal error (%i):
>>>> %s")" "$ret" "$pmout"
>>>> +               error "$(gettext "%s returned a fatal error (%i): %s")"
>>>> "${PACMAN##*/}" "$ret" "$pmout"
>>> Should we also strip any flags provided in the PACMAN variable?  e.g. I
>>> could set PACMAN="pacman -v" for verbose output.  I guess some wrappers
>>> might have flags that would be useful to specify.
>> I would say no to this; if a person wants flags then we shouldn't mess
>> with them.
> Me too, thinking about it now....   The flag could be causing the return
> failure so it is important to keep it there.

We should also keep the full path in this case. It was only meant as a
cosmetic change anyway but it is not guaranteed that ${PACMAN##*/} will
return the name of the pacman binary.

$ PACMAN="pacman --logfile /dev/null"
$ echo ${PACMAN##*/}

More information about the pacman-dev mailing list