Make sure that dir path exists before attempting to copy file
Since yesterday android builds on gitlab CI for Kasts are failing with this stacktrace:
Scanning dependencies of target create-fastlane
Traceback (most recent call last):
File "/opt/nativetooling/share/ECM/toolchain/generate-fastlane-metadata.py", line 424, in <module>
scanSourceDir()
File "/opt/nativetooling/share/ECM/toolchain/generate-fastlane-metadata.py", line 400, in scanSourceDir
processAppstreamFile(appdataFile, desktopFile, iconBaseName)
File "/opt/nativetooling/share/ECM/toolchain/generate-fastlane-metadata.py", line 354, in processAppstreamFile
findIcon(applicationName, iconBaseName)
File "/opt/nativetooling/share/ECM/toolchain/generate-fastlane-metadata.py", line 232, in findIcon
shutil.copy(icon, iconPath)
File "/usr/lib/python3.8/shutil.py", line 415, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib/python3.8/shutil.py", line 261, in copyfile
with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/build-arm/kasts/fastlane/metadata/org.kde.kasts/en-US/images/icon.png'
make[3]: *** [CMakeFiles/create-fastlane.dir/build.make:76: CMakeFiles/create-fastlane] Error 1
make[2]: *** [CMakeFiles/Makefile2:123: CMakeFiles/create-fastlane.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:184: CMakeFiles/create-apk.dir/rule] Error 2
make: *** [Makefile:220: create-apk] Error 2
This seems to be caused by trying to copy the *-playstore.png file into a dirpath that doesn't exist yet.
Edited by Bart De Vries