Re: How do I get the source package _name_ from an installed RPM?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 22, 2021 at 11:23 PM Matthew Miller
<mattdm@xxxxxxxxxxxxxxxxx> wrote:
>
> On Mon, Nov 22, 2021 at 03:54:16PM -0500, Matthew Miller wrote:
> > 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. :)
>
> And, ugh:
>
> $ dnf repoquery  --installed --source --qf '%{name}\n'
> [...]
> Command line error: argument --qf/--queryformat: not allowed with argument -s/--source
>

I think this should do the trick?

> $ dnf --disablerepo="*" --enablerepo="*-source" repoquery --queryformat="%{name}"

This assumes a Fedora-like repository split where all source RPMs are
in "-source" repositories.



--
真実はいつも一つ!/ Always, there's only one truth!
_______________________________________________
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




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux