Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer config.image over config.image_id #2712

Merged
merged 1 commit into from
May 15, 2024

Conversation

NekkoDroid
Copy link
Contributor

As it currently stands, when using multiple images via mkosi.images all the images have the same (output) name if ImageId= is set, which results in all images needing to override the output name as to not clash.

This changes the default output name and the display name of those images to prefer their actual "sub-image" name, while still falling back to the ImageId= for the root image case.

This also somewhat has the sideeffect that it solves the original issue I had in #2566 (but the requested specifier might still be useful, so I'll keep it open for now).

When using `mkosi.images` it makes more sense to use the `image` name,
as that is what identifies the different images.
@behrmann behrmann merged commit 01a6772 into systemd:main May 15, 2024
26 of 32 checks passed
@ragazenta
Copy link
Contributor

This broke my current setup with multiple profiles, I set different ImageId for each profile. Isn't the previous code more correct, prefer specific (image_id) over generic (image)?

My setup
mkosi.images/
├── base
│   ├── mkosi.conf
│   └── mkosi.configure
├── initrd
│   ├── mkosi.conf
│   ├── mkosi.conf.d
│   │   ├── 10-aaa
│   │   │   ├── mkosi.conf
│   │   │   └── mkosi.extra
│   │   └── 20-bbb
│   │       ├── mkosi.conf
│   │       └── mkosi.extra
│   └── mkosi.extra
└── system

This previously produced 3 initrd images, default initrd, initrd-aaa, initrd-bbb. After this commit, produces only 1 which is updated every build (with -f).

@DaanDeMeyer
Copy link
Contributor

No because you might want an initrd, main image and exitrd all with the same image id. @ragazenta Can you switch to Output= by any chance?

@ragazenta
Copy link
Contributor

No because you might want an initrd, main image and exitrd all with the same image id. @ragazenta Can you switch to Output= by any chance?

Ah, I see. Thanks.

@NekkoDroid NekkoDroid deleted the prefer-image-name branch June 4, 2024 14:44
@septatrix
Copy link
Contributor

The docs for Output= still mention the old behaviour for determining the output name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants