-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2015-07-02 20:01, Anton Aylward wrote:
On 07/02/2015 10:45 AM, Carlos E. R. wrote:
Now you tell me how to produce an exact list of all the packages installed from, say, packman. Or rather, to produce several lists, one per repo, of all packages. Or some variant of the above.
I've already given the code for producing a two-column listing, the name of the package and the URL it came from.
It's an URL to obs:, not the repository name nor alias. From the sample I posted previously:
cer@minas-tirith:~> rpm -qa --qf "%{NAME}\t%{DISTURL}\n" libdrm_nouveau2 obs://build.opensuse.org/openSUSE:13.1/standard/6e54f61ac4b419fd5831dd2e921b58a2-libdrm
libgcrypt11-32bit obs://build.opensuse.org/openSUSE:Maintenance:2961/openSUSE_13.1_Update/ea4836cd9a2de039535ba5953f4c6c6e-libgcrypt.openSUSE_13.1_Update
texlive-concrete obs://build.opensuse.org/openSUSE:13.1/standard/397f03548a1a456670144b62d4f3a860-texlive-specs-c
geoclue2 obs://build.opensuse.org/openSUSE:13.1/standard/55d6a9b4d9b23fff26cba462d60a60ae-geoclue2
insserv-compat obs://build.opensuse.org/openSUSE:13.1/standard/aa3b56cb41311f3ba5d5a17b1cda2e68-insserv-compat
texlive-present obs://build.opensuse.org/openSUSE:13.1/standard/136172f0ea6b3aeab091105d2d7420de-texlive-specs-p
libzvbi0 obs://build.opensuse.org/openSUSE:13.1/standard/cd43bd20adb415691841f5e64ab7b7b2-zvbi
libmysqlcppconn6 obs://build.opensuse.org/LibreOffice:4.3/openSUSE_13.1/09ac97b520741f43c52499496cca81cb-mysql-connector-cpp
texlive-latexpand obs://build.opensuse.org/openSUSE:Maintenance:2684/openSUSE_13.1_Update/b025d425835eed128df649cd9099d982-texlive-specs-l.openSUSE_13.1_Update
libva-x11-1 obs://build.opensuse.org/openSUSE:13.1/standard/09ba04452bea1f3dc5fe864a42e25b45-libva
Its a trivial latter to sort on the second filed.
No, it is not. I would have to extract the repository name from those randomly ugly looking urls.
You then have a number of ways you can get the result you ask for. One is to split the file manually according to the grouping of that second field.
yeah, trivial:
texlive-latexpand obs://build.opensuse.org/openSUSE:Maintenance:2684/openSUSE_13.1_Update/b025d425835eed128df649cd9099d982-texlive-specs-l.openSUSE_13.1_Update
openSUSE_13.1_Update
libmysqlcppconn6 obs://build.opensuse.org/LibreOffice:4.3/openSUSE_13.1/09ac97b520741f43c52499496cca81cb-mysql-connector-cpp LibreOffice:4.3 sigh...
Another is to use a small awk script to do the grouping.
I know not awk. :-} And... the repo name here, its "OBS: LibreOffice 4.3", and the alias is "OBS_LO_43", not "LibreOffice:4.3", so I would have to do translations in order to issue the proper "zypper install from list" command.
Mapping back from the URI that the RPM database knows about to the takes a but of thought.
All that is a concoction that is forced because neither zypper nor rpm are capable of directly printing the repository name, and we have to work around creating our own complex code to do it. ...
It may even be that, on mature systems that have had many updates to the same packages over time there are different "Maintenance" references. That is certainly the case on my system, where I have been running 'zypper up' every week since 13.1 was installed, a couple of months after its release.
For practical purposes, updates and oss are the same repo. Or the same "vendor", rather. In fact, what I would do if I were to work on this, is an rpm query, relating vendors to repositories. - -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlWXDpgACgkQja8UbcUWM1wB4wD9HrNzUYbbK2SYNz0CmXZgvJTA TezFxrtSnoZVCKb60FwA/RAL9f0huF5aJd7eNASJgaLYpryhDxP+U2JVSqX/7qMx =n5z3 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org