| Summary: | Using %filter_from_provides fails in the builds | ||
|---|---|---|---|
| Product: | Infrastructure | Reporter: | Göran Uddeborg <goeran> |
| Component: | Build System | Assignee: | Xavier Lamien <lxtnow> |
| Status: | CLOSED FIXED | ||
| Severity: | normal | CC: | dwmw2, kwizart, matthias |
| Priority: | P5 | ||
| Version: | NA | ||
| Hardware: | All | ||
| OS: | GNU/Linux | ||
| namespace: | |||
| Attachments: | Definition of filtering macros from redhat-rpm-config | ||
|
Description
Göran Uddeborg
2010-12-30 21:09:09 CET
Can you grab the function that are used in perl filtering. We might need to backport them into el5 redhat-rpm-config until the builder got updated to el6, if not done already. I don't know if this could be workarounded properly on the buildsys until moved for el5 to el6 to build the srpm.
But maybe it worth a try of using such condition for the filters:
%if 0%{fedora} >= 14
Checking %{fedora} doesn't work because it's actually defined on the command line when the SRPM is being built.
http://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering gives the correct answer:
# we don't want to either provide or require anything from _docdir, per policy
%{?filter_setup:
%filter_from_requires /perl(m2vmp2cut)/d
%filter_setup
}
*** Bug 1913 has been marked as a duplicate of this bug. *** Created attachment 703 [details] Definition of filtering macros from redhat-rpm-config I see now I was asked to provide some information here. Sorry for missing that! I don't know why I failed to reply at the time. I attach the definitions of the macros, in case you want to backport. The code to test for them is as in comment 3. But if one does that, I guess one also has to use something like %if 0%{!?filter_setup:1} ... %endif around the old style code in the %prep section. That is: if the filter macros are defined, use them, if not, use the old version. I tried to update my package to use the current perl filtering method, but my build still fails. It gives the same error as before. (Except that the macro is on line 92 now.) Here is a link to the build result: http://buildsys.rpmfusion.org/build-status/job.psp?uid=12449 Please look at c#3 , you are meant to embrace your filter with:
%{?filter_setup:
...
}
So that it won't fail when the macro isn't defined (at make srpm step which remains an el5 host).
Aha, I see. I thought this bugzilla being resolved meant that the guard wasn't needed anymore. But I added it, and my new build succeeded. And the requirement was still filtered out according to the log. Thanks for clarifying. Closing to confirm it works for me now. Thx, please verify to update in F-17 also if relevant. I wasn't planning to do that. This is more of a cosmetic fix in the spec file, and doesn't affect the resulting package. The F-17 package does the filtering already, only in the old-fashoned way. So I thought fixing devel for the future would be appropriate. |