Commit bae5d20
committed
CI: install templates for windows-plain-qemu
The first windows-plain-qemu run failed at create time with:
fatal: template "_images/ubuntu.yaml" not found
templates/default.yaml uses `base: template:_images/ubuntu` and
`base: template:_default/mounts`, which Lima resolves via
<prefix>/share/lima/templates/. Existing windows-qemu populates that
directory by running `make`, whose TEMPLATES target does `cp -aL` of
templates/ into _output/share/lima/templates/. windows-plain-qemu
deliberately avoids `make` (so the build does not require MSYS2 make
or bash), so the destination directory was empty and Lima could not
find the base templates.
Replicate the install in PowerShell. Recursive Copy-Item handles the
plain files. The wrinkle is that templates/_images/<distro>.yaml and
templates/<distro>.yaml are tracked as git symlinks (mode 120000),
which Windows checks out as 17-byte plaintext stubs containing the
target filename because core.symlinks defaults to false. We detect
them via `git ls-tree`, follow the chain (opensuse.yaml ->
opensuse-leap.yaml -> opensuse-leap-16.yaml is the deepest current
chain), and overwrite the stub with the resolved file's contents.
windows-plain-wsl2 does not need this; it uses
templates/experimental/wsl2.yaml which has a self-contained images:
section and no base: references.
Signed-off-by: Jan Dubois <jan.dubois@suse.com>1 parent 1218a5d commit bae5d20
1 file changed
Lines changed: 50 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 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 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
492 | 542 | | |
493 | 543 | | |
494 | 544 | | |
| |||
0 commit comments