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 06-14-2008, 07:10 PM
Xavier
 
Default Combine repo-add and repo-remove into one script

Dan McGee wrote:
> They shared about 75% of their code, so there is no real reason we should
> maintain them separately. Merge the differences accordingly and add a check
> based on the basename of the command used to decide what behavior to follow.
>
> Signed-off-by: Dan McGee<dan@archlinux.org>

I loved that idea, but it turned out to be more complicated than I
expected and hoped. Especially the fact that we need to do the check
(repo-add or repo-remove) several times.

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 06-14-2008, 09:04 PM
Xavier
 
Default Combine repo-add and repo-remove into one script

Dan McGee wrote:
> On Sat, Jun 14, 2008 at 2:10 PM, Xavier<shiningxc@gmail.com> wrote:
>> Dan McGee wrote:
>>> They shared about 75% of their code, so there is no real reason we should
>>> maintain them separately. Merge the differences accordingly and add a check
>>> based on the basename of the command used to decide what behavior to follow.
>>>
>>> Signed-off-by: Dan McGee<dan@archlinux.org>
>> I loved that idea, but it turned out to be more complicated than I
>> expected and hoped. Especially the fact that we need to do the check
>> (repo-add or repo-remove) several times.
>
> The number of small differences could probably be reduced, but the
> main intention of this patch was just to get it in one script. I would
> guess we could do some things a bit differently, notably the
> test_repo_db_file() part which should not really need to know which
> script is being called. The only other part which might be changeable
> is the "all packages removed" section, which I am not too keen on
> anyway- we are counting on a failure code from ls to get us there.
>

Indeed, reading the script again, these are basically the two places
that I didn't like much.

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




All times are GMT. The time now is 05:10 AM.

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