oma_pm/
lib.rs

1//! # oma-pm
2//!
3//! The package manager component for oma.
4//!
5//! The oma-pm crate provides essential functionalities for
6//! package management operations such as install, remove, upgrade, and search.
7//!
8//! ## Features
9//!
10//! 1. **PackageInfo**: Package information to be handled by oma-apt.
11//! 2. **Progress**: Reports the progress of package management operations.
12//! 3. **Search Result**: Structure and handling of search results.
13//! 4. **Communication with rust-apt**: Communicate with `oma-apt`.
14//!
15//! NOTE: `oma-apt` is another fork of `rust-apt`, maintained by AOSC-Dev
16//!
17//! ## Modules
18//!
19//! - `apt`: Handles interactions with `apt`.
20//! - `matches`: Provides utilities for matching package information.
21//! - `pkginfo`: Contains definitions and structures for package information.
22//! - `progress`: Tracks the progress of package management operations.
23//! - `search`: Defines the structure and handling of search results.
24//! - `dbus`: Manages D-Bus communication.
25//!
26//! ## Re-exports
27//!
28//! - `AptErrors`: Error definitions from `oma-apt` crate.
29//! - `PkgCurrentState`: Current package management status from oma-apt.
30//! - `PackageStatus`: Package status definitions from the `search` module.
31
32pub mod apt;
33pub mod matches;
34pub mod pkginfo;
35pub mod progress;
36pub mod search;
37pub use search::PackageStatus;
38mod commit;
39mod dbus;
40mod download;
41pub mod utils;
42pub use commit::CommitConfig;
43pub mod sort;
44pub use apt_auth_config;
45pub use commit::CustomDownloadMessage;
46pub use oma_apt;
47pub use oma_fetch::Event as PackageDownloadEvent;
48pub use oma_fetch::SingleDownloadError as PackageDownloadError;
49mod dpkg;
50
51#[cfg(test)]
52mod test {
53    use std::sync::{LazyLock, Mutex};
54    pub(crate) static TEST_LOCK: LazyLock<Mutex<()>> = LazyLock::new(|| Mutex::new(()));
55}