summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Saukko <marko.saukko@cybercom.com>2011-04-21 17:14:09 +0300
committerMarko Saukko <marko.saukko@cybercom.com>2011-04-21 17:15:20 +0300
commita905bec4b4c7f61df7ec01f48483ac50b0e8b746 (patch)
tree2a737f4f46fdb74c7d20309718c0608efdff0fbf
parent4f1b9d36e27eff1e1c4f329605cc29b525da08fb (diff)
downloadkickstarter-a905bec4b4c7f61df7ec01f48483ac50b0e8b746.tar.gz
kickstarter-a905bec4b4c7f61df7ec01f48483ac50b0e8b746.tar.bz2
kickstarter-a905bec4b4c7f61df7ec01f48483ac50b0e8b746.zip
Added possibility to set repository specific options (BMC#15938)
-rw-r--r--kickstart/kickstart.tmpl10
-rwxr-xr-xtools/kickstarter2
2 files changed, 9 insertions, 3 deletions
diff --git a/kickstart/kickstart.tmpl b/kickstart/kickstart.tmpl
index 83bd1d3..6ac2d09 100644
--- a/kickstart/kickstart.tmpl
+++ b/kickstart/kickstart.tmpl
@@ -35,17 +35,21 @@ desktop --autologinuser=${metadata.DefaultUser} #slurp
#end if
user --name ${metadata.DefaultUser} --groups audio,video --password ${metadata.DefaultUserPass}
-#set $save = ""
+#set $options_global = ""
#if $metadata.SaveRepos
-#set $save = "--save --debuginfo --source --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego"
+#set $options_global = "--save --debuginfo --source --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego"
#end if
#for $r in $metadata.Repos
#for $rr in $repos
#if $rr.Name == $r
+#set $options_repo = $options_global
+#if $rr.has_key("Options")
+#set $options_repo = $rr.Options
+#end if
#if $rr.Name == "adobe"
repo --name=${r} --baseurl=${rr.Url} --save
#else
-repo --name=${r} --baseurl=${rr.Url} ${save}
+repo --name=${r} --baseurl=${rr.Url} ${options_repo}
#end if
#end if
#end for
diff --git a/tools/kickstarter b/tools/kickstarter
index 5b483cb..da49735 100755
--- a/tools/kickstarter
+++ b/tools/kickstarter
@@ -108,6 +108,8 @@ class KSWriter():
for repo in repos:
r = {}
r['Name'] = repo['Name']
+ if repo.has_key('Options'):
+ r['Options'] = repo['Options']
r['Url'] = repo['Url'].replace("@ARCH@", meta['Architecture'])
r['Url'] = r['Url'].replace("@RELEASE@", meta['Baseline'])
new_repos.append(r)