5

Is there a way to make reposync ignore /etc/yum.conf ?

When i use reposync --config=/my/path/to/alternative/inputrepo.conf it's still picking up repositories for consideration inside /etc/yum.repos.d

My alternative/inputrepo.conf just looks like:

[varnish]
name=varnish
baseurl=http://repo.varnish-cache.org/redhat/varnish-3.0/el6/x86_64/

...but reposync still picks up the google-chome repo, which is only in /etc/yum.repos.d/ and complains about varnish being defined twice.

This is a problem for me because some of the mirrors i want to sync are also present on the system in /etc/yum.repos.d/, but with different baseurls.

5

In your alternate yum.conf you need to set reposdir to something else so it won't look in /etc/yum.repos.d.

I put my repo definitions for reposync in /etc/reposync.repos.d so the line to add to the yum.conf you're using for reposync would look like this:

reposdir=/etc/reposync.repos.d
1

Try:

% reposync -p [destdir] --repoid=varnish

This option will sync repo varnish repo to your local repo to whatever directory you provide.

% reposync -p [destdir] -n --repoid=varnish

Will sync only the newest files for subsequent syncs.

0

Check out yum --disablerepo="*" ... and similar flags. Read the yum manpage.

  • I thought of this, but how does that help ? both repos have the same name. In my case 'varnish'. I can disable both, then will reposync use the ones from my file regardless ? -- i'll go try it. – Sirex Jan 30 '13 at 21:45
  • no joy. aside from all else, --disablerepo disables for the following yum operation, not a reposync one. – Sirex Jan 30 '13 at 21:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.