Using -i or -U to install src.rpm files leads to counterintuitive results.
RPM ought to either manage the unpacked source files (which seems kinda
cool to me...) or there ought to be a seperate option (or even seperate
program) for unpacking src.rpm files.
rpm *does* manage unpacked source files. Take a look at
--clean remove the build tree
--rmsource remove the sources/patches
(usually in /usr/src/redhat/SOURCES
--rmspec remove the specfile
(usually in /usr/src/redhat/SPEC)
For example, to remove all the components of a src.rpm, one would do
rpm --clean --rmsource --rmspec <your_specfile_here>
In addition, if you are as poor a typist as me :-), you can extend rpm with
something like a --zap argument by doing
echo "rpm alias --zap --clean --rmsource --rmspec" >> /etc/popt
so that you can shorten the example above to
rpm --zap <your_specfile_here>
Meanwhile, what you are expecting is a rpm database entry, and there is no
easy way, because of the number of unknown files generated during a build,
to create a database entry. Finally, there is the legacy expectation. For better
or worse, rpm does what it does and cannot be changed at this point.
Thanks for the tips - the --zap idea is very useful.
Anyway, I understand the reasoning, but still think that -U/-i should always
result in a database entry and source rpms should be installed a different way.
Ah well, I'm sure we've all got more important things to do. :) Thanks again.
Q> --clean remove the build tree
Q> (usually /usr/src/redhat/<name>-<version>)
Usually /usr/src/redhat/BUILD/<name>-<version> in my experience...