dagwieers / mrepo

RPM repository management tool supporting ftp/http/sftp/rsync/rhn/you

Home Page:http://dag.wieers.com/home-made/mrepo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reposync not working on RHEL <= 5, because --norepopath option isn't there

tranky opened this issue · comments

as currently implemented in mrepo, reposync will fail as follows:

usage:
Reposync is used to synchronize a remote yum repository to a local
directory using yum to retrieve the packages.

/usr/bin/reposync [options]

reposync: error: no such option: --norepopath

under CentOS 5.x, because the "--norepopath" option isn't yet implemented in reposync from package "yum-utils-1.1.16-16.el5.centos".

The option is unconditionally added in 9fa1de4 : any idea of how to detect reposync version and pass the right options so that it works on RHEL5 too?

Looks like there isn't a command line switch for getting the reposync version.
However, grepping the output of "reposync --help" for "--norepopath" could be a quick & dirty workaround.

@parsonsa, any idea?

It might be able to be dropped, it'll just add another subdirectory with the repo's name. That might be cleaner than parsing --help output. Can you try deleting line 1463 in 'mrepo' where we add the option and see if the behavior is still good? I don't have access to a RHEL5 box with mrepo on it at the moment.

already done, reposync runs smooth and adds another subdirectory as you stated.

BTW, the logic behind the flag "reposync-newest-only" seems wrong to me.

You're right, it was opposite of what it should be. I made the fixes and sent a pull request.

Glad to be helpful

Thank you all for your help! I'm closing this issue to move the discussion to the pull request. I'll be looking at the code shortly...

Can someone update the mrepo rpm with this change? :-)