Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 34814 - man 5 ebuild : best_version error in description of function return
Summary: man 5 ebuild : best_version error in description of function return
Status: RESOLVED INVALID
Alias: None
Product: [OLD] Docs-developer
Classification: Unclassified
Component: Portage Documentation (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-01 04:44 UTC by Andrew Bevitt
Modified: 2003-12-01 07:27 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Bevitt 2003-12-01 04:44:15 UTC
best_version <package name>
  This function will look up package name in the database of currently 
  installed  programs  and  echo the  "best version" of the package that 
  is currently installed.  
// Here is problem
  The function returns 0 if there is a package that matches package name. 
  Otherwise, the function will return 1.

if best_version <pkg>/<cat> ; 

Returns true when the package is installed, but that line above says it will
return 0, or false, at least to me...

Reproducible: Always
Steps to Reproduce:
Comment 1 SpanKY gentoo-dev 2003-12-01 07:27:52 UTC
it is correct ... nick for some reason decided to return shell true/false :P

you have to use this syntax:
if best_version blah/blah ; then
you cant use this:
if [ `best_version blah/blah` ] ; then