Mailinglist Archive: opensuse-buildservice (96 mails)

< Previous Next >
Re: [opensuse-buildservice] Conditions in spec's BuildRequires section doesn't work correctly
On Freitag, 9. Oktober 2015, 23:18:50 CEST wrote Wanghui (John):

My OBS version is 2.6.2, and I found that OBS looks like could not analyse
spec correctly in below cases.


This is part of sane-backends.spec in centos 7. On the top at spec, there is

%if !0%{?fedora}%{?rhel} || 0%{?fedora} >= 18 || 0%{?rhel} >= 7
%global libusb1 1
%global libusb1 0

and in BuildRequires section, there is

%if %libusb1
BuildRequires: libusbx-devel
BuildRequires: libusb-devel

When initialize compile enviroment, libusb-devel was installed, but in fact,
libusbx-devel should be installed,
I think this may becauase of my worker is suse 11.3. While start build,
building was soon end with an error
"Can't find BuildRequires libusbx-devel".

I can not reproduce this with current code, but there was a bugfix lately which
might have fixed this (didn't tried with the old code).

Can you update your build package and try again?
(be sure to make a source change or execute a manual package check via bs_admin
to see an effect).

If it does not help, a good way to debug this is to use

obs_admin --parse-build-desc $ANY.spec x86_64

and check what dependencies get detected.


%if 0%{?opensuse_bs}
BuildRequires: glibc32
BuildRequires: /lib/ /usr/lib/ /lib64/

In my project conf, I added "%define opensuse_bs 1". But still, my package
status is unresolvable, tips is
"nothing provides /lib/, nothing provides /usr/lib/, nothing
provides /lib64/, nothing provides /usr/lib64/"

As workaround, what can I do for these two cases. Anyone can help?

OBS does not build a database containing file provides by default for speed
You need to define them yourself using FileProvides: directive:


Adrian Schroeter
email: adrian@xxxxxxx

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284
(AG Nürnberg)

Maxfeldstraße 5
90409 Nürnberg

To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >