← Back to issue list

kernel plugin: don't assume /lib/firmware is present if !kernel-with-firmware

View original Github issue

Metadata

Project
snapcraft
Number
#1750
Type
pull request
State
merged
Author
piso77
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #1750 (commit 2d16ac3c0), skipping /lib/firmware handling when kernel-with-firmware is false and fixing LP #1733564.

Resolution: closed resolved

Reason: The merged change makes the kernel plugin respect kernel-with-firmware: false instead of accessing a missing /lib/firmware directory.

Evaluated by: mr-cal-bot

No scores available.

Issue body

In case of 'kernel-with-firmware: false', don't assume /lib/firmware is present, and avoid referencing it later on. snapcraft.yaml: ... kernel-with-firmware: false Traceback (most recent call last): File "/usr/lib/python3.5/shutil.py", line 538, in move os.rename(src, real_dst) FileNotFoundError: [Errno 2] No such file or directory: '/home/flag/canonical/linux/snap/parts/kernel/install/lib/firmware' -> '/home/flag/canonical/lin ux/snap/parts/kernel/install/firmware' During handling of the above exception, another exception occurred: Traceback (most recent call last): [4/9271] File "/home/flag/canonical/snapcraft/bin/snapcraft", line 36, in obj=dict(project=snapcraft.ProjectOptions())) File "/usr/lib/python3/dist-packages/click/core.py", line 716, in call return self.main(*args, **kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 696, in main rv = self.invoke(ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 1037, in invoke return Command.invoke(self, ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 889, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3/dist-packages/click/core.py", line 534, in invoke return callback(*args, **kwargs) File "/usr/lib/python3/dist-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), *args, **kwargs) File "/home/flag/canonical/snapcraft/snapcraft/cli/init.py", line 124, in run ctx.forward(lifecyclecli.commands['snap']) File "/usr/lib/python3/dist-packages/click/core.py", line 552, in forward return self.invoke(cmd, **kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 534, in invoke return callback(*args, **kwargs) File "/home/flag/canonical/snapcraft/snapcraft/cli/lifecycle.py", line 140, in snap project_options, directory=directory, output=output) File "/home/flag/canonical/snapcraft/snapcraft/internal/lifecycle/_packer.py", line 45, in snap execute('prime', project_options) File "/home/flag/canonical/snapcraft/snapcraft/internal/lifecycle/_runner.py", line 80, in execute _Executor(config, project_options).run(step, part_names) File "/home/flag/canonical/snapcraft/snapcraft/internal/lifecycle/_runner.py", line 175, in run self._run_step(step, part, part_names) File "/home/flag/canonical/snapcraft/snapcraft/internal/lifecycle/_runner.py", line 212, in _run_step getattr(part, step)() File "/home/flag/canonical/snapcraft/snapcraft/internal/pluginhandler/init.py", line 330, in build self.plugin.build() File "/home/flag/canonical/snapcraft/snapcraft/plugins/kbuild.py", line 258, in build self.do_install() File "/home/flag/canonical/snapcraft/snapcraft/plugins/kernel.py", line 479, in do_install os.path.join(self.installdir, 'lib', 'firmware'), self.installdir) File "/usr/lib/python3.5/shutil.py", line 552, in move copy_function(src, real_dst) File "/usr/lib/python3.5/shutil.py", line 251, in copy2 copyfile(src, dst, follow_symlinks=follow_symlinks) File "/usr/lib/python3.5/shutil.py", line 114, in copyfile with open(src, 'rb') as fsrc: FileNotFoundError: [Errno 2] No such file or directory: '/home/flag/canonical/linux/snap/parts/kernel/install/lib/firmware' Signed-off-by: Paolo Pisati paolo.pisati@canonical.com https://bugs.launchpad.net/snapcraft/+bug/1733564 -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #1750 (commit 2d16ac3c0), skipping /lib/firmware handling when kernel-with-firmware is false and fixing LP #1733564.
stealth/space-bunny-alpha — closed resolved Merged the kernel plugin fix to skip /lib/firmware operations when kernel-with-firmware is disabled, preventing the missing-directory build failure (LP #1733564).
qwen/qwen3.6-35b-a3b — — Merged fix resolving a FileNotFoundError in the kernel plugin when kernel-with-firmware is disabled. The code now conditionally skips referencing /lib/firmware, preventing build failures.
qwen3.6-35b-a3b-mtp-q6 — — Merged a fix resolving a FileNotFoundError in the kernel plugin when kernel-with-firmware is disabled. The change prevents assuming /lib/firmware exists, avoiding build failures. Resolved after maintainer review.

Update history

No update history recorded yet.

Related work

Related issues

Issue Project State Summary Similarity
#1748 kernel plugin: don't assume /lib/firmware is present if !kernel-with-firmware snapcraft closed PR #1748 (kernel plugin /lib/firmware hotfix, LP #1733564) was closed as superseded by canonical/snapcraft#1750, merged as commit 2d16ac3c0 to skip /lib/firmware handling when kernel-with-firmware is false.
92%
#1733564 kernel: If 'kernel-with-firmware: false', don't assume /lib/firmware is present snapcraft (launchpad) closed Kernel plugin crashed with FileNotFoundError when kernel-with-firmware was false; fixed by snapcore/snapcraft PR #1750 (commit 2d16ac3c0) which made the plugin skip /lib/firmware handling when firmware is disabled.
79%