Commit 322aa6e3 authored by Julien Muchembled's avatar Julien Muchembled

download-unpacked: drop unused `environment-section` option

It was partially broken since commit 8a9e3766:
it only works when combined with `environment` option.
parent d3041978
......@@ -43,18 +43,11 @@ def rmtree(path):
class EnvironMixin(object):
def __init__(self, allow_none=True, compat=False):
def __init__(self, allow_none=True):
environment = self.options.get('environment')
if environment:
if '=' in environment:
self._environ = env = {}
if compat: # for slapos.recipe.cmmi
environment_section = self.options.get('environment-section')
if environment_section:
compat = set(env)
compat = ()
for line in environment.splitlines():
line = line.strip()
if line:
......@@ -64,9 +57,6 @@ class EnvironMixin(object):
raise UserError('Line %r in environment is incorrect' % line)
k = k.rstrip()
if k in env:
if k in compat:
raise UserError('Key %r is repeated' % k)
env[k] = v.lstrip()
......@@ -53,7 +53,7 @@ class Recipe(EnvironMixin):
options['location'] = \
options['target'] = shared.location
EnvironMixin.__init__(self, True, True)
EnvironMixin.__init__(self, True)
def install(self):
return self._shared.install(self._install)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment