Bug 103335 - RFE: provide a way to override the platform
Summary: RFE: provide a way to override the platform
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: rpm
Version: 1.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
Depends On:
TreeView+ depends on / blocked
Reported: 2003-08-28 23:15 UTC by Enrico Scholz
Modified: 2007-04-18 16:57 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Last Closed: 2006-01-06 16:31:52 UTC

Attachments (Terms of Use)
rpm-platform.patch (1.36 KB, patch)
2003-08-28 23:18 UTC, Enrico Scholz
no flags Details | Diff

Description Enrico Scholz 2003-08-28 23:15:39 UTC
Description of problem:

When setting up chroot environments from the outside, rpm assumes that the
chroot-environment has the same architecture as the host-environment. This is
very bad when e.g. host is an i686 and the target-system an arm or i586.

Since bug #84055 was refused, there is needed another way to do this. IMO, with
using environment variables, this can be reached without much effort.

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


Comment 1 Enrico Scholz 2003-08-28 23:18:09 UTC
Created attachment 94057 [details]

patch is untested but on the first glance, it should be compilable.

Comment 2 Leonard den Ottolander 2004-03-10 13:46:26 UTC
This seems a bit of a half baked solution, although I can understand
you don't want to touch /etc/rpm/platform every time.

A real fix would be a command line switch (--targetarch). Now how
about adding a patch for that ;) ?

Comment 3 Enrico Scholz 2004-03-11 14:56:48 UTC
Why half baked? Configuration through environment variables is an
often used and very effective solution (e.g. think on all the *_proxy
variables or TERM or TZ or ...).

A CLI switch does not really help since tools like apt or yum would
not know how to use it. AFAIR, reading of /etc/rpm/platform happens
*very* early and before CLI options are evaluated.

The latter fact makes it impossible too, to use a %macro for it.

Comment 4 Leonard den Ottolander 2004-03-11 16:31:49 UTC
I guess you are right. Your argumentation completely convinced me ;-) .

Comment 5 Jeff Johnson 2006-01-06 16:31:52 UTC
No way is rpm arch going to be set from an RPM_PLATFORM environment variable.

Teaching install/erase/upgrade modes about --target (which has already been done
for --query --specedit) is an alternative.

Deferred until somewhen ...

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