summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-09-11 03:28:58 +0000
committerMike Frysinger <vapier@gentoo.org>2006-09-11 03:28:58 +0000
commit9a1185aa238818fa6bd333b5e2365b99a2e7a2b9 (patch)
treeedeca8bbce99a91fd400e047783f7eccc49fe0e4 /eclass/eutils.eclass
parentversion bump (diff)
downloadhistorical-9a1185aa238818fa6bd333b5e2365b99a2e7a2b9.tar.gz
historical-9a1185aa238818fa6bd333b5e2365b99a2e7a2b9.tar.bz2
historical-9a1185aa238818fa6bd333b5e2365b99a2e7a2b9.zip
sanity check the package capabilities in built_with_use #146655 by kristian meier
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r--eclass/eutils.eclass6
1 files changed, 5 insertions, 1 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index 6314f938b11a..5381ad7a59fa 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.248 2006/08/19 13:52:02 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.249 2006/09/11 03:28:58 vapier Exp $
#
# This eclass is for general purpose functions that most ebuilds
# have to implement themselves.
@@ -1595,11 +1595,15 @@ built_with_use() {
shift
local USEFILE=${ROOT}/var/db/pkg/${PKG}/USE
+ local IUSEFILE=${ROOT}/var/db/pkg/${PKG}/IUSE
# 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"
+ local IUSE_BUILT=$(<${IUSEFILE})
+ has $1 ${IUSE_BUILT} || die "$PKG does not actually support the $1 USE flag!"
+
local USE_BUILT=$(<${USEFILE})
while [[ $# -gt 0 ]] ; do
if [[ ${opt} = "-o" ]] ; then