Bug 441392

Summary: rpm fails to give a useful error message if rpm-build is not installed
Product: [Retired] Fedora Infrastructure Reporter: Carl Worth (Ampere) <cworth>
Component: cvsAssignee: Elliot Lee <sopwith>
Status: CLOSED RAWHIDE QA Contact: Jeremy Katz <katzj>
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: notting, pnasrat, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-22 15:45:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Carl Worth (Ampere) 2008-04-07 20:27:51 UTC
Version-Release number of selected component (if applicable): I encountered this
bug when attemping some builds on Fedora 8, so the F8 rpm is definitely
affected. I've been told that the problem persists in current rpm as well, but I
haven't verified that myself yet.

Steps to Reproduce:
1. Install Fedora 8 (or newer)
2. cvs co xorg-x11-xserver; cd xorg-x11-xserver/F-8
3. make prep
  
Actual results:

[cworth@mandolin F-8]$ make prep
rpm --define "_sourcedir /home/cworth/fedora/xorg-x11-server/F-8" --define
"_specdir /home/cworth/fedora/xorg-x11-server/F-8" --define "_builddir
/home/cworth/fedora/xorg-x11-server/F-8" --define "_srcrpmdir
/home/cworth/fedora/xorg-x11-server/F-8" --define "_rpmdir
/home/cworth/fedora/xorg-x11-server/F-8" --define "dist .fc8" --define "fedora
8" --nodeps -bp xorg-x11-server.spec
-bp: unknown option
make: *** [prep] Error 1

Expected results:

rpm: Error: The rpm-build package is required to perform the
requested information. Please execute "yum install rpm-build"
and then try again.

Or something to that effect. Without a useful error message like
this, I was totally mystified.

Comment 1 Panu Matilainen 2008-04-22 15:02:05 UTC
This isn't an rpm bug but one in the Fedora dist-cvs Makefile.common: "rpm"
command support building packages in many many years, but the Makefile.common
happily subsititutes rpmbuild for it if rpmbuild isn't available:

ifndef RPM
RPM := $(shell if test -f /usr/bin/rpmbuild ; then echo rpmbuild ; else echo rpm
; fi)
endif

Reassigning to infrastructure...


Comment 2 Panu Matilainen 2008-04-22 15:05:23 UTC
Duh, apologies for typos, that should've read:
"rpm" command hasn't supported building packages in many many years.

Falling back to "rpm" if "rpmbuild" isn't available doesn't make any sense as it
wont work, it just complain loudly if "rpmbuild" command can't be found.

Comment 3 Bill Nottingham 2008-04-22 15:45:02 UTC
Fixed.