summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2018-09-03 20:16:37 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2018-09-03 20:16:37 (GMT)
commitcc59d05aaec8e1c3f9bc6ba0d7ff93cd8183e16c (patch)
treec08c8be0f51d05f61bf84239bbe4fb396cb49e12
parenta73fbda28c1165e66aea28d083c93b9810767df8 (diff)
downloadeobuilder-cc59d05aaec8e1c3f9bc6ba0d7ff93cd8183e16c.zip
eobuilder-cc59d05aaec8e1c3f9bc6ba0d7ff93cd8183e16c.tar.gz
eobuilder-cc59d05aaec8e1c3f9bc6ba0d7ff93cd8183e16c.tar.bz2
fix settings jessie,stretch as default for distribution option (#26056)
-rw-r--r--eobuilder/cmdline.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/eobuilder/cmdline.py b/eobuilder/cmdline.py
index 8451d1a..4f16353 100644
--- a/eobuilder/cmdline.py
+++ b/eobuilder/cmdline.py
@@ -16,8 +16,10 @@ class MultipleOption(Option):
def take_action(self, action, dest, opt, value, values, parser):
if action == "extend":
- lvalue = value.split(",")
- values.ensure_value(dest, []).extend(lvalue)
+ values_list = values.ensure_value(dest, [])
+ for lvalue in value.split(','):
+ if not lvalue in values_list:
+ values_list.append(lvalue)
else:
Option.take_action(
self, action, dest, opt, value, values, parser)
@@ -34,7 +36,7 @@ def parse_cmdline():
parser.add_option("-d", "--distribution",
action="extend", type="string",
dest="distrib", metavar='DISTRIBUTIONS',
- default='jessie,stretch',
+ default=[],
help="DISTRIBUTIONS: stretch, jessie, wheezy and / or squeeze")
parser.add_option("-f", "--force", action="store_true",
dest="force", default=False,
@@ -72,7 +74,7 @@ def parse_cmdline():
parser.error("you shouldn't use argument when cleaning")
if len(args) and not options.distrib:
- parser.error("you should set option --distribution")
+ options.distrib = ['jessie', 'stretch']
if options.repositories:
for r in options.repositories: