-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: use file_table and resource_table as sqlite3 db #460
Conversation
…mod for symlink entry
Just comment. If possible, I think it will be better to move/fork the repo under |
This package is designed for general purpose use, licensed under Apace license. It has regular and stable release strategy, aligning with semantic versioning. It is not just for otaclient. |
Also I have published this package to pypi, so every version of this package is available on pypi and can be easily installed by pip. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Overall, LGTM. left some minor comments.
Quality Gate passedIssues Measures |
Introduction
Note
This PR is split from the dev PR #453 . This PR only introduces the file_table sqlite3 table implementation, but not yet integrates the file_table into otaclient code.
This PR introduces file_table as sqlite3 db with three tables, naming as follow:
ft_regular
: table contains all regular file entries.ft_non_regular
: table contains all non-regular file entries, including symlinks and chardev(with 0,0 devnum).ft_dir
: table contains all directory entries.Also a new resource_table sqlite3 db with one table is introduced:
rs_table
: table contains all the unique file entries(by sha256digest) and the necessary metadata of the corresponding resource.The simple-sqlite3-orm python package(which is developed and maintained by me also) is used to implement the table definitions and ORMs.
For each tables definition(in
file_table._table
module), helper methods to prepare the entries onto the target(standby slot mount point during OTA) are implemented.Comparing to previous implementation, xattrs and chardev files(required by supporting storing docker images on system image) are supported now.