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 11-06-2009, 07:18 PM
Cedric Staniewski
 
Default makepkg: move pacman calls to a function

Xavier wrote:
> On Fri, Nov 6, 2009 at 8:47 PM, Cedric Staniewski <cedric@gmx.ca> wrote:
>> Signed-off-by: Cedric Staniewski <cedric@gmx.ca>
>> ---
>> I'm not sure about that part
>>
>> pmout=$(run_pacman -T "$@")
>>
>> for two reasons. First, we have to work around sudo in run_pacman, and
>> second, most of the pacman wrappers does not support -T or do not return
>> the same codes as pacman does. For this second reason, the following patch
>> would be (currently) useless for the majority of pacman wrapper users.
>>
>>
>
> This comment makes more sense after reading your second patch
> where you make run_pacman use a specified $PACMAN binary
>
> I think its fine to keep calling pacman directly for -T operation, and
> allow a wrapper for the others.


I think it mostly depends on if the second patch gets applied or not. In any case, I will send patches without run_pacman -T.
 
Old 11-10-2009, 09:28 PM
Allan McRae
 
Default makepkg: move pacman calls to a function

Dan McGee wrote:

On Fri, Nov 6, 2009 at 2:20 PM, Cedric Staniewski <cedric@gmx.ca> wrote:

Signed-off-by: Cedric Staniewski <cedric@gmx.ca>
---


Seems pretty reasonable to me; Allan, is this OK?



I have been thinking about this and its companion patch. I like the
refactoring of the pacman call into the function but dislike not
replacing the "pacman -T" call with it.


If there is a config option for setting the "pacman" binary, and I have
program that replaces pacman (e.g. the one based on the python alpm
wrapper should work), then I should not need pacman on my system at all.


So I prefer the original version where the "pacman -T" call was replaced
too.


Allan
 
Old 11-12-2009, 01:00 PM
Cedric Staniewski
 
Default makepkg: move pacman calls to a function

Xavier wrote:
> On Thu, Nov 12, 2009 at 2:08 PM, Cedric Staniewski <cedric@gmx.ca> wrote:
>>> I have been thinking about this and its companion patch. I like the
>>> refactoring of the pacman call into the function but dislike not
>>> replacing the "pacman -T" call with it.
>>>
>>> If there is a config option for setting the "pacman" binary, and I have
>>> program that replaces pacman (e.g. the one based on the python alpm
>>> wrapper should work), then I should not need pacman on my system at all.
>>>
>>> So I prefer the original version where the "pacman -T" call was replaced
>>> too.
>>>
>> And leave it to the pacman wrapper authors to fix their programs? Sounds
>> good.
>> I also prefer the original patch, mainly because it seems 'cleaner' to
>> me, but being able to replace pacman completely on a system is a valid
>> reason, too.
>>
>>
>
> Well, I am still not convinced.
> Why would any wrapper have to care about pacman -T ?
> This is a hidden / undocumented / internal argument just for the usage
> of makepkg.
>
> In the best case, a wrapper will just forward it correctly. In the
> worst case, it will break it.

Since pacman 3.3 it is not that hidden anymore[1].

[1]
http://projects.archlinux.org/pacman.git/commit/?id=9af9c0f328094228fa363d842ddc9b2a605f0d22
 
Old 11-12-2009, 01:13 PM
Cedric Staniewski
 
Default makepkg: move pacman calls to a function

Xavier wrote:
> On Thu, Nov 12, 2009 at 2:51 PM, Dan McGee <dpmcgee@gmail.com> wrote:
>> Doesn't look undocumented to me:
>> -T, --deptest
>> Check dependencies; this is useful in scripts such as makepkg to
>> check installed packages. This operation will check each dependency
>> specified and return a list of those which are not currently
>> satisfied on the system. This operation accepts no other options.
>> Example usage: pacman -T qt "bash>=3.2".
>>
>>
>
> Ahah ok. Well I am still not sure what a wrapper could add to that
> functionality, besides breaking it. But if everyone is against me,
> then I will shut up It is not a big deal.

It would be possible to get rid of -T and depend on vercmp for the
installed dependency check. I am not sure if this is any better though
(probably rather worse).
 

Thread Tools




All times are GMT. The time now is 04:21 PM.

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