Bug 441392 - rpm fails to give a useful error message if rpm-build is not installed
rpm fails to give a useful error message if rpm-build is not installed
Product: Fedora Infrastructure
Classification: Retired
Component: cvs (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Elliot Lee
Jeremy Katz
Depends On:
  Show dependency treegraph
Reported: 2008-04-07 16:27 EDT by Carl Worth
Modified: 2008-04-22 11:45 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-22 11:45:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Carl Worth 2008-04-07 16:27:51 EDT
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 11:02:05 EDT
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)

Reassigning to infrastructure...
Comment 2 Panu Matilainen 2008-04-22 11:05:23 EDT
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 11:45:02 EDT

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