Bug 219386 - URL scheme test fails when using variable substitution
URL scheme test fails when using variable substitution
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-12 16:21 EST by Patrick Monnerat
Modified: 2014-01-21 17:56 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-30 14:40:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Patrick Monnerat 2006-12-12 16:21:58 EST
Description of problem:
When the main configuration file contains a baseurl whose value begins with, 
let's say, $YUM0, the sceme validation fails even if the YUM0 environment 
variable starts with a legal scheme; this probably results because the 
variables are not substituted for the test.


Version-Release number of selected component (if applicable):
3.0.1-2.fc6

How reproducible:
Always

Steps to Reproduce:
1. Export YUM0=ftp://mirror.switch.ch/fedora/linux
2. Create the yum6.conf file as below
3. Create an ext3 filesystem in a temp file and mount it (i.e.: as /mnt)
4. Execute "mkdir -p /mnt/var/lib/rpm"
5. Execute "rpm --root /mnt --initdb"
3. Execute "yum --installroot=/mnt -y -c yum6.conf install <somepackage>"
  
Actual results:
Options Error: Error parsing '$YUM0/core/updates/6/$basearch/': URL must be 
http, ftp, file or https, not ""
And yum stops

Expected results:
Installation of the requested package.

Additional info:
file yum6.conf:
-------------------------------
[main]
cachedir=/var/cache/yum
reposdir=
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
plugins=1
retries=20

[base]
name=Fedora Core 6 - $basearch - Base
baseurl=$YUM0/core/6/$basearch/os/

[updates-released]
name=Fedora Core 6 - $basearch - Released Updates
baseurl=$YUM0/core/updates/6/$basearch/

[extras]
name=Fedora Core 6 - $basearch - Extras
baseurl=$YUM0/extras/6/$basearch/
----------------------------------------
Comment 1 Patrick Monnerat 2007-01-16 05:33:06 EST
Not fixed in 3.0.3-1
Comment 2 Jeremy Katz 2007-04-25 14:58:17 EDT
General variables from the shell aren't supported for replacement
Comment 3 Patrick Monnerat 2007-04-26 04:34:57 EDT
This is NOT a general variable, this is $YUM0, a documented feature.
See http://www.linuxmanpages.com/man5/yum.conf.5.php at the end for doc.
If this variable is used elsewhere in the URL, the substitution is properly 
performed. However, if the scheme part of the URL is substituted, the error 
occurs.
Comment 4 Seth Vidal 2007-04-29 16:54:09 EDT
this is working properly in 3.1.7 in rawhide.

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