1 |
Eldad Zack wrote: |
2 |
> |
3 |
> On Wed, 15 Oct 2003, Andrew Gaffney wrote: |
4 |
> |
5 |
> |
6 |
>>Eldad Zack wrote: |
7 |
>> |
8 |
>>>I forgot to mention - |
9 |
>>> |
10 |
>>>The patch shows the USE flags whenever -i -v is used. |
11 |
>>>also, it would show up only with installed packages. |
12 |
>> |
13 |
>>It still doesn't have the functionality I was describing. I don't want it to show the use |
14 |
>>flags a packages was compiled with. Right now, if you use the '-q' flag to determine what |
15 |
>>packages depend on a specified packages, qpkg assumes that all USE flags are enabled, |
16 |
>>instead of consulting the USE file in /var/db/pkg-category/pkg-name for each installed |
17 |
>>package. In my example from before: |
18 |
>>... |
19 |
>>in the ebuild for mplayer and assumes it depends on it. I want mplayer to not show up in |
20 |
>>that list because it does *not* depend on arts since it was compiled without support for it. |
21 |
> |
22 |
> |
23 |
> Ok, I hopefully got you now. |
24 |
> I've worked it out but I'm not sure if it breaks the check on uninstalled |
25 |
> packages. |
26 |
> |
27 |
> I've attached the patch to qpkg. |
28 |
> |
29 |
> Hope I got you right this time. :) |
30 |
> |
31 |
> |
32 |
> Eldad |
33 |
> |
34 |
> |
35 |
> ------------------------------------------------------------------------ |
36 |
> |
37 |
> --- /usr/bin/qpkg 2003-10-03 13:23:58.000000000 +0200 |
38 |
> +++ qpkg 2003-10-16 10:29:14.000000000 +0200 |
39 |
> @@ -386,9 +401,22 @@ |
40 |
> -e 's:^uuu ::'`" |
41 |
> place="`echo ${n}|cut -f1 -d' '`" |
42 |
> [[ "${place}" == "iii" ]] && color="${GR}" || color="${RD}" |
43 |
> - grep -R "${package}" /var/db/pkg/*/*/RDEPEND | \ |
44 |
> - cut -f5,6 -d"/" | sed -e "s:^:\t${color}:;s:$:${NO}:" | sort -u |
45 |
> -# gawk -F "/" '{printf("${place}\n\t%s/%s${NO}",$5,$6)}' | sort -u |
46 |
> + |
47 |
> + for deppkg in $(grep -R "${package}" /var/db/pkg/*/*/RDEPEND | sed 's/RDEPEND.*$//') |
48 |
> + do |
49 |
> + rdepend=$(< ${deppkg}/RDEPEND) |
50 |
> + |
51 |
> + for flag in $(< ${deppkg}/USE) |
52 |
> + do |
53 |
> + if [[ "${flag:0:1}" == "-" ]]; then |
54 |
> + rdepend=$(echo ${rdepend} | sed "s/${flag:1}? ( [-\/A-Za-z0-9]* )//") |
55 |
> + fi |
56 |
> + done |
57 |
> + |
58 |
> + if [[ $(echo ${rdepend} | grep -o ${package}) == ${package} ]]; then |
59 |
> + echo $'\t'$(< ${deppkg}/PF) |
60 |
> + fi |
61 |
> + done |
62 |
> fi |
63 |
> |
64 |
> # cat package content, remove obj/sym/dir, md5 and mtime when not verbose |
65 |
|
66 |
Much, much closer. The only thing that shows up in the list now as dependent on arts is |
67 |
avidemux. While it is the same issue, in the ebuild, it has: |
68 |
|
69 |
arts? ( >=kde-base/arts-1.1.1 ) |
70 |
|
71 |
in the DEPEND line which probably messes something up. Other than that, your patch works |
72 |
great! You really should submit that patch on Bugzilla. |
73 |
|
74 |
-- |
75 |
Andrew Gaffney |
76 |
|
77 |
|
78 |
-- |
79 |
gentoo-dev@g.o mailing list |