Bug 496464 - don't install %if-ed BuildRequires into the buildroot
Summary: don't install %if-ed BuildRequires into the buildroot
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora Hosted Projects
Classification: Retired
Component: mock
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Clark Williams
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-19 12:46 UTC by Levente Farkas
Modified: 2013-01-10 05:10 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-04-30 11:28:22 UTC
Embargoed:


Attachments (Terms of Use)

Description Levente Farkas 2009-04-19 12:46:00 UTC
if i try to build latest rhel-5's kernel-2.6.18-128.1.6.el5 in mock-0.9.14-1.el5 then it's failed, because mock do not install unifdef into the buildroot. the reason for this may be because the spec file contains:
------------------------------
%if %{with_headers}
BuildRequires: unifdef
%endif
------------------------------
and even if with_headers defined as 1 mock still not install unifdef into the buildroot. the following command gives this result:
--------------------------------
mock --rebuild --target="noarch,i386,i686" --without=pae --without=debug --without=debuginfo kernel-2.6.18-128.1.6.el5.src.rpm
--------------------------------
so imho it's a bug.

Comment 1 Clark Williams 2009-04-19 14:59:45 UTC
mock uses the rpmUtils package provded by yum to extract required packages from an SRPM and install them. Chances are the dependency for unifdef is not being recorded in the SRPM. 

Try this on your srpm:

$ rpm -qp --requires kernel-2.6.18-128.1.6.el5.src.rpm | grep unifdef

I tried this on a 2.6.28-128.1.1.el5.src.rpm and it did in fact show unifdef in the output. If unifdef shows up then something is amiss in mock/yum/rpm. If it doesn't show up then the SRPM is probably hosed.

Comment 2 Levente Farkas 2009-04-19 15:13:26 UTC
i also try it with kernel-2.6.18-128.1.6.el5.src.rpm and kernel-.6.28-128.1.1.el5.src.rpm too. the strange thing is that while it's missing from the first it's in the second?

Comment 3 Levente Farkas 2009-04-19 15:27:33 UTC
ok it's not happened with rhel's kernel just with centos kernel:-(

Comment 4 Clark Williams 2009-04-19 18:14:50 UTC
I'd suspect something changed in the build process that caused with_headers to be undefined.


Note You need to log in before you can comment on or make changes to this bug.