[Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-03-26 Thread Florian Festi
This fixes a regression that was present since 4.18 that printed them out as source/nosource packages as the headers are no proper binary packages. Setting the default query to "%{NEVRA}\n" forces the right output. Resolves: #2819 You can view, comment on, or merge this pull request online at:

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-03-26 Thread Panu Matilainen
This wont fix it for other potential users of archsuffix though. Let's at least see if there is a way to fix the issue at the source - maybe archsuffix can do better heuristics than the simple-minded headerIsSource() or .. something. -- Reply to this email directly or view it on GitHub: https:

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-03-26 Thread Florian Festi
May be headerIsSource() should be more correct... I'll look into it -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2995#issuecomment-2020414787 You are receiving this because you are subscribed to this thread. Message ID: ___

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-03-26 Thread Florian Festi
@ffesti pushed 2 commits. bdf3646be0b865bc221fdb7c3468a60208fc9c7c Make genSourceRpmName available internally 9283c6e24ad9cdc017651de857b3b61ebaf211d5 Set SOURCERPM when querying SPEC files -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2995/files/0e124b4e571568aa89

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-03-26 Thread Florian Festi
Now to something completely different... What about just setting the SOURCERPM tag for binary packages that are parsed for querying? One could argue that we should move more of this kind of initialization to the parse stage so we get a more complete result earlier. But that is a crusade I am no

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-03-26 Thread Florian Festi
@ffesti pushed 1 commit. 51c3ab5c4232fa6798c3c3bb24ce279ce6ad82e1 Set SOURCERPM when querying SPEC files -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2995/files/9283c6e24ad9cdc017651de857b3b61ebaf211d5..51c3ab5c4232fa6798c3c3bb24ce279ce6ad82e1 You are receiving this

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-03-27 Thread Panu Matilainen
Yeah, (looking into) populating SOURCERPM early was what I meant with fixing at the source. Based on a quick look, you could just move SOURCERPM insertion from processBinaryFiles() to, say, finalizeSpec() and be done with it with equal amount of work, without adding duplicate special paths. --

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-04-02 Thread Florian Festi
OK, I looked into this and there are road blocks everywhere. Let's just stick to the PR as is. I generally agree that this is not the way to do this but the build code is an entangled mess and moving stuff round at this point is something we just should not do. Looking at all the hidden assumpt

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-04-02 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -180,6 +180,34 @@ runroot rpmspec \ []) RPMTEST_CLEANUP +AT_SETUP([rpmspec -q --rpms]) +AT_KEYWORDS([query]) +RPMTEST_CHECK([ +RPMDB_INIT +runroot rpmspec --rpms \ + -q /data/SPECS/hello.spec | grep src +runroot rpmspec --rpms \ + -q /data/S

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-04-02 Thread Panu Matilainen
@pmatilai commented on this pull request. > +[0], +[hello-1.0-1 +], +[]) +RPMTEST_CLEANUP + +AT_SETUP([rpmspec -q --srpm]) +AT_KEYWORDS([query]) +RPMTEST_CHECK([ +RPMDB_INIT +runroot rpmspec --srpm \ + -q /data/SPECS/hello.spec +], +[0], +[hello-1.0-1.src +], I'd put this in the same SETUP/CL

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-04-02 Thread Panu Matilainen
The build code is a mess for sure, but adding hacks on top of hacks only makes it worse. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2995#issuecomment-2031613554 You are receiving this because you are subscribed to this thread. Messa

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-04-02 Thread Panu Matilainen
Took a quick look at my own suggestion in the earlier comment and it brings out some truly WTF failures :laughing: -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2995#issuecomment-2031615530 You are receiving this because you are subscr

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-04-02 Thread Panu Matilainen
Here's a simple and straightforward way source headers are always indentified as such right after parse: https://github.com/rpm-software-management/rpm/pull/3012 -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2995#issuecomment-203164153

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-04-02 Thread Panu Matilainen
Aaargh, except that the issue here was not positively identifying source headers but binaries :facepalm: -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2995#issuecomment-2031869298 You are receiving this because you are subscribed to th

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-04-02 Thread Panu Matilainen
Added a second commit there to deal with RPMTAG_SOURCERPM too: https://github.com/rpm-software-management/rpm/pull/3012/commits/cb47d1e144cb0e83c715086423785c03f0ec51c4 -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2995#issuecomment-2031

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-04-03 Thread Florian Festi
Closed #2995. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2995#event-12338936477 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mailing list Rpm

Re: [Rpm-maint] [rpm-software-management/rpm] rpmspec: Use NEVRA for binary packages queries (PR #2995)

2024-04-03 Thread Florian Festi
Merged #3012 instead -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2995#issuecomment-2034120680 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mail