On Mon, Jun 17, 2019 at 11:50:01AM +0200, Andrea Bolognani wrote:
On Mon, 2019-06-17 at 11:37 +0200, Martin Kletzander wrote:
> On Mon, Jun 17, 2019 at 10:46:33AM +0200, Michal Privoznik wrote:
> > On 6/17/19 9:15 AM, Andrea Bolognani wrote:
> > > According to [1], only Fedora and FreeBSD have cppi packaged, so
> > > merging this patch will make 'make syntax-check' suddenly fail on
> > > all other target platforms.
> > >
> > > I agree that the current situation is suboptimal, though. How about
> > > we keep cppi optional, but print a more visible message about it not
> > > being available after going through all syntax-check rules? That way
> > > it'd be definitely more difficult to miss.
> >
> > Oh, you're right. I did not realize that cppi is not on CentOS and some
> > other funky distros. So I guess our only option is to make the error
> > message more visible, e.g. some banner?
> >
> > **********************
> > * cppi not installed *
> > **********************
Maybe "cppi not installed, some checks have been skipped", but yeah,
that's pretty much exactly what I had in mind :)
> Yeah, you can also add it to BuildRequires and check for it during configure as
> warning there would be more visible, I guess. You can also require it only where
you know it is available, but it might be too harsh.
Since the spec file is only targeted at Fedora and RHEL/CentOS, we
can simply add
%if 0%{?fedora}
BuildRequires: cppi
%endif
We don't actually run syntax-check when building RPMs so this should
not be in the spec file at all.
Pavel