[tools] mrepo seems to ignore lftp-mirror-options

Dag Wieers dag at wieers.com
Thu Mar 29 20:15:04 CEST 2007


On Thu, 29 Mar 2007, Brian C. Hill wrote:

> On Thu, Mar 29, 2007 at 03:40:32PM +0200, Dag Wieers wrote:
> > On Wed, 28 Mar 2007, Brian C. Hill wrote:
> > 
> > > 	I am trying to mirror only certain RPM's from rpmforge, rather
> > > than all 5K rpms. I tried using lftp-mirror-options to do that, but it
> > > seems to be ignored. When I "ps -fp <lftp pid> --width=400", I see the
> > > long list of other options, but not the one I specificed. I also tried
> > > "-X blah" just to keep it simple - no luck.
> > > 
> > > 	Am I missing something?
> > 
> > The lftp-mirror-options is a 'system-wide' option that belongs in the 
> > [main] section. If you did that, it should work (I went over the code, 
> > which is pretty simple) and do not see an error.
> > 
> > Beware though, that you have 3 directives to influence what lftp does:
> > 
> > 	lftp-options
> > 	lftp-commands
> > 	lftp-mirror-options
> > 
> > On the commandline this would look like:
> > 
> > 	lftp <lftp-options> -c '<lftp-commands>; mirror <lftp-mirror-options> <url> <path>'
> > 
> > But it looks like you already know that :)
> > 
> > I tried it myself by just adding:
> > 
> > 	[main]
> > 	lftp-mirror-options = --just-a-test
> > 
> > And by doing:
> > 
> > 	mrepo -vvvvu -t http rhel5s-i386
> > 
> > And I see:
> > 
> > 	rhel5s-i386: Mirror packages from http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/ to /shelf/redhat/system/rhel5s-i386/rpmforge
> > 	Execute: exec /usr/bin/lftp  -c '; mirror --just-a-test -v -v -v -e -I *.rpm -X "/headers/" -X "/repodata/" -X "*.src.rpm" -X "/SRPMS/" -X "*-debuginfo-*.rpm" -X "/debug/" http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/ /shelf/redhat/system/rhel5s-i386/rpmforge'
> > 	mirror: unrecognized option `--just-a-test'
> > 	Try `help mirror' for more information.
> > 	mrepo: Mirroring failed for http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/ 
> > 	with message:
> > 	  Failed with return code: 256
>
> 	Ahhh. Got it. Thanks!
> 
> 	It would be nice to have a way to mirror only part of a site. We
> only use 20-30 packages from rpmforge and would prefer not to have to
> mirror all 5000. I don't think any of the command line stuff fed to either
> ftp or rsync via the -mirror-options variables will accomplish this.

Yes, that would be a great feature enhancement. Only the current 
configuration format is pretty limited. I have been thinking about yaml 
and use that to extend the current configuration syntax.

Maybe using different extensions would allow to have the old and new 
format next to each other ?

 
> 	I wouldn't even bother with mirroring, but we use RH for some
> things to make Oracle happy (support, etc., blah, blah). We use update
> to get yum and then use yum to get everything else, but up2date wants
> to download several hundred header files just to install yum, which
> can take an hour in some cases (yes, very weird). I won't pretend to
> understand how up2date works.

Nobody in their right mind should use up2date :)

In fact, apt should make everyone happy and smiling. But some people are 
addicted to yum.

 
> 	There are lots of ways to pull this off (put yum in a local repo,
> etc..), but they all involve some 'special' work or an exception to how
> all other updates are handled.
> 
> 	If anyone has any suggestions, I like to hear them.

Apt pinning. It's really ugly to configure, but it does work and allows 
all sort of customizations to what package/repo or version has precedence 
over what.

I would be eternally grateful to the first person who can make the apt 
pinning syntax much more simple and human readable. But to date, nobody 
earned that respect from me (yet) :)

Kind regards,
--   dag wieers,  dag at wieers.com,  http://dag.wieers.com/   --
[all I want is a warm bed and a kind word and unlimited power]


More information about the tools mailing list