You are not logged in.

#1 2014-07-22 17:21:23

kunaguvarun
Member
Registered: 2013-12-27
Posts: 3

[SOLVED]yaourt reporting issues

Hi all,
New arch user here. I just want to know that why yaourt doesn't report any error if target package is not available in AUR?
For example, issuing the following command doesn't produce any output.

yaourt thispackagedoesnotexist

As a user I would at least expect yaourt to let me know that package is not available in AUR. I kinda want yaourt to react to these situations just as pacman does. My apologies if this has already been asked

Last edited by kunaguvarun (2014-07-24 03:36:23)

Offline

#2 2014-07-22 17:41:46

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]yaourt reporting issues

You should ask this upstream.

$ yaourt -S thispackagedoesnotexist
error: target not found: thispackagedoesnotexist

Offline

#3 2014-07-22 17:49:15

mkoskar
Member
Registered: 2014-07-16
Posts: 64
Website

Re: [SOLVED]yaourt reporting issues

Also, generally don't neglect exit status. Lack of output can just be a "design" decision.

Usually exit status 1 means that something unspecified or general went wrong during program execution.
Exit status 2 usually means that provided input parameters are wrong, doesn't make sense, missing, etc.

It's best to has an exit status in your PROMPT so you immediately see, if it's not 0 than something went wrong.

Last edited by mkoskar (2014-07-22 17:50:22)

Offline

#4 2014-07-22 17:52:17

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,517
Website

Re: [SOLVED]yaourt reporting issues

kunaguvarun wrote:

I kinda want yaourt to react to these situations just as pacman does.

It already does.  Searching (or -Ss equivalent) is the default behavior if no flags are provided to yaourt.  Compare to pacman:

$ pacman -Ss somethingnonexistent

$

"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2014-07-22 18:05:20

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED]yaourt reporting issues

There is a difference between no options specified and -Ss switches:

$ yaourt thispackagedoesnotexist; echo $?
0
$ yaourt -Ss thispackagedoesnotexist; echo $?
1

Offline

#6 2014-07-22 18:28:37

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,517
Website

Re: [SOLVED]yaourt reporting issues

I stand corrected.  I only briefly used yaourt quite a long while ago.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2014-07-22 18:35:06

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED]yaourt reporting issues

I did not know this either, tried it just now. Maybe the no-options approach looses the exit status around a wrapper somewhere.

Edit: So just remember to use 'yaourt -Ss' OP. You may want to look how to customize your shells prompt so that the exit status is always visible.

Last edited by emeres (2014-07-22 19:04:20)

Offline

#8 2014-07-23 03:21:29

kunaguvarun
Member
Registered: 2013-12-27
Posts: 3

Re: [SOLVED]yaourt reporting issues

Thank you all for your replies. smile

Offline

#9 2014-07-23 03:23:55

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,701

Re: [SOLVED]yaourt reporting issues

yaourt is an AUR offering.   Moving to AUR issues.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB