OK. Upon reviewing the code once more, I could get around it for now:
[root@cobbler ks_mirror]# cobbler repo add --name=ubtest
--mirror=http://archive.ubuntu.com/ --breed=apt --arch=x86_64
Then, I ran cobbler reposync as shown below. This time, as I
anticipated, the 'm' in .com is perserved. But then cobbler didn't
feed debmirror with enough defaults. So, IMHO there are still two
bugs:
0. Usability. Often times, people forget to end a URL with a slash,
so we need to accommodate this "habit".
1. Complete defaults should be provided to debmirror.
[root@cobbler ks_mirror]# cobbler reposync
[...]
running: /usr/bin/debmirror --passive --nocleanup --method=http --host=archive.ubuntu.com
--root= --dist= /var/www/cobbler/repo_mirror/ubtest --nosource -a amd64
received on stdout:
received on stderr: Option root requires an argument
Option dist requires an argument
Usage: /usr/bin/debmirror [options] <mirrordir>
For details, see man page.
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'cobbler reposync failed'
Exception Info:
File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 131, in die
raise CX(msg)
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'cobbler reposync failed'
Exception Info:
File "/usr/lib/python2.6/site-packages/cobbler/action_reposync.py", line 125,
in run
self.sync(repo)
File "/usr/lib/python2.6/site-packages/cobbler/action_reposync.py", line 171,
in sync
return self.apt_sync(repo)
File "/usr/lib/python2.6/site-packages/cobbler/action_reposync.py", line 514,
in apt_sync
utils.die(self.logger,"cobbler reposync failed")
File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 139, in die
raise CX(msg)
reposync failed, tries left: 0
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'reposync failed, retry limit reached, aborting'
Exception Info:
File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 131, in die
raise CX(msg)
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'reposync failed, retry limit reached, aborting'
Exception Info:
File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 89, in run
rc = self._run(self)
File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 251, in
runner
name=None, nofail=nofail, logger=self.logger)
File "/usr/lib/python2.6/site-packages/cobbler/api.py", line 758, in
reposync
return reposync.run(name)
File "/usr/lib/python2.6/site-packages/cobbler/action_reposync.py", line 147,
in run
utils.die(self.logger,"reposync failed, retry limit reached, aborting")
File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 139, in die
raise CX(msg)
!!! TASK FAILED !!!
[...]
[...]
474
idx = mirror.find("://")
475
method = mirror[:idx]
476
mirror = mirror[idx+3:]
477
478
idx = mirror.find("/")
479
host = mirror[:idx]
480
mirror = mirror[idx+1:]
481
482
idx = mirror.rfind("/dists/")
483
suite = mirror[idx+7:]
484
mirror = mirror[:idx]
485
486
mirror_data = "--method=%s --host=%s --root=%s
--dist=%s " % ( method , host , mirror , suite )
[...]
[...]
Regards,
-- Zack