Bug 84055

Summary: Should search the /etc/rpm/platform file under the root-dir
Product: [Retired] Red Hat Raw Hide Reporter: Enrico Scholz <rh-bugzilla>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WONTFIX QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0Keywords: 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: 2003-02-13 16:04:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Enrico Scholz 2003-02-11 17:08:19 UTC
Description of problem:

When using the '--root=...' option, rpm reads the platform-information from the
toplevel /etc/rpm/platform file. This is bad and forces the usage of the
'--ignorearch' switch when installing cross-arch packages.

It would be better when rpm searches the platform-file under the given
root-directory.


Version-Release number of selected component (if applicable):

rpm-4.2-0.65


Steps to Reproduce:
1. D=/foobar
2. mkdir -p $D/var/lib/rpm $D/etc/rpm
3. echo 'arm-unknown-linux' >$D/etc/rpm/platform
4. rpm --root=$D --initdb
5. rpmbuild --rebuild --target=arm foobar.src.rpm
6. rpm --root=$D -U foobar.arm.rpm
    
Actual results:

rpm tells 'package foobar.arm.rpm is intended for a arm architecture'


Expected results:

rpm installs the package

Comment 1 Jeff Johnson 2003-02-13 16:04:29 UTC
rpm determines arch very, very early so that per-arch
configuration can be determined. There's no easy way to
do this after the chrott(2) in order to support cross-platform
installs.

Try
    --ignorearch  don't verify package architecture