From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12405 invoked by uid 1002); 15 Oct 2003 18:45:43 -0000 Mailing-List: contact gentoo-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Received: (qmail 10023 invoked from network); 15 Oct 2003 18:45:43 -0000 Date: Wed, 15 Oct 2003 20:43:41 +0200 (IST) From: Eldad Zack To: Andrew Gaffney Cc: Gentoo Dev In-Reply-To: <3F8CA137.1000807@technaut.darktalker.net> Message-ID: References: <3F8C29D0.3050601@technaut.darktalker.net> <1066175233.16767.35.camel@localhost> <3F8CA137.1000807@technaut.darktalker.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [gentoo-dev] correct package depends X-Archives-Salt: 671a1af9-9ed4-459a-92dd-e15c4c45bb3c X-Archives-Hash: b5c251741a73a7d9b9c0be2f74a28439 On Tue, 14 Oct 2003, Andrew Gaffney wrote: > Chris Gianelloni wrote: > > On Tue, 2003-10-14 at 12:52, Andrew Gaffney wrote: > > > >>Is there a program/script out there that can give me the same information at 'qpkg -q' > >>*and* take into account the USE flags packages were compiled with? If not, I'm going to > >>write one. > > > > > > Why not add the functionality to qpkg? > > First of all, I'm not a very good bash/sed/awk/grep/etc. programmer. Second, I believe > that is beyond the functionality of a bash script. > > -- > Andrew Gaffney > > > -- > gentoo-dev@gentoo.org mailing list > > I've wanted the same functionality myself, so I went ahead and changed qpkg. apply this patch to qpkg. If the developers maintaining gentoolkit would apply this at well, it'll be even better. --- /usr/bin/qpkg 2003-10-03 13:23:58.000000000 +0200 +++ qpkg 2003-10-15 20:35:24.000000000 +0200 @@ -376,6 +376,21 @@ home=`grep HOMEPAGE ${p}| cut -d\" -f2` desc=`grep DESCRIPTION ${p}| cut -d\" -f2` echo -e "${T}${BL}${desc}${NO} [ ${YL}${home}${NO} ]" + if [ ${verb} -gt 0 ]; then + pdir=${p/$(basename ${p})/} + if [[ -r ${pdir}/USE ]]; then + echo -n "Compiled with USE Flags: " + for flag in $(<${pdir}/IUSE) + do + use=$(grep -o ${flag} ${pdir}/USE | tr -d '\n') + if [[ "${use}" == "" ]]; then + echo -n "-" + fi + echo -n "${flag} " + done + echo + fi + fi fi if [ "${query}" ]; then -- gentoo-dev@gentoo.org mailing list