Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tag with %{NAME} of SRPM #1364

Open
mikhailnov opened this issue Sep 19, 2020 · 5 comments
Open

Add tag with %{NAME} of SRPM #1364

mikhailnov opened this issue Sep 19, 2020 · 5 comments
Labels

Comments

@mikhailnov
Copy link
Contributor

I am a bit fed up with RPM's inability to show the value of "Name:" tag of the spec from which the package was built. rpm -q --qf '%{sourcerpm}\n shows something like metacity-3.34.1-1.src.rpm and I have to use strange combinations of comsnds to extract the real name "metacity" from this. Why can't there be a tag the value of which will be just "metacity"?

@mikhailnov
Copy link
Contributor Author

There is SOURCEPACKAGE, but it is not used:

[root@rosa-2019 metacity]# rpm -q --querytags bash | grep SOURCE
NOSOURCE
SOURCE
SOURCEPACKAGE
SOURCEPKGID
SOURCERPM
[root@rosa-2019 metacity]# rpm -q --qf '%{SOURCEPACKAGE}\n' bash
(none)

@pmatilai
Copy link
Member

SOURCEPACKAGE is used for identifying source packages, ie it's set to 1 on src.rpm headers.

If we added SOURCENAME, the next person would want SOURCEVERSION, -RELEASE and -EPOCH, (because they can differ from the binary package counterparts) and so on. The idea is that SOURCERPM tells you where to find the data you're after, so you can then go and query the src.rpm all you want.

That said, you're not the first and wont be the the last person asking for this, the more generic request would be for source NEVR in a format that doesn't require ugly unreliable parsing.

@mikhailnov
Copy link
Contributor Author

Is NEVR format saved in headers? If it was, it could be used when parsing NEVR.

@pmatilai
Copy link
Member

Sorry, I don't understand that question. Parsing NEVR is not a whole lot different or better from parsing SOURCERPM, because the latter is literally just NVR.[no]src.rpm (since epoch isn't there, it's actually easier to parse than NEVR). What would (IMO) make an actual difference is having (source) NEVR as separate components available, but it leads back to the point of the data not really belonging to binary packages in the first place.

@ffesti
Copy link
Contributor

ffesti commented Dec 6, 2023

I wonder if we can just have some extension tags to easier access the parts of sourcerpm that do the parsing for you. That would also work for old packages (if only with the new rpm binary)

@ffesti ffesti removed their assignment Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

3 participants