FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 12-01-2009, 02:02 AM
"Allan McRae"
 
Default makepkg: allow to specify an alternative pacman command

Dan McGee wrote:

On Thu, Nov 19, 2009 at 10:14 PM, Allan McRae <allan@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.
 
Old 12-02-2009, 02:03 PM
Cedric Staniewski
 
Default makepkg: allow to specify an alternative pacman command

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@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##*/}
null
$
 

Thread Tools




All times are GMT. The time now is 09:59 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org