Bug 442214

Summary: If there's no /usr/src/redhat dir, srpms fail to install
Product: [Fedora] Fedora Reporter: Diego Escalante Urrelo <diegoe>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9CC: dhageman, pnasrat
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-09-16 10:55:46 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 Diego Escalante Urrelo 2008-04-12 20:46:14 UTC
If I try to install a srpm:

[root@caravana diego]# rpm -ivh kernel-2.6.25-0.218.rc8.git7.fc9.src.rpm 
error: cannot create %sourcedir /usr/src/redhat/SOURCES

Creating /usr/src/redhat manually fixes the problem. But I guess rpm should take
care of creating such dir, something like mkdir -p I think.

Note that this system was installed from the latest beta livecd and hasn't been
updated yet.

Comment 1 Bug Zapper 2008-05-14 09:21:48 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 dhageman 2008-08-05 14:52:36 UTC
I don't believe this a bug.  You just need to install the rpm-build package.  No point in install a source rpm if you are unable to do anything with it after that.

Comment 3 Diego Escalante Urrelo 2008-08-05 19:58:53 UTC
I might want to just have a read of the sources, for reference. Thing is that its really silly to not create the parent dirs in the install path of the src rpm.
It's an ugly rough edge, IMHO this kind of thing look really ugly and make you fix stuff you shouldn't. If I'm installing the package without having rpm-build, then i'll find out when I'm trying to build the rpm out of it, otherwise let me do what I want or make every src.rpm depend on rpm-build (which I don't think is a better option).

Comment 4 Panu Matilainen 2008-09-16 10:55:46 UTC
The current rawhide rpm automatically creates the necessary directories, among various other changes in this area. For rpm 4.4.2.x in F9, consider it "historical behavior"...