V Mon, Nov 22, 2021 at 07:32:26PM -0500, Matthew Miller napsal(a): > But in any case, it doesn't solve my problem, as it just gives filenames, > and there's no way to know when a name ends and a version starts, as they > both use - as a separator. > The hyphen separator is forbidden inside release and version parts. Thus the solution is parse the file name from the end. Example: $ rpm -q --qf '%{sourcerpm}\n' perl-Module-CoreList perl-Module-CoreList-5.20211120-1.fc34.src.rpm $ rpm -q --qf '%{sourcerpm}\n' perl-Module-CoreList | sed -e 's/-[^-]*-[^-]*$//' perl-Module-CoreList -- Petr
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ 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