Bug 58487 - rpm can't install RPMs if /usr/src/redhat doesn't exist
Summary: rpm can't install RPMs if /usr/src/redhat doesn't exist
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm   
(Show other bugs)
Version: 7.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2002-01-17 23:09 UTC by Liam Stewart
Modified: 2013-01-29 06:59 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-01-17 23:09:42 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Liam Stewart 2002-01-17 23:09:37 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.0.2 (X11; Linux i686; U;) Gecko/20011226

Description of problem:
When installing a source RPM on a system that lacks a /usr/src/redhat directory
(ie: /usr/src exists, but the directory 'redhat' doesn't exist within /usr/src),
rpm fails:

[root@tourist SRPMS]# rpm -i gaim-0.11.0pre4-5.src.rpm
error: cannot create %sourcedir /usr/src/redhat/SOURCES

If /usr/src/redhat exists but directories within that, such as SOURCES and
SPECS, do, then they are silently created and the install succeeds. So if
/usr/src/redhat doesn't exist, I would expect it to be created during the src
rpm installation.

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

How reproducible:

Steps to Reproduce:
1. Make sure /usr/src/redhat doesn't exist.
2. Choose any source rpm
3. as root

# rpm -i foo-1.2.3.src.rpm

Actual Results:  error: cannot create %sourcedir /usr/src/redhat/SOURCES

Expected Results:  /usr/src/redhat is created, source rpm is installed normally

Additional info:

Comment 1 Jeff Johnson 2002-03-19 19:47:30 UTC
The /usr/src/redhat directories are part
of the rpm-build package, and are created
when the rpm-build package is installed.

Comment 2 Ashish Kumar Laxkar 2013-01-29 06:59:39 UTC
warning: group mockbuild does not exist - using root

after installing src.rpm gives like this error why like that???? Please reply me.. via mail ashish.laxkar16@gmail.com

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