On Wed, 8 Apr 2015 18:34, jdd wrote:
Le 08/04/2015 18:27, Carlos E. R. a écrit :
No. That produces a list of repos.
like the one zypper knows of in the running distro
We need a list of packages
installed from each repo, separate.
how do zypper know that from the beginning? is it not in the rpm database? if not where?
That is stored in the "Vendor" field in the rpm, and thus rpm database. "rpm -qi <package>" shows it. And for a list of installed packages and from which repo, zypper aso has the answer (well, maybe not in the wanted format, but that's what sed is for): "zypper search --installed-only --details --sort-by-repo" split that by reponame, and be aware that some packages give back "(System Packages)" as reponame (LANG=C), mostly foreign packages (without the needed info in the "Vendor" field), or packages that are not found in any of the "active" repos. - Yamaban.