diff options
author | Anas Nashif <anas.nashif@intel.com> | 2012-05-15 13:08:14 +0100 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2012-05-15 13:08:14 +0100 |
commit | 72a42da22d8e8736e77233a9eaf6d9a03f744045 (patch) | |
tree | d0fcd38d4875243460dfe6a46a2122d1f0eb6792 | |
parent | 115cece465b47ee4b4f0d201e1147aa0265ac7ae (diff) | |
download | kickstarter-72a42da22d8e8736e77233a9eaf6d9a03f744045.tar.gz kickstarter-72a42da22d8e8736e77233a9eaf6d9a03f744045.tar.bz2 kickstarter-72a42da22d8e8736e77233a9eaf6d9a03f744045.zip |
set distro
-rw-r--r-- | kswriter/KSWriter.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kswriter/KSWriter.py b/kswriter/KSWriter.py index 69e228c..d60e31d 100644 --- a/kswriter/KSWriter.py +++ b/kswriter/KSWriter.py @@ -18,6 +18,7 @@ def mkdir_p(path): class KSWriter(): def __init__(self, configs=None, repos=None, outdir=".", config=None, packages=False): + self.dist = None self.image_filename = configs self.repo_filename = repos self.outdir = outdir @@ -96,6 +97,8 @@ class KSWriter(): if repo.has_key('Options'): r['Options'] = repo['Options'] r['Url'] = repo['Url'].replace("@ARCH@", meta['Architecture']) + if meta.has_key("Distribution") or self.dist is not None: + r['Url'] = repo['Url'].replace("@DIST@", self.dist or meta['Distribution']) r['Url'] = r['Url'].replace("@RELEASE@", meta['Baseline']) new_repos.append(r) else: |