On 2023-03-23 11:50, Robert Webb via openSUSE Users wrote:
On Thu, 23 Mar 2023 11:33:12 +0100, "Carlos E. R."
wrote: On 2023-03-23 10:23, Andrei Borzenkov wrote:
On Thu, Mar 23, 2023 at 12:15 PM Robert Webb via openSUSE Users
wrote: Then how to access the source repo info that is in the locally saved information about installed packages?
I do not understand that question.
That we'd like a way to print, for a package, the repository name by correlating with the vendor information.
OK, at least it should be possible to get the list of packages installed, or a count of packages, per each vendor, instead of per repo.
Yes, you can get that from the rpm command. I have a one liner (split in several to cope with mail line wrapping) that produces an rpm list sorted by date, in csv format (not pure): rpm -q -a --queryformat "%{INSTALLTIME};%{INSTALLTIME:day}; \ %{BUILDTIME:day}; %{NAME};%{VERSION}-%-7{RELEASE};%{arch}; \ %{VENDOR};%{PACKAGER};%{DISTRIBUTION};%{DISTTAG}\n" \ | sort | cut --fields="2-" --delimiter=\; \ | tee rpmlist.csv | less -S or table format: rpm -q -a --queryformat "%{INSTALLTIME}\t%{INSTALLTIME:day} \ %{BUILDTIME:day} %-30{NAME}\t%15{VERSION}-%-7{RELEASE}\t%{arch} \ %25{VENDOR}%25{PACKAGER} == %{DISTRIBUTION} %{DISTTAG}\n" \ | sort | cut --fields="2-" | tee rpmlist | less -S and a variation that lists those packages that are not for the current release: rpm -q -a --queryformat "%{INSTALLTIME}\t%{INSTALLTIME:day} \ %{BUILDTIME:day} %-30{NAME}\t%15{VERSION}-%-7{RELEASE}\t%{arch} \ %25{VENDOR}%25{PACKAGER} == %{DISTRIBUTION} %{DISTTAG}\n" \ | sort | cut --fields="2-" | tee rpmlist \ | egrep -v "openSUSE Leap 15\.4|openSUSE_Leap_15.4|\-lp153|SUSE Linux Enterprise 15" | less -S Doesn't catch all, because some DISTAGS are different: server:mail / 15.4 (none) openSUSE:Leap:15.4:NonFree devel:languages:pascal / 15.4 (none) The sort field is easy to change, it is the first field. Let's try with "vendor": rpm -q -a --queryformat "%{VENDOR}\t%{INSTALLTIME:day} \ %{BUILDTIME:day} %-30{NAME}\t%15{VERSION}-%-7{RELEASE}\t%{arch} \ %25{VENDOR}%25{PACKAGER} == %{DISTRIBUTION} %{DISTTAG}\n" \ | sort | cut --fields="2-" | tee rpmlist | less -S or rpm -q -a --queryformat "%{VENDOR};%{INSTALLTIME:day}; \ %{BUILDTIME:day}; %{NAME};%{VERSION}-%-7{RELEASE};%{arch}; \ %{VENDOR};%{PACKAGER};%{DISTRIBUTION};%{DISTTAG}\n" \ | sort | cut --fields="2-" --delimiter=\; \ | tee rpmlist.csv | less -S Now, obtaining the current repository name I don't know. Perhaps obtaining, separately, a list of vendor vs repository name, and do the correlation on the list as a second phase. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)