Commit eee1e67
composefs/bls: Properly reuse kernel + initrd duplicates
Function `find_vmlinuz_initrd_duplicates` returns all the deployment ids
that match the current deployment's kernel + initrd SHA256 sum, but only
would actually exist on disk, every other deployment's BLS Config would
simply be pointing to one single directory.
We were incorrectly picking the first entry out of the returned list,
which might or might not exist as an actual directory containing the
kernel.
Fix the bug by iterating over all directory entries in `/boot` or
`/EFI/Linux` and checking if the deployment id in the list actually
exists on the disk or not
Signed-off-by: Pragyan Poudyal <[email protected]>1 parent 3ad82d0 commit eee1e67
1 file changed
+38
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
508 | | - | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
509 | 536 | | |
510 | 537 | | |
511 | 538 | | |
512 | 539 | | |
513 | 540 | | |
514 | 541 | | |
515 | 542 | | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
520 | 552 | | |
521 | 553 | | |
522 | 554 | | |
| |||
0 commit comments