WIP CLEANUP TESTING NEEDED pkg/pkg.mk: use intermediate state files#11553
WIP CLEANUP TESTING NEEDED pkg/pkg.mk: use intermediate state files#11553cladmi wants to merge 11 commits intoRIOT-OS:masterfrom
Conversation
|
This should address the issue shown in #11129 too as The fix for #11129 should have be to only re-do In here, |
|
Fixed the fail because of |
|
After thinking about it more, I think it would be good to add an intermediate Then |
f0e6756 to
dd7271e
Compare
|
This needs a rebase. |
|
I did a quick round of testing and this fixed some issue I had where some packages kept beeing recompiled all the time. Does this still need to be wip? |
|
It was still WIP in my mind but I can do another pass. |
af0baa7 to
8570a6f
Compare
Well, I'm going to start rebasing my branch's on this most of the time now so I'll be testing continuously :). And if you need help let me know, I'm very interested in getting this in. |
|
There are things I should split I guess even if they are done before the real fix like moving |
8570a6f to
2876d4c
Compare
|
One thing that I may need help too, is seeing if other packages must be updated too. This takes a lot of time. |
|
I am also in a place where, either I change the minimal things in a package but keep it in a non reliable state, or I do the work for the migration correctly. |
|
Somehow for the implementation I also have a question. When having a So I do not know, should I do it automatically for |
I can help with this. |
To be honest I got a little confused here with the difference between What is an example of a "minimal package"? |
|
It's all |
|
I am thinking that I should refactor to split the |
|
The minimal one is this one: Lines 1 to 10 in 7d7596e To be consistent, I would move the When adding states, the targets would then all need to depend on Hovewer, if a package needs to do additional steps before compiling, then, these steps would need to depend on But it comes out of nowhere as it was not required for It is a question of balance between, do we make the default simpler but then the different one requiring a lot of new handling, or do we remove the magic and make the dependency explicit in the default case to teach how to handle the more advanced ones. For the first version I could keep the magic to not modify them too much. |
This "ISC License" is the value found by github https://github.com/atomicobject/heatshrink/blob/7d419e1fa4830d0b919b9b6a91fe2fb786cf3280/LICENSE A permissive license lets people do anything with your code with proper attribution and without warranty. The ISC license is functionally equivalent to the BSD 2-Clause and MIT licenses, removing some language that is no longer necessary.
The 'BSD 3-Clause "New" or "Revised" License' is the value found by github https://github.com/openthread/openthread/blob/3a248f649acd16448c7f27fe7f17f6f0bb6696f6/LICENSE > A permissive license similar to the BSD 2-Clause License, but with a 3rd > clause that prohibits others from using the name of the project or its > contributors to promote derived products without written consent.
Ensure the required variables are defined before including 'pkg.mk'.
The file must not change the default goal otherwise it could change packages behavior.
Prepare for handling pkg state with files. So it requires having the path defined before declaring targets.
2876d4c to
617f671
Compare
This should prevent issues where the Makefile use 'PKG_BUILDDIR' before them being defined. This will also allow changing the state targets to be file targets.
Rely on file creation and dependencies instead of .PHONY targets. Files will be rebuilt when changing version as the main `Makefile` will have been updated. All steps are re-done on version change. When deleting patches, the '.prepare' step should be redone thanks to the included 'patch-dep.inc' file (TODO TEST ME). Implementation in order: * '.git': means the repository has been cloned. * '.git-downloaded': Fetches the wanted version * '.git-prepared': will clean checkout the version and apply patches
This should prevent issues when the directory is not a git repository which would for example checkout force or clean in the RIOT repository instead.
617f671 to
14e275f
Compare
|
@cladmi from talking IRL I think you have not pushed some chages :) |
|
@cladmi @fjmolinas Created #13036 as an updated version. |
| .PHONY: all | ||
| include $(RIOTBASE)/pkg/pkg.mk | ||
|
|
||
| all: git-download |
There was a problem hiding this comment.
| all: git-download | |
| all: |
|
Closing now that #13036 is in |
Contribution description
Rely on file creation and dependencies instead of .PHONY targets.
Files will be rebuilt when changing version as the main
Makefilewillhave been updated. All steps are re-done on version change.
When deleting patches, the '.prepare' step should be redone thanks
to the included 'patch-dep.inc' file (TODO TEST ME).
Implementation in order:
Somehow the base is that
patchingcan only be done on the correct commit, so lets do it all at once.Infos:
.prepareshould use the content of.git-downloadedinstead of the variable.::rules but should maybe be the occasion to clean this.Should git-downloaded be updated only with
lazy_spongeto not trigger more rebuild ?I think
.git-preparemust be always re-done as the package makefile may do further modifications afterwards… so not sure it would change anythingTODO:
Change so that packages include
pkg/pkg.mkearlier. Some packages usePKG_BUILDDIRbefore it is defined.Update to use
$(PKG_PREPARED)instead of the .PHONY target.Testing/Reviewing procedure
Issues/PRs references
Discussions coming out of #11491