conf: fix subtle bug in rust2rpm.conf validation

The "default" feature is always implicitly defined, even if not
explicitly listed in the crate metadata, so it's always valid.
This commit is contained in:
Fabio Valentini 2023-04-03 00:05:21 +02:00
parent 1fdcc4a2a0
commit e3c2ef7dda
No known key found for this signature in database
GPG key ID: 5AC5F572E5D410AF

View file

@ -97,6 +97,8 @@ class Rust2RpmConf:
] ]
for feature in features: for feature in features:
valid_keys.append(f"lib+{feature}.requires") valid_keys.append(f"lib+{feature}.requires")
if "default" not in features:
valid_keys.append(f"lib+default.requires")
# check section names # check section names
for section in conf.keys(): for section in conf.keys():