Skip to content

Commit

Permalink
kernel-install: fix move of cpio output file
Browse files Browse the repository at this point in the history
Its name is already `initrd` since 6b0dfe5

Otherwise:

```
‣  /tmp/tmpgpvfc6y8/initrd.cpio.zst size is 44.9M, consumes 44.9M.
‣ Copying /tmp/tmpgpvfc6y8/initrd to /tmp/kernel-install.staging.KXnXSC/initrd
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/mkosi/run.py", line 64, in uncaught_exception_handler
    yield
  File "/usr/lib64/python3.11/contextlib.py", line 81, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/kernel/install.d/50-mkosi.install", line 167, in main
    shutil.move(next(context.staging_area.glob("initrd*.cpio*")), context.staging_area / "initrd")
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration
/usr/lib/kernel/install.d/50-mkosi.install failed with exit status 1.
```
  • Loading branch information
aafeijoo-suse authored and DaanDeMeyer committed Oct 25, 2024
1 parent 86b9b36 commit b08479e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions kernel-install/50-mkosi.install
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import argparse
import dataclasses
import logging
import os
import shutil
import tempfile
from pathlib import Path
from typing import Optional
Expand Down Expand Up @@ -164,7 +163,6 @@ def main() -> None:
(context.staging_area / output).unlink()

if format == OutputFormat.cpio:
shutil.move(next(context.staging_area.glob("initrd*.cpio*")), context.staging_area / "initrd")
build_microcode_initrd(context.staging_area / "microcode")
else:
(context.staging_area / f"{output}.vmlinuz").unlink()
Expand Down

0 comments on commit b08479e

Please sign in to comment.