RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 850686 - yum --installroot doest not work
Summary: yum --installroot doest not work
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum
Version: 6.3
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-22 07:15 UTC by hydra35
Modified: 2014-01-21 06:25 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-23 19:26:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description hydra35 2012-08-22 07:15:33 UTC
Description of problem:

When using --installroot option to install package to a specific directory, such as /usr/local/nginx, yum always uses an incorrect URL to get repomd.xml: http://mirrors.163.com/centos/%24releasever. The correct one should be http://mirrors.163.com/centos/6.

The command also produces unrelated files in the intended installroot:

/usr/local/nginx
└── var
    ├── cache
    │   └── yum
    │       └── x86_64
    │           └── $releasever
    │               ├── base
    │               │   └── packages
    │               ├── epel
    │               │   ├── metalink.xml
    │               │   └── packages
    │               └── timedhosts.txt
    ├── lib
    │   ├── rpm
    │   │   ├── Name
    │   │   ├── Packages
    │   │   └── Providename
    │   └── yum
    │       ├── repos
    │       │   └── x86_64
    │       │       └── $releasever
    │       │           ├── base
    │       │           └── epel
    │       └── uuid
    ├── log
    │   └── yum.log
    └── run


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

How reproducible:

# yum --installroot=/usr/local/nginx install nginx

Loaded plugins: fastestmirror, presto
Determining fastest mirrors
epel/metalink                                                                                                                                              | 4.5 kB     00:00     
Including mirror: mirror.neu.edu.cn
Including mirror: mirrors.ustc.edu.cn
 * epel: mirror.neu.edu.cn
http://mirrors.163.com/centos/%24releasever/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again



Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 James Antill 2012-08-23 19:26:14 UTC
 When using --installroot everything is done within the chroot, so yum can't find out what $releasever maps to (it normally does this by reading /var/lib/rpm).
 There are two workarounds:

Pass: --releasever=6
Pass: --releasever=/

...the later tells yum to lookup this value from the /var/lib/rpm outside the chroot.


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