Bug 9959 - RPM's handling of src.rpm files is weird.
RPM's handling of src.rpm files is weird.
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2000-03-04 11:54 EST by Matthew Miller
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-03-04 12:06:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Matthew Miller 2000-03-04 11:54:14 EST
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 12:06:59 EST
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 12:14:59 EST
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 03:54:59 EST
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.