* [gentoo-dev] correct package depends
@ 2003-10-14 16:52 Andrew Gaffney
2003-10-14 23:47 ` Chris Gianelloni
0 siblings, 1 reply; 14+ messages in thread
From: Andrew Gaffney @ 2003-10-14 16:52 UTC (permalink / raw
To: Gentoo Dev
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.
--
Andrew Gaffney
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] correct package depends
2003-10-14 16:52 [gentoo-dev] correct package depends Andrew Gaffney
@ 2003-10-14 23:47 ` Chris Gianelloni
2003-10-15 1:21 ` Andrew Gaffney
0 siblings, 1 reply; 14+ messages in thread
From: Chris Gianelloni @ 2003-10-14 23:47 UTC (permalink / raw
To: Andrew Gaffney; +Cc: Gentoo Dev
[-- Attachment #1: Type: text/plain, Size: 388 bytes --]
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?
--
Chris Gianelloni
Developer, Gentoo Linux
Games Team
Is your power animal a pengiun?
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] correct package depends
2003-10-14 23:47 ` Chris Gianelloni
@ 2003-10-15 1:21 ` Andrew Gaffney
2003-10-15 18:43 ` Eldad Zack
0 siblings, 1 reply; 14+ messages in thread
From: Andrew Gaffney @ 2003-10-15 1:21 UTC (permalink / raw
To: Gentoo Dev
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
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] correct package depends
2003-10-15 1:21 ` Andrew Gaffney
@ 2003-10-15 18:43 ` Eldad Zack
2003-10-15 19:06 ` Eldad Zack
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Eldad Zack @ 2003-10-15 18:43 UTC (permalink / raw
To: Andrew Gaffney; +Cc: Gentoo Dev
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
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] correct package depends
2003-10-15 18:43 ` Eldad Zack
@ 2003-10-15 19:06 ` Eldad Zack
2003-10-16 0:19 ` Andrew Gaffney
2003-10-15 23:59 ` Andrew Gaffney
2003-10-16 8:13 ` Christian Birchinger
2 siblings, 1 reply; 14+ messages in thread
From: Eldad Zack @ 2003-10-15 19:06 UTC (permalink / raw
To: Andrew Gaffney; +Cc: Gentoo Dev
I forgot to mention -
The patch shows the USE flags whenever -i -v is used.
also, it would show up only with installed packages.
On Wed, 15 Oct 2003, Eldad Zack wrote:
>
> 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
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] correct package depends
2003-10-15 18:43 ` Eldad Zack
2003-10-15 19:06 ` Eldad Zack
@ 2003-10-15 23:59 ` Andrew Gaffney
2003-10-16 0:14 ` Spider
2003-10-16 8:13 ` Christian Birchinger
2 siblings, 1 reply; 14+ messages in thread
From: Andrew Gaffney @ 2003-10-15 23:59 UTC (permalink / raw
To: Gentoo Dev
Eldad Zack wrote:
> 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
>
I don't think this does what I was looking for. For example:
upstairs root # qpkg -q -nc -I arts
kde-base/arts-1.1.4
DEPENDED ON BY:
media-libs/libsdl-1.2.6-r1
media-video/avidemux-2.0.16
media-video/mjpegtools-1.6.0-r7
media-video/mplayer-1.0_pre2
even though:
upstairs root # cat /var/db/pkg/media-video/mplayer-1.0_pre2/USE
x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ libwww mpeg ncurses pdflib
png spell truetype xml2 xmms xv zlib alsa gdbm berkdb slang readline svga ggi tcltk java X
sdl gpm pam ssl perl python esd imlib oggvorbis gtk opengl mozilla cdr dga dvd ethereal
imap joystick moznocompose samba snmp xml -kde -gnome -mad -mikmod -motif -nls -quicktime
-arts -mysql -tcpd -qt
^^^^^
--
Andrew Gaffney
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] correct package depends
2003-10-15 23:59 ` Andrew Gaffney
@ 2003-10-16 0:14 ` Spider
0 siblings, 0 replies; 14+ messages in thread
From: Spider @ 2003-10-16 0:14 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 573 bytes --]
begin quote
On Wed, 15 Oct 2003 18:59:05 -0500
Andrew Gaffney <agaffney@technaut.darktalker.net> wrote:
>
> I don't think this does what I was looking for. For example:
>
> upstairs root # qpkg -q -nc -I arts
Quoting the source and followup :
> > + if [ ${verb} -gt 0 ]; then
> The patch shows the USE flags whenever -i -v is used.
> also, it would show up only with installed packages.
//Spider
--
begin .signature
This is a .signature virus! Please copy me into your .signature!
See Microsoft KB Article Q265230 for more information.
end
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] correct package depends
2003-10-15 19:06 ` Eldad Zack
@ 2003-10-16 0:19 ` Andrew Gaffney
2003-10-16 8:59 ` Eldad Zack
0 siblings, 1 reply; 14+ messages in thread
From: Andrew Gaffney @ 2003-10-16 0:19 UTC (permalink / raw
To: Gentoo Dev
Eldad Zack wrote:
> I forgot to mention -
>
> The patch shows the USE flags whenever -i -v is used.
> also, it would show up only with installed packages.
It still doesn't have the functionality I was describing. I don't want it to show the use
flags a packages was compiled with. Right now, if you use the '-q' flag to determine what
packages depend on a specified packages, qpkg assumes that all USE flags are enabled,
instead of consulting the USE file in /var/db/pkg-category/pkg-name for each installed
package. In my example from before:
> upstairs root # qpkg -q -nc -I arts
> kde-base/arts-1.1.4
> DEPENDED ON BY:
> media-libs/libsdl-1.2.6-r1
> media-video/avidemux-2.0.16
> media-video/mjpegtools-1.6.0-r7
> media-video/mplayer-1.0_pre2
>
> even though:
>
> upstairs root # cat /var/db/pkg/media-video/mplayer-1.0_pre2/USE
> x86 oss apm avi crypt cups encode foomaticdb gif jpeg libg++ libwww mpeg ncurses pdflib png spell truetype xml2 xmms xv zlib alsa gdbm berkdb slang readline svga ggi tcltk java X sdl gpm pam ssl perl python esd imlib oggvorbis gtk opengl mozilla cdr dga dvd ethereal imap joystick moznocompose samba snmp xml -kde -gnome -mad -mikmod -motif -nls -quicktime -arts -mysql -tcpd -qt
Mplayer was compiled without the 'arts' USE flag set, but qpkg doesn't look at that. It
sees this:
DEPEND="
<snip>
arts? ( kde-base/arts )
<snip>
"
in the ebuild for mplayer and assumes it depends on it. I want mplayer to not show up in
that list because it does *not* depend on arts since it was compiled without support for it.
--
Andrew Gaffney
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] correct package depends
2003-10-15 18:43 ` Eldad Zack
2003-10-15 19:06 ` Eldad Zack
2003-10-15 23:59 ` Andrew Gaffney
@ 2003-10-16 8:13 ` Christian Birchinger
2 siblings, 0 replies; 14+ messages in thread
From: Christian Birchinger @ 2003-10-16 8:13 UTC (permalink / raw
To: Gentoo Dev
Some of my db entries have a "USE" but not a "IUSE" file.
I changed the check to [[ -r ${pdir}/USE && -r ${pdir}/IUSE ]]
to avoid ugly error messages.
On Wed, Oct 15, 2003 at 08:43:41PM +0200, Eldad Zack wrote:
>
> 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
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] correct package depends
2003-10-16 0:19 ` Andrew Gaffney
@ 2003-10-16 8:59 ` Eldad Zack
2003-10-16 15:15 ` Andrew Gaffney
0 siblings, 1 reply; 14+ messages in thread
From: Eldad Zack @ 2003-10-16 8:59 UTC (permalink / raw
To: Andrew Gaffney; +Cc: gentoo-dev
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1004 bytes --]
On Wed, 15 Oct 2003, Andrew Gaffney wrote:
> Eldad Zack wrote:
> > I forgot to mention -
> >
> > The patch shows the USE flags whenever -i -v is used.
> > also, it would show up only with installed packages.
>
> It still doesn't have the functionality I was describing. I don't want it to show the use
> flags a packages was compiled with. Right now, if you use the '-q' flag to determine what
> packages depend on a specified packages, qpkg assumes that all USE flags are enabled,
> instead of consulting the USE file in /var/db/pkg-category/pkg-name for each installed
> package. In my example from before:
> ...
> in the ebuild for mplayer and assumes it depends on it. I want mplayer to not show up in
> that list because it does *not* depend on arts since it was compiled without support for it.
Ok, I hopefully got you now.
I've worked it out but I'm not sure if it breaks the check on uninstalled
packages.
I've attached the patch to qpkg.
Hope I got you right this time. :)
Eldad
[-- Attachment #2: qpkg dep patch --]
[-- Type: TEXT/PLAIN, Size: 976 bytes --]
--- /usr/bin/qpkg 2003-10-03 13:23:58.000000000 +0200
+++ qpkg 2003-10-16 10:29:14.000000000 +0200
@@ -386,9 +401,22 @@
-e 's:^uuu ::'`"
place="`echo ${n}|cut -f1 -d' '`"
[[ "${place}" == "iii" ]] && color="${GR}" || color="${RD}"
- grep -R "${package}" /var/db/pkg/*/*/RDEPEND | \
- cut -f5,6 -d"/" | sed -e "s:^:\t${color}:;s:$:${NO}:" | sort -u
-# gawk -F "/" '{printf("${place}\n\t%s/%s${NO}",$5,$6)}' | sort -u
+
+ for deppkg in $(grep -R "${package}" /var/db/pkg/*/*/RDEPEND | sed 's/RDEPEND.*$//')
+ do
+ rdepend=$(< ${deppkg}/RDEPEND)
+
+ for flag in $(< ${deppkg}/USE)
+ do
+ if [[ "${flag:0:1}" == "-" ]]; then
+ rdepend=$(echo ${rdepend} | sed "s/${flag:1}? ( [-\/A-Za-z0-9]* )//")
+ fi
+ done
+
+ if [[ $(echo ${rdepend} | grep -o ${package}) == ${package} ]]; then
+ echo $'\t'$(< ${deppkg}/PF)
+ fi
+ done
fi
# cat package content, remove obj/sym/dir, md5 and mtime when not verbose
[-- Attachment #3: Type: text/plain, Size: 37 bytes --]
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] correct package depends
2003-10-16 8:59 ` Eldad Zack
@ 2003-10-16 15:15 ` Andrew Gaffney
2003-10-16 16:27 ` Eldad Zack
0 siblings, 1 reply; 14+ messages in thread
From: Andrew Gaffney @ 2003-10-16 15:15 UTC (permalink / raw
To: Gentoo Dev
Eldad Zack wrote:
>
> On Wed, 15 Oct 2003, Andrew Gaffney wrote:
>
>
>>Eldad Zack wrote:
>>
>>>I forgot to mention -
>>>
>>>The patch shows the USE flags whenever -i -v is used.
>>>also, it would show up only with installed packages.
>>
>>It still doesn't have the functionality I was describing. I don't want it to show the use
>>flags a packages was compiled with. Right now, if you use the '-q' flag to determine what
>>packages depend on a specified packages, qpkg assumes that all USE flags are enabled,
>>instead of consulting the USE file in /var/db/pkg-category/pkg-name for each installed
>>package. In my example from before:
>>...
>>in the ebuild for mplayer and assumes it depends on it. I want mplayer to not show up in
>>that list because it does *not* depend on arts since it was compiled without support for it.
>
>
> Ok, I hopefully got you now.
> I've worked it out but I'm not sure if it breaks the check on uninstalled
> packages.
>
> I've attached the patch to qpkg.
>
> Hope I got you right this time. :)
>
>
> Eldad
>
>
> ------------------------------------------------------------------------
>
> --- /usr/bin/qpkg 2003-10-03 13:23:58.000000000 +0200
> +++ qpkg 2003-10-16 10:29:14.000000000 +0200
> @@ -386,9 +401,22 @@
> -e 's:^uuu ::'`"
> place="`echo ${n}|cut -f1 -d' '`"
> [[ "${place}" == "iii" ]] && color="${GR}" || color="${RD}"
> - grep -R "${package}" /var/db/pkg/*/*/RDEPEND | \
> - cut -f5,6 -d"/" | sed -e "s:^:\t${color}:;s:$:${NO}:" | sort -u
> -# gawk -F "/" '{printf("${place}\n\t%s/%s${NO}",$5,$6)}' | sort -u
> +
> + for deppkg in $(grep -R "${package}" /var/db/pkg/*/*/RDEPEND | sed 's/RDEPEND.*$//')
> + do
> + rdepend=$(< ${deppkg}/RDEPEND)
> +
> + for flag in $(< ${deppkg}/USE)
> + do
> + if [[ "${flag:0:1}" == "-" ]]; then
> + rdepend=$(echo ${rdepend} | sed "s/${flag:1}? ( [-\/A-Za-z0-9]* )//")
> + fi
> + done
> +
> + if [[ $(echo ${rdepend} | grep -o ${package}) == ${package} ]]; then
> + echo $'\t'$(< ${deppkg}/PF)
> + fi
> + done
> fi
>
> # cat package content, remove obj/sym/dir, md5 and mtime when not verbose
Much, much closer. The only thing that shows up in the list now as dependent on arts is
avidemux. While it is the same issue, in the ebuild, it has:
arts? ( >=kde-base/arts-1.1.1 )
in the DEPEND line which probably messes something up. Other than that, your patch works
great! You really should submit that patch on Bugzilla.
--
Andrew Gaffney
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] correct package depends
2003-10-16 15:15 ` Andrew Gaffney
@ 2003-10-16 16:27 ` Eldad Zack
2003-10-16 17:25 ` Andrew Gaffney
0 siblings, 1 reply; 14+ messages in thread
From: Eldad Zack @ 2003-10-16 16:27 UTC (permalink / raw
To: Andrew Gaffney; +Cc: Gentoo Dev
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1129 bytes --]
> >>in the ebuild for mplayer and assumes it depends on it. I want mplayer to not show up in
> >>that list because it does *not* depend on arts since it was compiled without support for it.
> > Ok, I hopefully got you now.
> > I've worked it out but I'm not sure if it breaks the check on uninstalled
> > packages.
> >
> > I've attached the patch to qpkg.
> >
> > Hope I got you right this time. :)
> >
> Much, much closer. The only thing that shows up in the list now as dependent on arts is
> avidemux. While it is the same issue, in the ebuild, it has:
>
> arts? ( >=kde-base/arts-1.1.1 )
>
> in the DEPEND line which probably messes something up. Other than that, your patch works
> great! You really should submit that patch on Bugzilla.
Right, it's the ">=" that I didn't include in the regex that wipe the
false dependency out.
That's my bad, I should've used the predefined [:punct:] regex type
before.
I've submitted the whole patch against vanilla qpkg on Bugzilla.
http://bugs.gentoo.org/show_bug.cgi?id=31290
anyway, this is the patch against your qpkg, that complete the changes.
Eldad
[-- Attachment #2: Type: TEXT/PLAIN, Size: 1370 bytes --]
--- qpkg-mark3 2003-10-16 17:50:20.000000000 +0200
+++ qpkg 2003-10-16 18:19:30.000000000 +0200
@@ -402,21 +402,26 @@
place="`echo ${n}|cut -f1 -d' '`"
[[ "${place}" == "iii" ]] && color="${GR}" || color="${RD}"
- for deppkg in $(grep -R "${package}" /var/db/pkg/*/*/RDEPEND | sed 's/RDEPEND.*$//')
- do
- rdepend=$(< ${deppkg}/RDEPEND)
-
- for flag in $(< ${deppkg}/USE)
+ if [[ ${place} == "iii" ]]; then
+ for deppkg in $(grep -R "${package}" /var/db/pkg/*/*/RDEPEND | sed 's/RDEPEND.*$//')
do
- if [[ "${flag:0:1}" == "-" ]]; then
- rdepend=$(echo ${rdepend} | sed "s/${flag:1}? ( [-\/A-Za-z0-9]* )//")
+ rdepend=$(< ${deppkg}/RDEPEND)
+
+ for flag in $(< ${deppkg}/USE)
+ do
+ if [[ "${flag:0:1}" == "-" ]]; then
+ rdepend=$(echo ${rdepend} | sed "s/${flag:1}? ( [[:alnum:][:punct:]]* )//")
+ fi
+ done
+
+ if [[ $(echo ${rdepend} | grep -o ${package}) == ${package} ]]; then
+ echo $'\t'$(< ${deppkg}/PF)
fi
done
-
- if [[ $(echo ${rdepend} | grep -o ${package}) == ${package} ]]; then
- echo $'\t'$(< ${deppkg}/PF)
- fi
- done
+ else
+ grep -R "${package}" /var/db/pkg/*/*/RDEPEND | \
+ cut -f5,6 -d"/" | sed -e "s:^:\t${color}:;s:$:${NO}:" | sort -u
+ fi
fi
# cat package content, remove obj/sym/dir, md5 and mtime when not verbose
[-- Attachment #3: Type: text/plain, Size: 37 bytes --]
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] correct package depends
2003-10-16 16:27 ` Eldad Zack
@ 2003-10-16 17:25 ` Andrew Gaffney
2003-10-16 18:41 ` Andrew Gaffney
0 siblings, 1 reply; 14+ messages in thread
From: Andrew Gaffney @ 2003-10-16 17:25 UTC (permalink / raw
To: Gentoo Dev
Eldad Zack wrote:
>>>>in the ebuild for mplayer and assumes it depends on it. I want mplayer to not show up in
>>>>that list because it does *not* depend on arts since it was compiled without support for it.
>>>
>>>Ok, I hopefully got you now.
>>>I've worked it out but I'm not sure if it breaks the check on uninstalled
>>>packages.
>>>
>>>I've attached the patch to qpkg.
>>>
>>>Hope I got you right this time. :)
>>>
>>
>>Much, much closer. The only thing that shows up in the list now as dependent on arts is
>>avidemux. While it is the same issue, in the ebuild, it has:
>>
>> arts? ( >=kde-base/arts-1.1.1 )
>>
>>in the DEPEND line which probably messes something up. Other than that, your patch works
>>great! You really should submit that patch on Bugzilla.
>
>
> Right, it's the ">=" that I didn't include in the regex that wipe the
> false dependency out.
> That's my bad, I should've used the predefined [:punct:] regex type
> before.
>
> I've submitted the whole patch against vanilla qpkg on Bugzilla.
>
> http://bugs.gentoo.org/show_bug.cgi?id=31290
Very nice. I really do need to learn how to really use bash, grep, egrep, sed, awk, etc.
--
Andrew Gaffney
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-dev] correct package depends
2003-10-16 17:25 ` Andrew Gaffney
@ 2003-10-16 18:41 ` Andrew Gaffney
0 siblings, 0 replies; 14+ messages in thread
From: Andrew Gaffney @ 2003-10-16 18:41 UTC (permalink / raw
To: Gentoo Dev
Andrew Gaffney wrote:
>> I've submitted the whole patch against vanilla qpkg on Bugzilla.
>>
>> http://bugs.gentoo.org/show_bug.cgi?id=31290
>
> Very nice. I really do need to learn how to really use bash, grep,
> egrep, sed, awk, etc.
Even nicer. Your patch has been accepted into qpkg. It will be in gentoolkit 0.1.32.
--
Andrew Gaffney
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2003-10-16 18:37 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-14 16:52 [gentoo-dev] correct package depends Andrew Gaffney
2003-10-14 23:47 ` Chris Gianelloni
2003-10-15 1:21 ` Andrew Gaffney
2003-10-15 18:43 ` Eldad Zack
2003-10-15 19:06 ` Eldad Zack
2003-10-16 0:19 ` Andrew Gaffney
2003-10-16 8:59 ` Eldad Zack
2003-10-16 15:15 ` Andrew Gaffney
2003-10-16 16:27 ` Eldad Zack
2003-10-16 17:25 ` Andrew Gaffney
2003-10-16 18:41 ` Andrew Gaffney
2003-10-15 23:59 ` Andrew Gaffney
2003-10-16 0:14 ` Spider
2003-10-16 8:13 ` Christian Birchinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox