You are not logged in.
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 thispackagedoesnotexistAs 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
You should ask this upstream.
$ yaourt -S thispackagedoesnotexist
error: target not found: thispackagedoesnotexistOffline
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
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
There is a difference between no options specified and -Ss switches:
$ yaourt thispackagedoesnotexist; echo $?
0
$ yaourt -Ss thispackagedoesnotexist; echo $?
1Offline
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
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
Thank you all for your replies. ![]()
Offline
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