1 |
On Tue, 14 Oct 2003, Andrew Gaffney wrote: |
2 |
|
3 |
> Chris Gianelloni wrote: |
4 |
> > On Tue, 2003-10-14 at 12:52, Andrew Gaffney wrote: |
5 |
> > |
6 |
> >>Is there a program/script out there that can give me the same information at 'qpkg -q' |
7 |
> >>*and* take into account the USE flags packages were compiled with? If not, I'm going to |
8 |
> >>write one. |
9 |
> > |
10 |
> > |
11 |
> > Why not add the functionality to qpkg? |
12 |
> |
13 |
> First of all, I'm not a very good bash/sed/awk/grep/etc. programmer. Second, I believe |
14 |
> that is beyond the functionality of a bash script. |
15 |
> |
16 |
> -- |
17 |
> Andrew Gaffney |
18 |
> |
19 |
> |
20 |
> -- |
21 |
> gentoo-dev@g.o mailing list |
22 |
> |
23 |
> |
24 |
|
25 |
I've wanted the same functionality myself, so I went ahead and changed |
26 |
qpkg. |
27 |
|
28 |
apply this patch to qpkg. |
29 |
|
30 |
If the developers maintaining gentoolkit would apply this at well, it'll |
31 |
be even better. |
32 |
|
33 |
--- /usr/bin/qpkg 2003-10-03 13:23:58.000000000 +0200 |
34 |
+++ qpkg 2003-10-15 20:35:24.000000000 +0200 |
35 |
@@ -376,6 +376,21 @@ |
36 |
home=`grep HOMEPAGE ${p}| cut -d\" -f2` |
37 |
desc=`grep DESCRIPTION ${p}| cut -d\" -f2` |
38 |
echo -e "${T}${BL}${desc}${NO} [ ${YL}${home}${NO} ]" |
39 |
+ if [ ${verb} -gt 0 ]; then |
40 |
+ pdir=${p/$(basename ${p})/} |
41 |
+ if [[ -r ${pdir}/USE ]]; then |
42 |
+ echo -n "Compiled with USE Flags: " |
43 |
+ for flag in $(<${pdir}/IUSE) |
44 |
+ do |
45 |
+ use=$(grep -o ${flag} ${pdir}/USE | tr -d '\n') |
46 |
+ if [[ "${use}" == "" ]]; then |
47 |
+ echo -n "-" |
48 |
+ fi |
49 |
+ echo -n "${flag} " |
50 |
+ done |
51 |
+ echo |
52 |
+ fi |
53 |
+ fi |
54 |
fi |
55 |
|
56 |
if [ "${query}" ]; then |
57 |
|
58 |
|
59 |
-- |
60 |
gentoo-dev@g.o mailing list |