gluon/package/gluon-autoupdater/check_site.lua
Matthias Schiffer d82ffb4f81
gluon-autoupdater: make site.conf branch setting optional
Default to the alphabetically smallest branch if none is set in
site.conf.

Also prevent enabling the autoupdater when no branches exist.
2020-08-15 16:36:27 +02:00

12 lines
489 B
Lua

need_string(in_site({'autoupdater', 'branch'}), false)
need_table({'autoupdater', 'branches'}, function(branch)
need_alphanumeric_key(branch)
need_string(in_site(extend(branch, {'name'})))
need_string_array_match(extend(branch, {'mirrors'}), '^http://')
need_number(in_site(extend(branch, {'good_signatures'})))
need_string_array_match(in_site(extend(branch, {'pubkeys'})), '^%x+$')
obsolete(in_site(extend(branch, {'probability'})), 'Use GLUON_PRIORITY in site.mk instead.')
end)