Re: python-cheetah templating not working for config.repo?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Shimizu Kuniaki wrote:
Hi,

I found repository settings when importing distribution might have
some troubles.

After importing distribution using "cobbler import", config.repo file
is generated, but it seems python-cheetah templating doesn't work for
"@@server@@" in config.repo file.

Good catch, thanks!

This file doesn't go through the templating engine.  It probably should.

Here's the patch, which I've also checked in to git:

--- a/cobbler/action_reposync.py
+++ b/cobbler/action_reposync.py
@@ -224,9 +224,12 @@ class RepoSync:
        config_file.write("[%s]\n" % repo.name)
        config_file.write("name=%s\n" % repo.name)
        if output:
- config_file.write("baseurl=http://%s/cobbler/repo_mirror/%s\n"; % (self.setting + line = "baseurl=http://%s/cobbler/repo_mirror/%s\n"; % (self.settings.server, r
+            config_file.write(line)
        else:
-            config_file.write("baseurl=%s\n" % repo.mirror)
+            line = "baseurl=%s\n" % repo.mirror
+            line = line.replace("@@server@@",self.settings.server)

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux