Bug 589931 - yum-builddep fails to resolve some BuildRequires if "hidden" by %global
Summary: yum-builddep fails to resolve some BuildRequires if "hidden" by %global
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum-utils
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact: BaseOS QE Security Team
Depends On:
TreeView+ depends on / blocked
Reported: 2010-05-07 10:29 UTC by Michal Nowak
Modified: 2014-01-21 06:17 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-05-07 13:52:20 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Michal Nowak 2010-05-07 10:29:07 UTC
Description of problem:

I have here systemtap-1.2-1.el6.src.rpm which I'd like to rebuild. Some BRs are missing so I run `yum-builddep systemtap-1.2-1.el6.src.rpm` it resolves them and installs. Then I try to rebuild package `rpmbuild --rebuild systemtap-1.2-1.el6.src.rpm` but it fails:

[root@auto-i386-001 ~]# rpmbuild --rebuild systemtap-1.2-1.el6.src.rpm 
Installing systemtap-1.2-1.el6.src.rpm
error: Failed build dependencies:
	crash-devel is needed by systemtap-1.2-1.el6.i686

systemtap spec file looks like this:

%ifarch ppc
# crash is not being built on rhel6 beta on ppc
%{!?with_crash: %global with_crash 0}
%{!?with_crash: %global with_crash 1}


%if %{with_crash}
BuildRequires: crash-devel zlib-devel


%if %{with_crash}
Requires: crash


It seems that yum-builddep fails to resolve BuildRequire if it is "hidden" by %global definition.

Version-Release number of selected component (if applicable):


How reproducible:

always. all archs.

Expected results:

crash-devel resolved & installed as others BRs.

Comment 1 RHEL Program Management 2010-05-07 11:31:22 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for

Comment 2 seth vidal 2010-05-07 13:06:04 UTC
can you run:

rpm -qpR systemtap-1.2-1.el6.src.rpm

I suspect the buildreq is not listed there, either.

yum-builddep cannot read the spec file and parse the deps that show up there. It only gets the buildreqs from the requires in the src rpm header.

Comment 3 James Antill 2010-05-07 13:52:20 UTC
Specifically, this is the same "bug" as using %{_isa} in BuildRequires ... they are then "fixed" at the point rpmbuild creates the .src.rpm, so you either need to create a .src.rpm for each arch. ... or do something else.

Comment 4 Michal Nowak 2010-05-07 13:55:15 UTC
I can see. Thanks for clarification.

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