Snapraft filebug error when building Wekan snap

https://launchpadlibrarian.net/460192406/buildlog_snap_ubuntu_xenial_amd64_wekan-devel_BUILDING.txt.gz

well, your error is:

IsADirectoryError: [Errno 21] Is a directory: '/build/wekan/stage/bin'

does that directory exists if you do a local build ?

Yes it exists.

When building locally, error is:

Staging caddy 
Staging helpers 
Staging mongodb 
Sorry, an error occurred in Snapcraft:
[Errno 21] Is a directory: '/home/wekan/repos/wekan/stage/bin'
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]:

And there is this directory:

root@xenial:/home/wekan/repos/wekan# ls stage/bin
caddy          mongodb-backup   wekan-control
caddy-control  mongodb-control  wekan-help
config         mongodb-restore  wekan-read-settings

I did add this to snapcraft.yaml to make sure that directory exists:

mkdir -p stage/bin

But I still get the same error. How can I fix it ?

well, you did put it into the override-build statement, but at that point you are in the <tree>/parts/wekan/build directory so your mkdir creates parts/wekan/build/stage/bin … what you want instead is to have it created in the parts/wekan/install dir that later gets copied into the stage dir like below:

mkdir -p $SNAPCRFT_PART_INSTALL/bin

@ogra

Where in snapcraft.yaml I should add it? I still get the same error.

you should replace the other mkdir with it …

Can you add complete snapcraft.yaml how I would fix this, please?
I have been trying to fix Snap build for 5 days.

I removed extra comment lines from snapcraft.yaml .

With this, I get errors that directory exists:

mkdir -p $SNAPCRFT_PART_INSTALL/bin

And if I instead try to delete that directory, I get error cp not found

rm -rf $SNAPCRFT_PART_INSTALL/bin

https://launchpad.net/~wekan-team/+snap/wekan-devel/+build/795555/+files/buildlog_snap_ubuntu_xenial_amd64_wekan-devel_BUILDING.txt.gz