summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSlava Barinov <v.barinov@samsung.com>2018-12-04 10:02:40 +0300
committerDongkyun Son <dongkyun.s@samsung.com>2018-12-04 17:04:56 +0900
commit37e245b2f5eaa6ee66257df2ed115558927f30b6 (patch)
tree0bce67548490db2f3758b3976603c11f80c47621
parentb4eecfd244d9c78d07954075e2aacfd1d5ba1cd9 (diff)
downloadkickstarter-37e245b2f5eaa6ee66257df2ed115558927f30b6.tar.gz
kickstarter-37e245b2f5eaa6ee66257df2ed115558927f30b6.tar.bz2
kickstarter-37e245b2f5eaa6ee66257df2ed115558927f30b6.zip
Add condition for %env section backward compatibilitysubmit/tizen/20181204.094226
Change-Id: I5281f4ec6359f0e3f582ad1cfc6939da4ff134a3 Signed-off-by: Slava Barinov <v.barinov@samsung.com>
-rw-r--r--kickstart/kickstart.tmpl2
-rw-r--r--kswriter/KSWriter.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/kickstart/kickstart.tmpl b/kickstart/kickstart.tmpl
index 54c9a8b..52c8aae 100644
--- a/kickstart/kickstart.tmpl
+++ b/kickstart/kickstart.tmpl
@@ -87,9 +87,11 @@ repo --name=${r} --baseurl=${rr.Url} ${options_repo}
#end for
#end for
+#if $metadata.has_key("Env")
%env
${metadata.Env}
%end
+#endif
#if $metadata.has_key("PackageArgs")
%packages --${metadata.PackageArgs}
diff --git a/kswriter/KSWriter.py b/kswriter/KSWriter.py
index a15ed63..9449eb4 100644
--- a/kswriter/KSWriter.py
+++ b/kswriter/KSWriter.py
@@ -166,7 +166,8 @@ class KSWriter():
conf['Post'] = postscript
conf['NoChroot'] = nochrootscript
conf['Run'] = runscript
- conf['Env'] = envscript
+ if envscript:
+ conf['Env'] = envscript
return conf
def process_files(self, meta, repos):