[Rpm-maint] [PATCH 2/2] Add debugsource recommends to debuginfo packages.
Panu Matilainen
pmatilai at redhat.com
Fri Sep 22 08:45:12 UTC 2017
On 09/22/2017 11:25 AM, Panu Matilainen wrote:
> On 09/21/2017 06:01 PM, Mark Wielaard wrote:
>
>> diff --git a/tests/rpmbuild.at b/tests/rpmbuild.at
>> index 25d9167..fe49b2b 100644
>> --- a/tests/rpmbuild.at
>> +++ b/tests/rpmbuild.at
>> @@ -856,15 +856,20 @@ run rpmbuild --quiet \
>> --define "_debugsource_packages 1" \
>> -ba "${abs_srcdir}"/data/SPECS/hello2.spec
>> -# Unpack the debuginfo rpms so we can check the sources are there.
>> +# Unpack the debugsource rpm so we can check the sources are there.
>> rpm2cpio
>> ${abs_builddir}/testing/build/RPMS/*/hello2-debugsource-1.0-1.*.rpm \
>> | cpio -diu --quiet
>> # Check that hello.c is there.
>> ls ./usr/src/debug/hello2-1.0*/
>> +
>> +# The debuginfo package should recommend the debugsource package
>> (ignore arch).
>> +echo -n "Recommends: "
>> +rpm -qp --recommends
>> ${abs_builddir}/testing/build/RPMS/*/hello2-debuginfo-1.0-1.*.rpm |
>> sed -E 's/([[-.a-z0-9]]+)\(.*\) = ([[-.0-9]]+)/\1\(ignore-arch\) =
>> \2/' > ],
>> [0],
>> [hello.c
>> +Recommends: hello2-debugsource(ignore-arch) = 1.0-1
>
> Hmm, I'm getting testsuite failures on all these tests, the common
> symptom is that the "(ignore-arch)" part is missing, eg:
>
> +++ /home/pmatilai/repos/rpm/tests/rpmtests.dir/at-groups/131/stdout
> 2017-09-22 08:22:52.420016846 +0000
> @@ -1,3 +1,3 @@
> hello.c
> -Recommends: hello2-debugsource(ignore-arch) = 1.0-1
> +Recommends: hello2-debugsource = 1.0-1
>
> This is on Fedora 26, dunno if there might be some sed version
> difference here.
Nope... the problem is the isa-part is missing from the package itself:
[pmatilai at sopuli tests]$ rpm -qp --recommends
testing/build/RPMS/x86_64/hello2-debuginfo-1.0-1.x86_64.rpm
hello2-debugsource = 1.0-1
[pmatilai at sopuli tests]$
So ... actually this has zero to do with this patch or sed or anything
like that. It's a difference in how we build rpm and it simply hasn't
come up before because nothing has been caring about the %{_isa} and
related macros - in fact the test-suite typically goes out of its way to
avoid those, as is the case here as well.
The problem is the hardwired /usr/local/prefix in the macro path in
these tests:
--macros=${abs_top_builddir}/macros:${abs_top_builddir}/tests/testing/usr/lib/rpm/platform/%{_target_cpu}-%{_target_os}/macros:${top_srcdir}/macros.debug
\
...in quite a few places:
[pmatilai at sopuli tests]$ grep /usr/local/lib/rpm *.at|wc -l
38
Would be good to hide the common invocation details in a helper function
in tests/atlocal(.in) so things like this only need to be fixed in one
place. Sorry for not suggesting this earlier, trouble is I haven't
really paid much attention to the test case details, just been happy to
see there *are* tests.
- Panu -
More information about the Rpm-maint
mailing list