kernel: add dependency of initramfs-tools for linux-image package#9727
kernel: add dependency of initramfs-tools for linux-image package#9727amazingfate merged 1 commit intoarmbian:mainfrom
Conversation
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
lib/functions/compilation/kernel-debs.sh (1)
268-268: Consider allowinglinux-initramfs-toolas an alternative provider.Debian's stock
linux-image-*packages declare the dependency asinitramfs-tools | linux-initramfs-toolso dracut (whichProvides: linux-initramfs-tool) can be substituted as the initramfs generator. The hook scheme in this very file already accommodates that — see the comment on line 279: "recent versions of dracut and initramfs-tools will obey this" via$INITRD. Hard-pinning toinitramfs-toolshere forecloses dracut-based setups even though the postinst hooks already work with both.This still satisfies the PR's motivation (live-build's single-shot apt install will pull in
initramfs-toolswhen nothing else provideslinux-initramfs-tool).♻️ Proposed change
- Depends: initramfs-tools + Depends: initramfs-tools | linux-initramfs-tool🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@lib/functions/compilation/kernel-debs.sh` at line 268, Replace the hard dependency on initramfs-tools with a disjunctive dependency to allow alternative providers: update the package dependency line that currently reads "Depends: initramfs-tools" to include "linux-initramfs-tool" as an alternative (e.g., "Depends: initramfs-tools | linux-initramfs-tool"); ensure the postinst/postrm hook behavior that uses the INITRD variable and the existing dracut compatibility comments remains unchanged so dracut (which Provides: linux-initramfs-tool) can satisfy the dependency.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@lib/functions/compilation/kernel-debs.sh`:
- Line 268: Replace the hard dependency on initramfs-tools with a disjunctive
dependency to allow alternative providers: update the package dependency line
that currently reads "Depends: initramfs-tools" to include
"linux-initramfs-tool" as an alternative (e.g., "Depends: initramfs-tools |
linux-initramfs-tool"); ensure the postinst/postrm hook behavior that uses the
INITRD variable and the existing dracut compatibility comments remains unchanged
so dracut (which Provides: linux-initramfs-tool) can satisfy the dependency.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 81966e49-7f88-440e-acb2-5f9750e2d0d9
📒 Files selected for processing (1)
lib/functions/compilation/kernel-debs.sh
|
✅ This PR has been reviewed and approved — all set for merge! |
Description
I'm trying to build an iso with armbian's kernel by live-build script: https://salsa.debian.org/live-team/live-build/-/blob/master/test/rebuild.sh?ref_type=heads, while the script is installing kernel and initramfs in a single apt command, and it would fall if kernel doesn't depend on initramfs. initramfs has to be configured before kernel image package.
Summary by CodeRabbit