Re: [opensuse-factory] How to list packages belonging to a given group?

2006-08-24 Thread Émeric Maschino
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/inst-source/suse/setup/descr/

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[opensuse-factory] How to list packages belonging to a given group?

2006-08-23 Thread Émeric Maschino
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse-factory] How to list packages belonging to a given group?

2006-08-23 Thread Manfred Hollstein
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse-factory] How to list packages belonging to a given group?

2006-08-23 Thread Pascal Bleser
-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]