summaryrefslogtreecommitdiffstats
path: root/cobbler/action_reposync.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2007-11-02 10:29:40 -0400
committerMichael DeHaan <mdehaan@redhat.com>2007-11-02 10:29:40 -0400
commitb05468107f6bbb82153d244acb0c72be47a81e94 (patch)
treec0b04ada405fe397d87583d2bf76ed01e5b463d1 /cobbler/action_reposync.py
parent84d81d4bdd8d13b998dfc7c0abc5930d6d1968dd (diff)
downloadthird_party-cobbler-b05468107f6bbb82153d244acb0c72be47a81e94.tar.gz
third_party-cobbler-b05468107f6bbb82153d244acb0c72be47a81e94.tar.xz
third_party-cobbler-b05468107f6bbb82153d244acb0c72be47a81e94.zip
In the process of making all repositories templates so we can apply the values of --server-override
to them and make cobbler servers easier to migrate also. This will result in the removal of --local-filename from cobbler repos.
Diffstat (limited to 'cobbler/action_reposync.py')
-rw-r--r--cobbler/action_reposync.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/cobbler/action_reposync.py b/cobbler/action_reposync.py
index d49efd1..fdd9c3a 100644
--- a/cobbler/action_reposync.py
+++ b/cobbler/action_reposync.py
@@ -224,16 +224,14 @@ class RepoSync:
def create_local_file(self, repo, dest_path, output=True):
"""
Two uses:
- (A) Create local files that can be used with yum on provisioned clients to make use of thisi mirror.
- (B) Create a temporary file for yum to feed into reposync
+ (A) output=True, Create local files that can be used with yum on provisioned clients to make use of thisi mirror.
+ (B) output=False, Create a temporary file for yum to feed into yum for mirroring
"""
- # FIXME: the output case will generate repo configuration files which are usable
+ # the output case will generate repo configuration files which are usable
# for the installed systems. They need to be made compatible with --server-override
- # which means that we should NOT replace @@server@@ except in a dynamically generated
- # post script that runs on each file we wget, and replace it there. Until then
- # installed repos may require a host file setting that allows them to find the
- # main server address used for the initial mirroring. We can clean this up :)
+ # which means they are actually templates, which need to be rendered by a cobbler-sync
+ # on per profile/system basis.
if output:
fname = os.path.join(dest_path,"config.repo")
@@ -246,7 +244,7 @@ class RepoSync:
if output:
# see note above: leave as @@server@@ and fix in %post of kickstart when
# we generate the stanza
- line = "baseurl=http://%s/cobbler/repo_mirror/%s\n" % (self.settings.server, repo.name)
+ line = "baseurl=http://${server}/cobbler/repo_mirror/%s\n" % (repo.name)
config_file.write(line)
else:
line = "baseurl=%s\n" % repo.mirror