Sometimes certain config options are removed in new kernels, so when
annotations is updated these options result to be undefined across all
architectures and flavours, in this case it's much more clean to simply
drop them from annotations (considering that the kernel doesn't support
them anymore).
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
for flavour in self.config[conf]['policy'].copy():
if flavour not in list(set(self.arch + self.flavour)):
del self.config[conf]['policy'][flavour]
+ # Remove configs that are all undefined across all arches/flavours
+ if 'policy' in self.config[conf]:
+ if list(set(self.config[conf]['policy'].values())) == ['-']:
+ self.config[conf]['policy'] = {}
# Drop empty rules
if not self.config[conf]['policy']:
del self.config[conf]