You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.
Let's say I create a rules file, 90-myrules.rules, and another rules file, 91-part2.rules. Both have a rule matching my program. The intuitive behavior would be that the rule in 91-part2.rules has highest priority, i.e., is applied last.
However the current behavior is that the first matching rule is applied, and no other rules are applied. The current behavior is not intuitive, and is the opposite of e.g. systemd.
This is caused by the line self.rules[key] = ... inside get_rule_info, which simply inserts the rules in order of discovery into the self.rules dictionary. Later, inside get_tpid_rule, the first matching rule is returned. get_tpid_rule should instead update a result variable and return the last match:
Let's say I create a rules file,
90-myrules.rules
, and another rules file,91-part2.rules
. Both have a rule matching my program. The intuitive behavior would be that the rule in91-part2.rules
has highest priority, i.e., is applied last.However the current behavior is that the first matching rule is applied, and no other rules are applied. The current behavior is not intuitive, and is the opposite of e.g. systemd.
This is caused by the line
self.rules[key] = ...
insideget_rule_info
, which simply inserts the rules in order of discovery into theself.rules
dictionary. Later, insideget_tpid_rule
, the first matching rule isreturn
ed.get_tpid_rule
should instead update aresult
variable and return the last match:The text was updated successfully, but these errors were encountered: