Ansgar pushed to branch master at Debian FTP Team / dak
Commits:
-
7d588bc4
by Niels Thykier at 2019-07-09T05:15:02Z
-
d120dc28
by Niels Thykier at 2019-07-09T05:15:02Z
-
126be816
by Niels Thykier at 2019-07-09T18:39:51Z
-
d7398c20
by Ansgar Burchardt at 2019-07-09T19:06:39Z
3 changed files:
Changes:
... | ... | @@ -21,17 +21,9 @@ trigger_wb() { |
21 | 21 |
local send=
|
22 | 22 |
|
23 | 23 |
case "${dist}" in
|
24 |
- oldoldstable)
|
|
25 |
- send=jessie
|
|
26 |
- ;;
|
|
27 |
- oldstable)
|
|
28 |
- send=stretch
|
|
29 |
- ;;
|
|
30 |
- stable)
|
|
31 |
- send=buster
|
|
32 |
- ;;
|
|
33 |
- testing-security)
|
|
34 |
- send=bullseye
|
|
24 |
+ oldoldstable|oldstable|stable|testing-security)
|
|
25 |
+ send=$(dak admin suite-config get-value "${dist}" codename)
|
|
26 |
+ send=${send%-security}
|
|
35 | 27 |
;;
|
36 | 28 |
*)
|
37 | 29 |
send=unknown
|
... | ... | @@ -11,10 +11,9 @@ function fix_overrides() { |
11 | 11 |
|
12 | 12 |
for suite in oldoldstable oldstable stable testing; do
|
13 | 13 |
case $suite in
|
14 |
- oldoldstable) override_suite=jessie ;;
|
|
15 |
- oldstable) override_suite=stretch ;;
|
|
16 |
- stable) override_suite=buster ;;
|
|
17 |
- testing) override_suite=bullseye ;;
|
|
14 |
+ oldoldstable|oldstable|stable|testing)
|
|
15 |
+ override_suite=$(dak admin suite-config get-value "${suite}" codename)
|
|
16 |
+ ;;
|
|
18 | 17 |
*) echo "Unknown suite type ($suite)"; exit 1;;
|
19 | 18 |
esac
|
20 | 19 |
for component in $components; do
|
... | ... | @@ -737,6 +737,7 @@ ALLOWED_SUITE_CONFIGS = { |
737 | 737 |
'changelog_url': str,
|
738 | 738 |
# TODO: Create a validator/parser for this
|
739 | 739 |
'checksums': SUITE_CONFIG_READ_ONLY,
|
740 |
+ 'codename': SUITE_CONFIG_READ_ONLY,
|
|
740 | 741 |
'description': str,
|
741 | 742 |
'include_long_description': utils.parse_boolean_from_user,
|
742 | 743 |
'indices_compression': SUITE_CONFIG_READ_ONLY,
|
... | ... | @@ -746,12 +747,13 @@ ALLOWED_SUITE_CONFIGS = { |
746 | 747 |
'origin': str,
|
747 | 748 |
'priority': int,
|
748 | 749 |
'signingkeys': SUITE_CONFIG_READ_ONLY,
|
750 |
+ 'suite_name': SUITE_CONFIG_READ_ONLY,
|
|
749 | 751 |
'untouchable': utils.parse_boolean_from_user,
|
750 | 752 |
'validtime': int,
|
751 | 753 |
}
|
752 | 754 |
|
753 | 755 |
|
754 |
-def __suite_config_get(d, args):
|
|
756 |
+def __suite_config_get(d, args, direct_value=False):
|
|
755 | 757 |
die_arglen(args, 4, "E: suite-config get needs the name of a configuration")
|
756 | 758 |
session = d.session()
|
757 | 759 |
suite_name = args[2]
|
... | ... | @@ -760,7 +762,10 @@ def __suite_config_get(d, args): |
760 | 762 |
if arg not in ALLOWED_SUITE_CONFIGS:
|
761 | 763 |
die("Unknown (or unsupported) suite configuration variable")
|
762 | 764 |
value = getattr(suite, arg)
|
763 |
- print("%s=%s" % (arg, value))
|
|
765 |
+ if direct_value:
|
|
766 |
+ print(value)
|
|
767 |
+ else:
|
|
768 |
+ print("%s=%s" % (arg, value))
|
|
764 | 769 |
|
765 | 770 |
|
766 | 771 |
def __suite_config_set(d, args):
|
... | ... | @@ -823,8 +828,13 @@ def suite_config(command): |
823 | 828 |
die_arglen(args, 2, "E: suite-config needs a command")
|
824 | 829 |
mode = args[1].lower()
|
825 | 830 |
|
826 |
- if mode == 'get':
|
|
827 |
- __suite_config_get(d, args)
|
|
831 |
+ if mode in {'get', 'get-value'}:
|
|
832 |
+ direct_value = False
|
|
833 |
+ if mode == 'get-value':
|
|
834 |
+ direct_value = True
|
|
835 |
+ if len(args) > 4:
|
|
836 |
+ die("E: get-value must receive exactly one key to lookup")
|
|
837 |
+ __suite_config_get(d, args, direct_value=direct_value)
|
|
828 | 838 |
elif mode == 'set':
|
829 | 839 |
__suite_config_set(d, args)
|
830 | 840 |
elif mode == 'list':
|