The nmap snap with base:core22 builds fine on snapcraft 7.01(candidate), and it’s actually published on edge already. However, successive local builds fail while processing the icon:
$ snapcraft clean
Removed instance: snapcraft-nmap-1707314
$ snapcraft pack
Launching instance...
Installed package repositories
Executed: pull nmap
Executed: overlay nmap
Copying needed target link from the system: /usr/sbin/rmt-tar
Executed: build nmap
Executed: stage nmap
Executed: prime nmap
Executed parts lifecycle
Generated snap metadata
Created snap package
$ snapcraft pack
Launching instance...
Installed package repositories
Executed: skip pull nmap (already ran)
Executed: skip overlay nmap (already ran)
Executed: skip build nmap (already ran)
Executed: skip stage nmap (already ran)
Executed: skip prime nmap (already ran)
Executed parts lifecycle
Copying snap assets...
Traceback (most recent call last):
File "/snap/snapcraft/x1/bin/snapcraft", line 8, in <module>
sys.exit(run())
File "/snap/snapcraft/x1/lib/python3.8/site-packages/snapcraft/cli.py", line 161, in run
dispatcher.run()
File "/snap/snapcraft/x1/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/x1/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 206, in run
super().run(parsed_args)
File "/snap/snapcraft/x1/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 82, in run
parts_lifecycle.run(self.name, parsed_args)
File "/snap/snapcraft/x1/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 150, in run
_run_command(
File "/snap/snapcraft/x1/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 242, in _run_command
setup_assets(
File "/snap/snapcraft/x1/lib/python3.8/site-packages/snapcraft/parts/setup_assets.py", line 73, in setup_assets
icon_path = _finalize_icon(
File "/snap/snapcraft/x1/lib/python3.8/site-packages/snapcraft/parts/setup_assets.py", line 136, in _finalize_icon
shutil.copy(source_path, target_icon_path)
File "/snap/snapcraft/x1/usr/lib/python3.8/shutil.py", line 418, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/snap/snapcraft/x1/usr/lib/python3.8/shutil.py", line 244, in copyfile
raise SameFileError("{!r} and {!r} are the same file".format(src, dst))
shutil.SameFileError: PosixPath('/root/prime/meta/gui/icon.png') and PosixPath('/root/prime/meta/gui/icon.png') are the same file
Failed to execute pack in instance.
Full execution log: '/home/user/.cache/snapcraft/log/snapcraft-20220527-114837.279122.log'
$
@mchinoune, thanks for finding this. core22 is including the dependencies of libpng16-16, which is causing some directory conflicts. I’m not aware of any workaround right now, let me get back to you with a solution.
@zyga, good catch, thanks. It’s not clear in the migration guide or documentation that adapter has been deprecated for core22.
The adapter: key and the runner script are gone (and should have left some kind of explanatory message), but the functionality is still there. The migration guide should cover the details on how to override the variables.
I have removed that dependency as a workaround (since gl2ps is just a part, and libpng16-16 is already a dependency of the app), but still get the same error.
Note that I start getting this message when building gl2ps that I don’t see with snapcraft 6.1:
This is a debug message from the parts processing library and shouldn’t appear to Snapcraft users in non-debug modes (@facundobatista, I believe this is another issue to address in craft-cli).