Conversation
This function is growing in complexity and will get worse when we add callback functionality. This will break things up in a way that will also make it easier to use C++ constructor/destructor logic Signed-off-by: Andy Doan <[email protected]>
This makes things a little less tedious Signed-off-by: Andy Doan <[email protected]>
This class has grown to the point where the interface intended to be used by main.cc and the implementation are getting blurred. There's more that could be cleaned up here, but this is an improvement. Signed-off-by: Andy Doan <[email protected]>
Lock files aren't flexible enough for many users. This approach allows a user to have more fine-grained control of when things happen. A callback program could then decide if it was an okay time to do a "download". If not, it could simply block until it was ready. Signed-off-by: Andy Doan <[email protected]>
Move update checking into the LiteClient and wrap it with a callback Signed-off-by: Andy Doan <[email protected]>
Signed-off-by: Andy Doan <[email protected]>
Signed-off-by: Andy Doan <[email protected]>
This logic is used by both the fetch and install methods we'll be creating. Signed-off-by: Andy Doan <[email protected]>
Signed-off-by: Andy Doan <[email protected]>
Signed-off-by: Andy Doan <[email protected]>
This required a fix to log_info_target. The old way wasn't great because it would show docker-apps to platforms that don't support them. In order to fix this, log_info_targets was added to our ifdef logic so it can be done better. Signed-off-by: Andy Doan <[email protected]>
8bd3377 to
d3a2393
Compare
Signed-off-by: Andy Doan <[email protected]> Signed-off-by: Mike Sul <[email protected]>
| } | ||
| } | ||
|
|
||
| static __attribute__((constructor)) void init_pacman() { |
There was a problem hiding this comment.
It's not necessary to do static __attribute__((constructor)) in case of an executable, just PackageManagerFactory::registerPackageManager can be called. The original idea was to be able to "inject" a new package manager implemented and delivered as a shared library.
There was a problem hiding this comment.
This just gives me a fool-proof way to make sure it gets called at initialization. Otherwise the LiteClient constructor needs to call registerPackageManager, but only if -DBUILD_DOCKERAPP .
|
@mike-sul - so you think this is ready to merge? |
|
I cannot verify it from end-to-end perspective as it requires creating a 'docker_compose_apps' target instead of 'docker_apps' on the backend. Also, we might wanna update lmp-device-register to configure sota.toml with the 'docker compose' variables instead of 'docker app'. |
|
If you want to give it a spin, you can enable it in your factory with this: that will continue to publish the old docker apps and also this now compose app. And once we get things tested in our factories, yes, we'll update the sota.toml generation to use this instead. |
another missing piece for me is |
Good catch. This needs to be merged into meta-lmp: |
|
aktually this can be merged as it does not interfere with the docker app standalone package manager. |
|
you want to hold off while we re-work the download function to be in aklite, or should do you want to do that in a new PR? |
This PR has the callback implementation which is agnostic to the package manager type, so if we merge it people can give it try. So, yes, I prefer to do the download function in a new PR. |
|
@doanac so merge or not to merge :)? |
|
I forgot this stuff depended on the callbacks stuff. However, there's only one commit in the "callback" patches that does callbacks. The rest is code cleanup. |
|
@doanac thanks! |
No description provided.