Hello Pedro,

is it possible to separate all needed changes into a set of nice,
small, simple, easy to review commits? That would go a long way
towards fixing all issues. I don't have a hard opinion on the best way
to fix this, I just want to ensure there are no mysteries in what is
happening, and the fixing isn't in the form of gigantic, invasive,
single commit. If you need to move code *and* change what it does,
move in one commit, change in another, for example.

buildhistory is an old class, has been worked on by many people over
the years, and the original author (Paul Eggleton) isn't involved in
yocto any longer unfortunately. So the fixes may have been done to
resolve 'pressing problems' rather than with long term quality of the
code in mind.

Also note there are selftests for it:
alex@Zen2:/srv/storage/alex/yocto/build-64-alt$ oe-selftest -l|grep -i
buildhistory
2024-05-24 10:06:56,818 - oe-selftest - INFO -
buildoptions.BuildhistoryTests.test_buildhistory_basic
2024-05-24 10:06:56,818 - oe-selftest - INFO -
buildoptions.BuildhistoryTests.test_buildhistory_buildtime_pr_backwards
2024-05-24 10:06:56,818 - oe-selftest - INFO -
buildoptions.BuildhistoryTests.test_fileinfo
2024-05-24 10:06:56,830 - oe-selftest - INFO -
oelib.buildhistory.TestBlobParsing.test_blob_to_dict
2024-05-24 10:06:56,830 - oe-selftest - INFO -
oelib.buildhistory.TestBlobParsing.test_compare_dict_blobs
2024-05-24 10:06:56,830 - oe-selftest - INFO -
oelib.buildhistory.TestBlobParsing.test_compare_dict_blobs_default
2024-05-24 10:06:56,831 - oe-selftest - INFO -
oelib.buildhistory.TestFileListCompare.test_compare_file_lists
2024-05-24 10:06:56,832 - oe-selftest - INFO -
oescripts.BuildhistoryDiffTests.test_buildhistory_diff

So if you make sure they continue to pass, that'd be good. If you can
add to them, that's better.


Alex



On Thu, 23 May 2024 at 17:24, pmi183 via lists.openembedded.org
<[email protected]> wrote:
>
> [Edited Message Follows]
>
> 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 a 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
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#199833): 
https://lists.openembedded.org/g/openembedded-core/message/199833
Mute This Topic: https://lists.openembedded.org/mt/87258776/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to