Bug 9959 - RPM's handling of src.rpm files is weird.
Summary: RPM's handling of src.rpm files is weird.
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 4.2
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
Keywords: FutureFeature
Depends On:
TreeView+ depends on / blocked
Reported: 2000-03-04 16:54 UTC by Matthew Miller
Modified: 2008-05-01 15:37 UTC (History)
0 users

Clone Of:
Last Closed: 2000-03-04 17:06:07 UTC

Attachments (Terms of Use)

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...

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