Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

up vote 3 down vote accepted

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
share|improve this answer

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.

share|improve this answer

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

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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