Code review comment for lp:~rbalint/update-manager/remove-autoremovable-kernels

Revision history for this message
Balint Reczey (rbalint) wrote :

> joining the regular expressions with | might fail in case they themselves
> contain | (or one of them is invalid).

Any of them being invalid would be either an apt bug or an error in system configuration which we can't protect against here.
Having | without parentheses in the APT::VersionedKernelPackages regexps also sounds broken in itself that would make it an apt bug again.
Do you think this code would break on non-buggy APT::VersionedKernelPackages regexps?
I can add parentheses like (^...)|(^...) but that does not seem to be needed.

I'd like to avoid multiple matching to keep matching fast.

« Back to merge proposal