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-02-2008, 11:18 AM
Nagy Gabor
 
Default src/pacman/sync.c : cleanup of pacman_sync

> @@ -861,7 +823,43 @@ int pacman_sync(alpm_list_t *targets)
> return(sync_list(sync_dbs, targets));
> }
>
> - return(0);
> + if(targets == NULL) {
> + if(config->op_s_sync) {
> + return(0);

I may overlook something, but won't this break -Syu?

> + } else if(config->op_s_upgrade) {
> + /* proceed */
> + } else {
> + /* don't proceed here unless we have an
> operation that doesn't require a
> + * target list */
> + pm_printf(PM_LOG_ERROR, _("no targets
> specified (use -h for help)
"));
> + return(1);
> + }
> + }

Bye


----------------------------------------------------
SZTE Egyetemi Könyvtár - http://www.bibl.u-szeged.hu
This mail sent through IMP: http://horde.org/imp/


_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 06-02-2008, 11:37 AM
Xavier
 
Default src/pacman/sync.c : cleanup of pacman_sync

2008/6/2 Nagy Gabor <ngaba@bibl.u-szeged.hu>:
>> @@ -861,7 +823,43 @@ int pacman_sync(alpm_list_t *targets)
>> return(sync_list(sync_dbs, targets));
>> }
>>
>> - return(0);
>> + if(targets == NULL) {
>> + if(config->op_s_sync) {
>> + return(0);
>
> I may overlook something, but won't this break -Syu?
>

Oops, you are right, good catch.
I probably got confused because op_s_sync used to get resetted after
doing the -y operation, but I removed that part :
- config->op_s_sync = 0;

So now, I could probably just invert the order of these two checks :
do s_upgrade check first, then s_sync.
Does that sound alright?

>> + } else if(config->op_s_upgrade) {
>> + /* proceed */
>> + } else {
>> + /* don't proceed here unless we have an
>> operation that doesn't require a
>> + * target list */
>> + pm_printf(PM_LOG_ERROR, _("no targets
>> specified (use -h for help)
"));
>> + return(1);
>> + }
>> + }
>

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 06-02-2008, 12:08 PM
Nagy Gabor
 
Default src/pacman/sync.c : cleanup of pacman_sync

> 2008/6/2 Nagy Gabor <ngaba@bibl.u-szeged.hu>:
> >> @@ -861,7 +823,43 @@ int pacman_sync(alpm_list_t *targets)
> >> return(sync_list(sync_dbs, targets));
> >> }
> >>
> >> - return(0);
> >> + if(targets == NULL) {
> >> + if(config->op_s_sync) {
> >> + return(0);
> >
> > I may overlook something, but won't this break -Syu?
> >
>
> Oops, you are right, good catch.
> I probably got confused because op_s_sync used to get resetted after
> doing the -y operation, but I removed that part :
> - config->op_s_sync = 0;
>
> So now, I could probably just invert the order of these two checks :
> do s_upgrade check first, then s_sync.
> Does that sound alright?
>

Yes.

Bye

----------------------------------------------------
SZTE Egyetemi Könyvtár - http://www.bibl.u-szeged.hu
This mail sent through IMP: http://horde.org/imp/


_______________________________________________
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 01:31 PM.

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