Bug 9959

Summary: RPM's handling of src.rpm files is weird.
Product: [Retired] Red Hat Linux Reporter: Matthew Miller <mattdm>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.2Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-03-04 17:06:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Matthew Miller 2000-03-04 16:54:14 UTC
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.

Comment 1 Jeff Johnson 2000-03-04 17:06:59 UTC
rpm *does* manage unpacked source files. Take a look at
	--clean		remove the build tree
				(usually /usr/src/redhat/<name>-<version>)
	--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
	cd /usr/src/redhat/SPECS
	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.

Comment 2 Matthew Miller 2000-03-04 17:14:59 UTC
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.

Comment 3 Riley H Williams 2000-03-06 08:54:59 UTC
Q>       --clean         remove the build tree
 Q>                              (usually /usr/src/redhat/<name>-<version>)

Usually /usr/src/redhat/BUILD/<name>-<version> in my experience...