#136 Crash when conditional Source0 causes missing files in srpm
Closed: Fixed None Opened 11 years ago by sochotni.

alsa-plugins and some other packages have conditional SourceX file definitions And they cause crash of f-r if the srpm is built on epel machine, since it won't include those conditional files. Crash log attached


Which seems to mean that the rpm library is broken, it does resolve macros but does not respect the %if.

One solution is to rewrite spec_file.get_sources using external spectool instead. It can list both patches and sources in a well-defined way (no strange bits to tweak). One dependency less... spectool is part of rpmdevtools
.

It actually respects %if. If you have:
{{{
%if 0%{?rhel}
%define with_jack 0
%else
%define with_jack 1
%endif
...
%if 0%{?with_jack}
Source1: 50-jack.conf
%endif
}}}

Then srpm built on EL system will not contain 50-jack.conf file. This is IMO a bug in the package becase srpm built on EL system should be buildable on Fedora system. I just fixed the error to be more descriptive right now (commit d4fb057)

Basically, I agree with comment:2, this is a bug in the package. Furthermore, when running this "as normal" (testcase) it doesn't come to the crash here, it crashes already in the build step due to the missing file. That crash works as expected, telling user that the build failed and where build logs are.

Since a package should build in mock to be reviewable, I don't see this as a f-r bug at all. That f-r behaves oddly when only running specific tests is more a question of how the tests and testcases are designed, and what conclusions to make from them.

OK. We agree then, and I am closing this as fixed (even though we still crash in those weird cases, it's more descriptive)

Login to comment on this ticket.

Metadata