Bug 589931 - yum-builddep fails to resolve some BuildRequires if "hidden" by %global
yum-builddep fails to resolve some BuildRequires if "hidden" by %global
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum-utils (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: James Antill
BaseOS QE Security Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-07 06:29 EDT by Michal Nowak
Modified: 2014-01-21 01:17 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-05-07 09:52:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michal Nowak 2010-05-07 06:29:07 EDT
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}
%else
%{!?with_crash: %global with_crash 1}
%endif

[...]

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

[...]

%if %{with_crash}
Requires: crash
%endif

etc.


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

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

yum-3.2.27-4.el6.noarch
yum-utils-1.1.26-7.el6.noarch
systemtap-1.2-1.el6.i686

How reproducible:

always. all archs.

Expected results:

crash-devel resolved & installed as others BRs.
Comment 1 RHEL Product and Program Management 2010-05-07 07:31:22 EDT
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
inclusion.
Comment 2 seth vidal 2010-05-07 09:06:04 EDT
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 09:52:20 EDT
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 09:55:15 EDT
I can see. Thanks for clarification.

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