-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Émeric Maschino wrote:
> Hi,
> 
>>> Is there a way to list all the packages belonging to a given group
>>> (e.g. System/Base) in CLI?
>> Package name only:
>> rpm -qa  --qf "%{name}\t%{group}\n" | grep "<given group>"
>>
>> With package version and release number:
>> rpm -qa  --qf "%{name}-%{version}-%{release}\t%{group}\n" | grep ...
> 
> Thank you very much. However, I was thinking of a more "high-level"
> list. Let me explain. When you choose e.g. the GNOME environment, some
> packages in this group are mandatory, other are optional or
> architecture-dependant. Furthermore, choosing the GNOME environment
> group automatically select e.g. the base and X11 groups and all the
> related dependent packages. This is this kind of package list I would
> like to obtain. BTW, how did you find the names of the %{name},

You are mixing up two things here.
On one hand, you have the RPM group, which is stored into the package
and kept inside the RPM database.
That's what you get when you do e.g.
rpm -q --queryformat '%{group}\n' kdelibs3

On the other hand, you have the "selections" that are displayed by
YaST2. That thing is totally SUSE/YaST2 specific and is stored outside
of the RPM database (i.e. RPM knows nothing about those selections).
The selections are being replaced by "patterns" in 10.2/factory.
If you want more information about those "patterns", check the mailing
list archive [1], there's a pretty long thread about it with all the
nitty gritty details.

[1] http://lists.opensuse.org/

> %{version}, %{release} and %{group} keys in your query? Are there
> documented somewhere? Additionally, is there a way to recover the names

rpm --querytags

> of all the groups? yum list groupinstall did the trick before.

If you mean RPM groups... yes and no.
With rpm, you can get the groups of the packages *that are installed*:
rpm -qa --queryformat '%{group}\n'|sort|uniq

But it's not a full list of all RPM groups used on SUSE Linux, as RPM
only knows about the packages that are installed on your system.

However, in theory, every rpm made for SUSE Linux must follow the SUSE
Package Conventions, that include a list of RPM groups to choose from:
http://forgeftp.novell.com/library/SUSE%20Package%20Conventions/spc_rpm_groups.html

Note that this is not enforced, it is more of a "style guide".

With a package manager like yum, apt, smart, rug, y2pmsh, yast2, you
could be able to get a list of all the RPM groups, because they know
about all the packages that are in repositories, and not only the
packages that are installed (as it is the case with RPM).

YaST2/y2pmsh have no way of providing that list though - at least AFAIK.
You already know how to do that with yum.
I don't think smart has that option either, and I have no idea about rug.

Actually you can see that it is a very uncommon request and that almost
no one has ever had a need for such a list, as most tools don't provide
a way for retrieving it ;)

Now, for the selections (that are obsoleted by patterns in
10.2/Factory), it is slightly more difficult.
Besides the YaST2 UI, there is no way to retrieve the list of selections
(e.g. from a CLI tool), you'd have to parse the .sel files yourself:
http://ftp.belnet.be/mirror/ftp.opensuse.org/opensuse/distribution/SL-10.1/inst-source/suse/setup/descr/

hope this helps, but I guess it doesn't ;)

cheers
- --
  -o) Pascal Bleser     http://linux01.gwdg.de/~pbleser/
  /\\ <[EMAIL PROTECTED]>       <[EMAIL PROTECTED]>
 _\_v The more things change, the more they stay insane.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFE7LYvr3NMWliFcXcRAiCvAJ0ZLY4zgmOvAAubJlPCL0S/jRzQBQCgkQLl
1hq+ge4qN6E2jaK7LSyCB7c=
=6p52
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to