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. Its a trivial latter to sort on the second filed. 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. Another is to use a small awk script to do the grouping. Mapping back from the URI that the RPM database knows about to the takes a but of thought. Using rpm -qa --qf "%{NAME}\t%{DISTURL}\n" | sort -k 2,2 You get lines like <quote> bzip2 obs://build.opensuse.org/Archiving/openSUSE_13.1/0cc62ba995c49ef92555b16900e023fd-bzip2 autoconf obs://build.opensuse.org/Archiving/openSUSE_13.1/207929a2dde3f6c7b8534a747e45ba76-autoconf liblz4-1_4 obs://build.opensuse.org/Archiving/openSUSE_13.1/5482311ec8d8bd33014c3528ccac3b46-lz4 lz4 obs://build.opensuse.org/Archiving/openSUSE_13.1/5482311ec8d8bd33014c3528ccac3b46-lz4 zip obs://build.opensuse.org/Archiving/openSUSE_13.1/812db9ab4fe5ed0aa2b2632acb30f34d-zip xz obs://build.opensuse.org/Archiving/openSUSE_13.1/8e98c37dfb8f471dab00c11f48038d3f-xz </quote> The line wrap there has done most of the job for you. :-) when I grep Archiving /etc/zypp/repos.d/* I find the entry <quote> Archiving.repo:[Archiving] Archiving.repo:name=Archiving Archiving.repo:baseurl=http://download.opensuse.org/repositories/Archiving/openSUSE_13.1/ </quote> Recall that is the BASEURL. Some, like this <quote> systemd obs://build.opensuse.org/openSUSE:Maintenance:3728/openSUSE_13.1_Update/946493dd618940f671edba9a3d2e5c7b-systemd.openSUSE_13.1_Update </quote> will take a good bit more though. I don't think you can simply automate everything as the zypper libraries have made adjustments over time as to where they actually get the ROMs from. That';s why we use "baseurl" and have them map to 'whatever is available right now' and more. "Under the hood" internals and what's on the UI aren't the same. So it takes a bit of thought. I don't see this as insuperable, which is why I suggest doing a group and split. That being said, I can bet that even without customization such as I do for Photography and Archiving some basic system OBS lines are going to be different between different systems for any one of a number of reasons, even though the BASEURL in the /etc/zypp/repos.d entry is the same. 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. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org