Red Hat Bugzilla – Bug 442214
If there's no /usr/src/redhat dir, srpms fail to install
Last modified: 2008-09-16 06:55:46 EDT
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
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
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.
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).
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"...