Thanks. This helps clarify somewhat but it still doesn’t seem to work. If I’m interpreting you correctly I likely don’t need to specify a base: core18
in my yaml file since the Dockerfile sets all of that up. However when I remove this requirement and use base: bare
I get the exact same error. If I remove base:
entirely I get a parsing error (makes sense I guess).
This is a standard snapcraft.yaml file that works just fine locally so I doubt the issue is with that.
EDIT: Here’s the backtrace of the error mentioned previously. I haven’t changed anything in the dockerfile and am following the instructions verbatim. But first, of particular interest is this excerpt from the backtrace:
raise errors.LegacyFallback("base is not core22")
snapcraft.errors.LegacyFallback: base is not core22
Why would it complain of this?
+ snapcraftctl pull
Sorry, an error occurred in Snapcraft:
[Errno 22] Invalid argument: '/sys/kernel/mm/page_idle/bitmap' -> '/build/parts/one/src/sys/kernel/mm/page_idle/bitmap'
We would appreciate it if you anonymously reported this issue.
No other data than the traceback and the version of snapcraft in use will be sent.
Would you like to send this error data? (Yes/No/Always/View) [no]: View
Traceback (most recent call last):
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/cli.py", line 161, in run
dispatcher.run()
File "/snap/snapcraft/current/lib/python3.8/site-packages/craft_cli/dispatcher.py", line 406, in run
return self._loaded_command.run(self._parsed_command_args)
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 206, in run
super().run(parsed_args)
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 82, in run
parts_lifecycle.run(self.name, parsed_args)
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 134, in run
yaml_data = process_yaml(snap_project.project_file)
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 85, in process_yaml
yaml_data = yaml_utils.load(yaml_file)
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/parts/yaml_utils.py", line 92, in load
raise errors.LegacyFallback("base is not core22")
snapcraft.errors.LegacyFallback: base is not core22
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft_legacy/file_utils.py", line 102, in link_or_copy
link(source, destination, follow_symlinks=follow_symlinks)
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft_legacy/file_utils.py", line 136, in link
os.link(source_path, destination, follow_symlinks=False)
OSError: [Errno 18] Invalid cross-device link: '/sys/kernel/mm/page_idle/bitmap' -> '/build/parts/one/src/sys/kernel/mm/page_idle/bitmap'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/snap/snapcraft/current/bin/snapcraft", line 8, in <module>
sys.exit(run())
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft/cli.py", line 185, in run
legacy.legacy_run()
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft_legacy/cli/legacy.py", line 25, in legacy_run
run()
File "/snap/snapcraft/current/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/snap/snapcraft/current/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/snap/snapcraft/current/lib/python3.8/site-packages/click/core.py", line 1635, in invoke
rv = super().invoke(ctx)
File "/snap/snapcraft/current/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/snap/snapcraft/current/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/snap/snapcraft/current/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft_legacy/cli/_runner.py", line 130, in run
snap_command.invoke(ctx)
File "/snap/snapcraft/current/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/snap/snapcraft/current/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft_legacy/cli/lifecycle.py", line 387, in snap
_execute(steps.PRIME, parts=tuple(), pack_project=True, output=output, **kwargs)
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft_legacy/cli/lifecycle.py", line 102, in _execute
lifecycle.execute(step, project_config, parts)
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft_legacy/internal/lifecycle/_runner.py", line 145, in execute
executor.run(step, part_names)
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft_legacy/internal/lifecycle/_runner.py", line 199, in run
self._handle_step(part_names, part, step, current_step, cli_config)
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft_legacy/internal/lifecycle/_runner.py", line 213, in _handle_step
getattr(self, "_run_{}".format(current_step.name))(part)
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft_legacy/internal/lifecycle/_runner.py", line 255, in _run_pull
self._run_step(step=steps.PULL, part=part, progress="Pulling")
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft_legacy/internal/lifecycle/_runner.py", line 356, in _run_step
getattr(part, step.name)()
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft_legacy/internal/pluginhandler/__init__.py", line 502, in pull
self._do_runner_step(steps.PULL)
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft_legacy/internal/pluginhandler/__init__.py", line 292, in _do_runner_step
return getattr(self._runner, "{}".format(step.name))()
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft_legacy/internal/pluginhandler/_runner.py", line 81, in pull
self._run_scriptlet(
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft_legacy/internal/pluginhandler/_runner.py", line 189, in _run_scriptlet
raise error
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft_legacy/internal/pluginhandler/_runner.py", line 178, in _run_scriptlet
self._handle_builtin_function(
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft_legacy/internal/pluginhandler/_runner.py", line 233, in _handle_builtin_function
function(**function_args)
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft_legacy/internal/pluginhandler/__init__.py", line 522, in _do_pull
self.source_handler.pull()
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft_legacy/internal/sources/_local.py", line 37, in pull
file_utils.link_or_copy_tree(
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft_legacy/file_utils.py", line 245, in link_or_copy_tree
copy_function(source, destination)
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft_legacy/file_utils.py", line 110, in link_or_copy
copy(source, destination, follow_symlinks=follow_symlinks)
File "/snap/snapcraft/current/lib/python3.8/site-packages/snapcraft_legacy/file_utils.py", line 159, in copy
shutil.copy2(source, destination, follow_symlinks=follow_symlinks)
File "/snap/snapcraft/current/usr/lib/python3.8/shutil.py", line 435, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/snap/snapcraft/current/usr/lib/python3.8/shutil.py", line 275, in copyfile
_fastcopy_sendfile(fsrc, fdst)
File "/snap/snapcraft/current/usr/lib/python3.8/shutil.py", line 172, in _fastcopy_sendfile
raise err
File "/snap/snapcraft/current/usr/lib/python3.8/shutil.py", line 152, in _fastcopy_sendfile
sent = os.sendfile(outfd, infd, offset, blocksize)
OSError: [Errno 22] Invalid argument: '/sys/kernel/mm/page_idle/bitmap' -> '/build/parts/one/src/sys/kernel/mm/page_idle/bitmap'
Changing my base
to core22
out of desperation to get anything to work just triggers the following error which seems irrelevant:
Bad snapcraft.yaml content:
- extra field 'filesets' not permitted in 'parts.one' configuration