Gentoo Archives: gentoo-dev

From: Andrew Gaffney <agaffney@×××××××××××××××××××.net>
To: Gentoo Dev <gentoo-dev@g.o>
Subject: Re: [gentoo-dev] correct package depends
Date: Wed, 15 Oct 2003 23:54:39
Message-Id: 3F8DDF49.9070100@technaut.darktalker.net
In Reply to: Re: [gentoo-dev] correct package depends by Eldad Zack
1 Eldad Zack wrote:
2 > On Tue, 14 Oct 2003, Andrew Gaffney wrote:
3 >
4 >
5 >>Chris Gianelloni wrote:
6 >>
7 >>>On Tue, 2003-10-14 at 12:52, Andrew Gaffney wrote:
8 >>>
9 >>>
10 >>>>Is there a program/script out there that can give me the same information at 'qpkg -q'
11 >>>>*and* take into account the USE flags packages were compiled with? If not, I'm going to
12 >>>>write one.
13 >>>
14 >>>
15 >>>Why not add the functionality to qpkg?
16 >>
17 >>First of all, I'm not a very good bash/sed/awk/grep/etc. programmer. Second, I believe
18 >>that is beyond the functionality of a bash script.
19 >>
20 >>--
21 >>Andrew Gaffney
22 >>
23 >>
24 >>--
25 >>gentoo-dev@g.o mailing list
26 >>
27 >>
28 >
29 >
30 > I've wanted the same functionality myself, so I went ahead and changed
31 > qpkg.
32 >
33 > apply this patch to qpkg.
34 >
35 > If the developers maintaining gentoolkit would apply this at well, it'll
36 > be even better.
37 >
38 > --- /usr/bin/qpkg 2003-10-03 13:23:58.000000000 +0200
39 > +++ qpkg 2003-10-15 20:35:24.000000000 +0200
40 > @@ -376,6 +376,21 @@
41 > home=`grep HOMEPAGE ${p}| cut -d\" -f2`
42 > desc=`grep DESCRIPTION ${p}| cut -d\" -f2`
43 > echo -e "${T}${BL}${desc}${NO} [ ${YL}${home}${NO} ]"
44 > + if [ ${verb} -gt 0 ]; then
45 > + pdir=${p/$(basename ${p})/}
46 > + if [[ -r ${pdir}/USE ]]; then
47 > + echo -n "Compiled with USE Flags: "
48 > + for flag in $(<${pdir}/IUSE)
49 > + do
50 > + use=$(grep -o ${flag} ${pdir}/USE | tr -d '\n')
51 > + if [[ "${use}" == "" ]]; then
52 > + echo -n "-"
53 > + fi
54 > + echo -n "${flag} "
55 > + done
56 > + echo
57 > + fi
58 > + fi
59 > fi
60 >
61 > if [ "${query}" ]; then
62 >
63
64 I don't think this does what I was looking for. For example:
65
66 upstairs root # qpkg -q -nc -I arts
67 kde-base/arts-1.1.4
68 DEPENDED ON BY:
69 media-libs/libsdl-1.2.6-r1
70 media-video/avidemux-2.0.16
71 media-video/mjpegtools-1.6.0-r7
72 media-video/mplayer-1.0_pre2
73
74 even though:
75
76 upstairs root # cat /var/db/pkg/media-video/mplayer-1.0_pre2/USE
77 x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ libwww mpeg ncurses pdflib
78 png spell truetype xml2 xmms xv zlib alsa gdbm berkdb slang readline svga ggi tcltk java X
79 sdl gpm pam ssl perl python esd imlib oggvorbis gtk opengl mozilla cdr dga dvd ethereal
80 imap joystick moznocompose samba snmp xml -kde -gnome -mad -mikmod -motif -nls -quicktime
81 -arts -mysql -tcpd -qt
82 ^^^^^
83
84 --
85 Andrew Gaffney
86
87
88 --
89 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] correct package depends Spider <spider@g.o>