Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 143424 - built_with_use confusing die message if best_version fails
Summary: built_with_use confusing die message if best_version fails
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-09 23:18 UTC by Ed Catmur
Modified: 2006-08-10 19:21 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 Ed Catmur 2006-08-09 23:18:50 UTC
See e.g. bug 143423.

  ebuild.sh, line 1559:   Called dyn_setup
  ebuild.sh, line 666:   Called pkg_setup
  porthole-0.4.1.ebuild, line 22:   Called built_with_use '<dev-python/pygtk-2.8.0-r2' 'gnome'
  eutils.eclass, line 1592:   Called die

!!! Unable to determine what USE flags  was built with
                                      ^^

Suggest built_with_use die immediately if best_version fails:

 built_with_use() {
     local opt=$1
     [[ ${opt:0:1} = "-" ]] && shift || opt="-a"
 
     local PKG=$(best_version $1)
+    [[ $PKG ]] || die "Unable to resolve $1 to an installed package"
     shift
 
     local USEFILE=${ROOT}/var/db/pkg/${PKG}/USE
 
     # if the USE file doesnt exist, assume the $PKG is either
     # injected or package.provided
     [[ ! -e ${USEFILE} ]] && die "Unable to determine what USE flags $PKG was built with"
Comment 1 SpanKY gentoo-dev 2006-08-10 19:21:50 UTC
added to cvs, cheers