On Sat, Nov 14, 2015 at 7:12 AM, Stefan Seyfried <stefan.seyfried@gmail.com> wrote:
Hi,
I'm running an OBS instance, used amongst others to build stuff for multiple distributions (SLES and RHEL, mostly).
Now if I import packages from openSUSE OBS, I often have to patch the spec file. 95% of these patches are like this:
+%if 0%{?suse_version} Recommends: not_really_necessary_thing_1 Suggests: totally_unnecessary_thing_2 +%endif
I automated this task in build-recipe-spec: If the target's RPM does not know "Recommends:" or "Suggests:", just drop these lines.
This is made configurable with the following prjconf Buildflags: dropunknownrpmtags
here is the patch for discussion, if this would be interesting for upstream, I'll prepare a proper pull request.
Your patch assumes that only SUSE would support weak dependencies. However this is not the case. While it is true SUSE's patched RPM has had it for quite a while, it was upstreamed into mainline RPM for RPM 4.12. In the current supported distribution selection list, Fedora 21 and newer (as well as Mageia 5 and newer) have support for it. And if they are building with debbuild (which can use RPM spec to produce native Debian packages), the tags are supported as well for all Debian targets. My suggestion: add a check for the BuildEngine so that it doesn't do anything when debbuild is being used and also ask RPM what version it is if it isn't SUSE or debbuild and evaluate based on that. -- 真実はいつも一つ!/ Always, there's only one truth! -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org