Bug 441392 - rpm fails to give a useful error message if rpm-build is not installed
Summary: rpm fails to give a useful error message if rpm-build is not installed
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora Infrastructure
Classification: Retired
Component: cvs
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Elliot Lee
QA Contact: Jeremy Katz
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-04-07 20:27 UTC by Carl Worth (Ampere)
Modified: 2008-04-22 15:45 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-04-22 15:45:02 UTC
Embargoed:


Attachments (Terms of Use)

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.


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