Hi Alex,

So problem starts at sstate.bbclass:406 (sstate_install(ss, d)), this should be running after the next for loop (for plain in ss['plaindirs']:).

Having this fixed, jumping to the buildhistory.bbclass:602, find should be out of the loop to give an hard error if it misses.
Then inside the for loop, while checking if output folder exists (buildhistory.bbclass:607), this doesnt make sense to me the way it is running:
 - the comment refers "Make sure the output folder exists...", but we are not creating it if we need, just skipping if doesnt exists.
 - this folder is being created on do_packagedata (buildhistory.bbclass:396) to write down latest file.
 
So before spending more time on this topic i have a few questions to understand a little bit of what should be the strategy to fix this:

- If we want to keep files-in-package.txt being created on do_package, shouldnt `buildhistory_list_pkg_files()` (buildhistory.bbclass:600) be responsible to create the folder on buildhistory side?
- If we keep `buildhistory_list_pkg_files` being triggered by do_package is there any case of do_package_setscene trigger this? I couldnt find any case to support this option (buildhistory.bbclass:101).
- If not we dont need in fact to create files-in-package.txt on do_package, should files-in-package.txt creation be moved to do_packagedata?

Thanks,

Pedro