reposync RHEL Server Optional not possible

Latest response

the server is registratet and can connect to RHN
first I login select system open release channel and make a cross RHEL Server Optional

on the server I install yum.repo file

[root@larry2n yum.repos.d]

file : rhel-x86_64-server-optional.repo

[rhel-server_optional_6]
name=Red Hat Enterprise Linux $releasever - $basearch - optional
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

after
$ repo clean all

$ reposync --gpgcheck -l --repoid=rhel-x86_64-server-optional-6 --download_path=/
var/tmp/DEPOT
Loaded plugins: product-id, refresh-packagekit, rhnplugin
This system is receiving updates from RHN Classic or RHN Satellite.

[root@larry2n yum.repos.d]$

Nothing is copied

Have somebody an advice ??

Thanks

Dirk

Responses

In the definition it's named "rhel-server_optional_6" in your reposync line its "rhel-x86_64-server-optional-6"

Underscore/hyphen not the same?

Good catch.

Here is a quick snippet of python to display the Yum Variables (in case you want to hard code them in your repo file (for testing).

python -c 'import yum, pprint; yb = yum.YumBase(); pprint.pprint(yb.conf.yumvar, width=1)'