Commit graph

13 commits

Author SHA1 Message Date
Till Wegmueller
def11a1dfb
Refactor: Replace redb with rusqlite for catalog handling
- Transitioned the catalog backend from `redb` to `rusqlite` for better compatibility and concurrency.
- Updated `IpsProvider` to use SQLite for package querying, dependency resolution, and obsolescence handling.
- Removed `decode_manifest_bytes_local` and unused `manifest` cache logic.
- Simplified catalog-related functions and integrated `sqlite_catalog` module.
- Enhanced test functions and added schemas for managing SQLite databases.
2026-02-04 22:39:42 +01:00
Till Wegmueller
b8c625a11e
Refactor attribute value access and error handling
- Replaced `values.get(0)` with `values.first()` for improved clarity and consistency across multiple files.
- Simplified conditional checks with `.is_empty()` and `format_args!` to enhance readability.
- Implemented `Default` trait for `VariableMode` directly within the enum.
- Updated error handling by boxing errors in `RepositoryError` and `CatalogError`.
- Replaced redundant `else` blocks with streamlined logic.
2026-01-18 13:00:21 +01:00
Till Wegmueller
d2d1c297cc
Refactor to align with Rust formatting guidelines and enhance code readability.
- Adjusted indentation and line breaks for structs, functions, and method calls to comply with Rust formatting standards.
- Improved error message formatting and consistency across `PkgTreeError` instances.
- Restructured long function arguments and chained calls for clarity and maintainability.
- Simplified conditional statements and loops for better readability.
- No functional changes introduced.
2025-12-22 20:10:17 +01:00
Till Wegmueller
88e06b488d
Refactor catalog processing to merge parts by version
- Introduced `process_publisher_merged` to consolidate catalog parts per `stem@version` before processing.
- Replaced part-wise processing with merged version logic for efficiency and improved determinism.
- Added `process_catalog_part` dead code annotation and cleaned up outdated logic.
- Enhanced handling of merged actions and signature deduplication across catalog parts.
- Improved logging for import and obsolete package metrics.
2025-08-27 00:05:36 +02:00
Till Wegmueller
e4bd9a748a
Refactor ImageCatalog and apply manifest logic
- Added support for obsoleted package database with separate handling in `ImageCatalog`.
- Enhanced apply manifest functionality with progress callback support and processing statistics.
- Introduced LZ4 compression for manifest storage in `ImageCatalog`.
- Removed debugging eprintln statements, replaced with structured logging.
- Updated `pkg6` image creation and installation logic to improve user feedback and error handling.
- Updated database initialization and build processes to handle new obsoleted logic.
2025-08-19 22:43:50 +02:00
Till Wegmueller
77147999b3
Add incorporation lock support and update dependencies across the project
- Implemented incorporation lock functionality for packages, including pre-checks, addition, and retrieval methods.
- Enhanced package installation logic to handle incorporation constraints.
- Updated dependency versions in `Cargo.toml` and `Cargo.lock`, aligning with latest compatible releases.
- Introduced new tests to verify incorporation lock behavior, including scenarios with and without locks.
- Refactored code for improved readability and added error handling improvements.
- Fixed minor typos and inconsistencies in comments and log messages.
2025-08-19 14:30:55 +02:00
Till Wegmueller
a2645749b1
Add action executors, action plans, and sample install script
- Implemented `executors` module for applying manifests with support for directories, files, and links.
- Added `action_plan` module to merge and execute install plans from manifests.
- Introduced `run_sample_install.sh` script for testing installations, including dry-run and real execution.
- Enhanced `pkg6` install logic to resolve and apply action plans.
- Improved manifest management with `save_manifest` and repository-based fetching.
2025-08-19 11:06:48 +02:00
Till Wegmueller
287b692920
fixup catalog locations and import. Add end2end test for that. (ignored by default) 2025-08-13 19:09:22 +02:00
Till Wegmueller
f2922dab11
Fix catalog import logic 2025-08-05 00:44:29 +02:00
Till Wegmueller
92cce0f767
Add debugging utilities and improved package listing
- Add support for debugging database tables with `--stats`, `--dump-all`, and `--dump-table` options.
- Introduce CLI command `DebugDb` for inspecting catalog, obsoleted, and installed tables.
- Enhance `List` command to include an `--all` flag for listing all available packages.
- Update logging for database operations and package queries.
- Add methods to dump and analyze table contents in `InstalledPackages` and `ImageCatalog`.
2025-08-05 00:20:57 +02:00
Till Wegmueller
0ec1c1928a
Update Image and Catalog functionalities with improved catalog handling and new refresh logic
- Introduced `Image::refresh_catalogs` to support refreshing catalogs selectively or fully for specified publishers.
- Enhanced `CatalogManager::load` to handle missing fields gracefully, including fallback mechanisms for `packages`.
- Added detailed logging and error diagnostics for catalog parsing and directory operations.
- Improved publisher-specific directory management, including cleaning and recreating directories during full refresh.
- Updated tests to verify correct behavior for catalog directory clearing and new catalog handling logic.
2025-08-04 23:45:41 +02:00
Till Wegmueller
f31d2e11af
Add support for partial image creation and improve logging
- Introduced the `ImageType` enum to support both `Full` and `Partial` image types during creation.
- Updated `Image::create_image` to accept `ImageType` as a parameter.
- Enhanced logging with detailed debug statements for catalog building, image queries, and package processing.
- Refactored CLI to include a new `--type` option for specifying image type during image creation.
- Simplified path determination logic in `pkg6` with a new `determine_image_path` helper function.
- Removed unused imports and unnecessary file checks for cleaner code.
2025-08-04 23:01:04 +02:00
Till Wegmueller
e27cd35d8d
Add ImageCatalog and InstalledPackages modules for package management
- Introduced `ImageCatalog` for handling catalog-related operations, including initialization, building from publishers, querying, and manifest management.
- Added `InstalledPackages` for managing installed package operations, such as adding, removing, querying, and retrieving manifests.
- Defined database schemas and error types to support both modules.
- Refactored table handling, ensuring consistent transaction scoping with `redb`.
2025-08-04 22:01:38 +02:00