[opensuse-factory] How to list packages belonging to a given group?
Hi, Is there a way to list all the packages belonging to a given group (e.g. System/Base) in CLI? I would like to check the diffs between the packages currently installed on my system and the packages that should be there. Some time ago, it was possible to list the packages belonging to a given group with yum groupinfo < given group> IIRC, but it doesn't work anymore (it seems that the files are no more splitted into groups in the yum headers). Cheers, Émeric --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
Hello, Am Mittwoch, 23. August 2006 11:34 schrieb Émeric Maschino:
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 ... Regards, Christian Boltz -- 1.-4.9.2006: Weinfest in Insheim Pig Slip, Hifi-Delity, AH-Band, Frank Petersen und die Deafen Goblins spielen bei der Landjugend. Mehr Infos: www.Landjugend-Insheim.de --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
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}, %{version}, %{release} and %{group} keys in your query? Are there documented somewhere? Additionally, is there a way to recover the names of all the groups? yum list groupinstall did the trick before. Émeric --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
On Wed, 23 Aug 2006, 14:48:00 +0200, Émeric Maschino wrote:
Hi, [...] BTW, how did you find the names of the %{name}, %{version}, %{release} and %{group} keys in your query? Are there documented somewhere? Additionally, is there a way to recover the names of all the groups? yum list groupinstall did the trick before.
According to rpm's manual page, "rpm --querytags" prints a list of all the tags rpm knows about.
Émeric
HTH, cheers. l8er manfred --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
-----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_grou...
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/i...
hope this helps, but I guess it doesn't ;)
cheers
- --
-o) Pascal Bleser http://linux01.gwdg.de/~pbleser/
/\\
Hi,
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
Whoops! Correct.
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.
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.
OK. Thanks for this clarification.
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).
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 ;)
I can see at least one immediate usage of such a list ;-) I have a workstation that's daily updated. Sometimes, some packages become obsolete and aren't provided anymore. However, they may be still installed on my system. By building the list of packages that are provided by default by the various Factory selections/patterns installed on my system, I could make the diffs with the packages currently installed and quickly locate obsolete packages.
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/i...
OK, I'll look at this.
hope this helps, but I guess it doesn't ;)
Yes, it greatly helps. Thanks a billion. Émeric --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
participants (4)
-
Christian Boltz
-
Manfred Hollstein
-
Pascal Bleser
-
Émeric Maschino