diff options
author | Jeroen Roovers <jer@gentoo.org> | 2013-05-16 14:25:13 +0000 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2013-05-16 14:25:13 +0000 |
commit | afe5b53550e670839f51b4571c5eab5ec0637353 (patch) | |
tree | ffeccf1758c4dd936af0e58224f0f5aa5d6f347a /eclass | |
parent | Stable for HPPA (bug #461182). (diff) | |
download | gentoo-2-afe5b53550e670839f51b4571c5eab5ec0637353.tar.gz gentoo-2-afe5b53550e670839f51b4571c5eab5ec0637353.tar.bz2 gentoo-2-afe5b53550e670839f51b4571c5eab5ec0637353.zip |
Check for lspci before use.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 5 | ||||
-rw-r--r-- | eclass/nvidia-driver.eclass | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 29ed039c3a9d..2ea4961d0446 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.825 2013/05/15 19:01:36 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.826 2013/05/16 14:25:13 jer Exp $ + + 16 May 2013; Jeroen Roovers <jer@gentoo.org> nvidia-driver.eclass: + Check for lspci before use. 15 May 2013; Michał Górny <mgorny@gentoo.org> eutils.eclass: prune_libtool_files: do not remove .la files which are not libtool files. diff --git a/eclass/nvidia-driver.eclass b/eclass/nvidia-driver.eclass index ead3856b920d..6d1d23c9a7f1 100644 --- a/eclass/nvidia-driver.eclass +++ b/eclass/nvidia-driver.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/nvidia-driver.eclass,v 1.21 2013/04/10 15:10:18 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/nvidia-driver.eclass,v 1.22 2013/05/16 14:25:13 jer Exp $ # @ECLASS: nvidia-driver.eclass # @MAINTAINER: @@ -49,7 +49,10 @@ mask_304x=">=x11-drivers/nvidia-drivers-305.0.0" # @DESCRIPTION: # Retrieve the PCI device ID for each Nvidia video card you have nvidia-driver-get-card() { - local NVIDIA_CARD="$(/usr/sbin/lspci -d 10de: -n | awk -F'[: ]' '/ 0300: /{print $6}')" + local NVIDIA_CARD=$( + [ -x /usr/sbin/lspci ] && /usr/sbin/lspci -d 10de: -n \ + | awk -F'[: ]' '/ 0300: /{print $6}' + ) if [ -n "$NVIDIA_CARD" ]; then echo "$NVIDIA_CARD" |