On Tue, Nov 23, 2021 at 3:37 AM Thomas Moschny <thomas.moschny@xxxxxxxxx> wrote: > > Am Mo., 22. Nov. 2021 um 21:56 Uhr schrieb Matthew Miller > <mattdm@xxxxxxxxxxxxxxxxx>: > > > > rpm -qa --qf '%{sourcerpm}\n' > > > > gives me a list of source RPM names, but it's in filename format. I don't > > want to have to try to parse that to figure out the actual source package > > base name (i.e. the dist-git name). Is there something I'm missing? Probably > > there is. :) > > Parsing NVR is easy if done right-to-left: > > rpm -qa --qf '%{sourcerpm}\n' | rev | cut -d- -f3- | rev > > Regards, > Thomas Outguessing the relation between SRPM's and RPM's is a bit of a crapshoot. The "libldb" SRPM, for example, generates "libldb", "libldb-devel", "python-ldb-devel-common", and python3-ldb-devel. I personally find generating the full map between RPMs and SRPMs to be useful. Does this work for you? rpm -qa --qf '%{name}\t%{sourcerpm}\n' | LANG=C sort I always LANG=C sort because I loathe and despise interminging mixed case names for things. _______________________________________________ packaging mailing list -- packaging@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to packaging-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/packaging@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure