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 02-02-2008, 09:51 PM
Chantry Xavier
 
Default Clarify remove error message.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
---
src/pacman/remove.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/pacman/remove.c b/src/pacman/remove.c
index 56837fa..ee4e84a 100644
--- a/src/pacman/remove.c
+++ b/src/pacman/remove.c
@@ -108,8 +108,7 @@ int pacman_remove(alpm_list_t *targets)
char *targ = alpm_list_getdata(i);
if(alpm_trans_addtarget(targ) == -1) {
printf("failed.
");
- fprintf(stderr, _("error: failed to add target '%s' (%s)
"), targ,
- alpm_strerrorlast());
+ fprintf(stderr, _("error: could not find '%s' to remove
"), targ);
remove_cleanup();
FREELIST(finaltargs);
return(1);
--
1.5.4.rc4


_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 02-02-2008, 10:01 PM
"Dan McGee"
 
Default Clarify remove error message.

On Feb 2, 2008 4:51 PM, Chantry Xavier <shiningxc@gmail.com> wrote:
> Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
> ---
> src/pacman/remove.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/src/pacman/remove.c b/src/pacman/remove.c
> index 56837fa..ee4e84a 100644
> --- a/src/pacman/remove.c
> +++ b/src/pacman/remove.c
> @@ -108,8 +108,7 @@ int pacman_remove(alpm_list_t *targets)
> char *targ = alpm_list_getdata(i);
> if(alpm_trans_addtarget(targ) == -1) {
> printf("failed.
");
> - fprintf(stderr, _("error: failed to add target '%s' (%s)
"), targ,
> - alpm_strerrorlast());
> + fprintf(stderr, _("error: could not find '%s' to remove
"), targ);
> remove_cleanup();
> FREELIST(finaltargs);
> return(1);

I've actually been putting this one off for a reason- currently this
error message, although not apparant to the normal user, appears all
over when we can't add a target (package) to a package list (in this
case a removal list). I'm hesitant to change the message in this one
place because of the use of the word 'add'. Can we think of something
that can be used everywhere (sync, add, remove)?

"error: failed to find target '%s'" perhaps?

-Dan

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 02-02-2008, 11:12 PM
Xavier
 
Default Clarify remove error message.

Dan McGee wrote:
> On Feb 2, 2008 4:51 PM, Chantry Xavier<shiningxc@gmail.com> wrote:
>> Signed-off-by: Chantry Xavier<shiningxc@gmail.com>
>> ---
>> src/pacman/remove.c | 3 +--
>> 1 files changed, 1 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/pacman/remove.c b/src/pacman/remove.c
>> index 56837fa..ee4e84a 100644
>> --- a/src/pacman/remove.c
>> +++ b/src/pacman/remove.c
>> @@ -108,8 +108,7 @@ int pacman_remove(alpm_list_t *targets)
>> char *targ = alpm_list_getdata(i);
>> if(alpm_trans_addtarget(targ) == -1) {
>> printf("failed.
");
>> - fprintf(stderr, _("error: failed to add target '%s' (%s)
"), targ,
>> - alpm_strerrorlast());
>> + fprintf(stderr, _("error: could not find '%s' to remove
"), targ);
>> remove_cleanup();
>> FREELIST(finaltargs);
>> return(1);
>
> I've actually been putting this one off for a reason- currently this
> error message, although not apparant to the normal user, appears all
> over when we can't add a target (package) to a package list (in this
> case a removal list). I'm hesitant to change the message in this one
> place because of the use of the word 'add'. Can we think of something
> that can be used everywhere (sync, add, remove)?
>
> "error: failed to find target '%s'" perhaps?
>

I just noticed -S was different than -R and -U. It simply uses
strerrorlast, which might be better.

current behavior:
bash-3.2$ sudo LANG=C pacman -S foo
error: 'foo': not found in sync db
bash-3.2$ sudo LANG=C pacman -U foo
error: failed to add target 'foo' (cannot open package file)loading
package data... bash-3.2$
bash-3.2$ sudo LANG=C pacman -R foo
loading package data... failed.
error: failed to add target 'foo' (could not find or read package)

new behavior:
bash-3.2$ sudo LANG=C src/pacman/pacman -S foo
error: 'foo': not found in sync db
bash-3.2$ sudo LANG=C src/pacman/pacman -U foo
loading package data... failed.
error: 'foo': cannot open package file
bash-3.2$ sudo LANG=C src/pacman/pacman -R foo
loading package data... failed.
error: 'foo': could not find or read package

A patch for this will follow.

_______________________________________________
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 04:16 PM.

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