Find out which pattern(s) a package is included in.

The other day I found myself wanting to know which pattern(s) some
packages are included in. This is what I came up with (where the package
I want to know about is gnome-web-photo)

Code:

$ for i in $(zypper patterns | grep [::alpha::] | grep -v Repository | cut -d ‘|’ -f 2); do test -n “$(zypper info -t pattern $i | grep gnome-web-photo )” && echo $i;done

Which works but, well look at it…
I’ve been unable to improve on it. Can anyone come up with a less
convoluted way of doing it?


mikewillis

mikewillis’s Profile: http://forums.novell.com/member.php?userid=7510
View this thread: http://forums.novell.com/showthread.php?t=447658

On Wed, 02 Nov 2011 12:16:04 GMT
mikewillis mikewillis@no-mx.forums.novell.com wrote:
[color=blue]

The other day I found myself wanting to know which pattern(s) some
packages are included in. This is what I came up with (where the
package I want to know about is gnome-web-photo)

Code:

$ for i in $(zypper patterns | grep  [::alpha::] |  grep -v

Repository | cut -d ‘|’ -f 2); do test -n “$(zypper info -t pattern
$i | grep gnome-web-photo )” && echo $i;done --------------------

Which works but, well look at it…
I’ve been unable to improve on it. Can anyone come up with a less
convoluted way of doing it?

[/color]
Hi
And takes some time… Maybe rpm might offer some additional queries
to get what you want? by the way I had to use [[:alpha:]]


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 2 days 4:57, 5 users, load average: 0.04, 0.14, 0.19
GPU GeForce 8600 GTS Silent - Driver Version: 285.05.09