I'm willing to take a shot at a patch for this, but wanted to see if someone else had already been working on this.
eclean-kernel -n 3 makes a list of the 3 most recent versions to preserve.
eclean-kernel -N 3 could make a list of kernel versions X.Y.Z where X and Y are fixed and Z is maximized.
eclean-kernel -n3 -N3 could make both lists and preserve any kernel which is a member of either set.
For example, say you have the following kernels on disk: 5.11.16, 5.11.15, 5.11.14, 5.11.13, 5.11.12, 5.10.16, 5.10.15, 5.10.10, 5.9.14, 5.9.12, 4.20.5 (a subset of my actual current situation)
-n3 would remove all but 5.11.16, 5.11.15, 5.11.14
-N3 would remove all but 5.11.16, 5.10.16, 5.9.14
-n3 -N3 would remove all but 5.11.16, 5.11.15, 5.11.14, 5.10.16, 5.9.14
I've taken a couple stabs at this, but the argument proposal is not straightforward to plumb into the VersionSort implementation and I'm not satisfied with the results of it. Plus I write terrible python.
I'm willing to take a shot at a patch for this, but wanted to see if someone else had already been working on this.
eclean-kernel -n 3
makes a list of the 3 most recent versions to preserve.eclean-kernel -N 3
could make a list of kernel versions X.Y.Z where X and Y are fixed and Z is maximized.eclean-kernel -n3 -N3
could make both lists and preserve any kernel which is a member of either set.For example, say you have the following kernels on disk: 5.11.16, 5.11.15, 5.11.14, 5.11.13, 5.11.12, 5.10.16, 5.10.15, 5.10.10, 5.9.14, 5.9.12, 4.20.5 (a subset of my actual current situation)
-n3
would remove all but 5.11.16, 5.11.15, 5.11.14-N3
would remove all but 5.11.16, 5.10.16, 5.9.14-n3 -N3
would remove all but 5.11.16, 5.11.15, 5.11.14, 5.10.16, 5.9.14Thoughts?