summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xREADME.md22
-rwxr-xr-xsrc/resolver.rs6
-rwxr-xr-xsrc/rootfs.rs1
3 files changed, 14 insertions, 15 deletions
diff --git a/README.md b/README.md
index c93df41..ee7a847 100755
--- a/README.md
+++ b/README.md
@@ -135,9 +135,11 @@ glibc.depends:
- glibc-specific-dep
```
-- `depends` -- always included regardless of libc
-- `musl.depends` -- only added when the target libc is musl
-- `glibc.depends` -- only added when the target libc is glibc
+| Dependency Key | Scope |
+|:---|:---|
+| `depends` | always included regardless of libc |
+| `musl.depends` | only added when the target libc is musl |
+| `glibc.depends` | only added when the target libc is glibc |
### Case-insensitive package names
@@ -370,11 +372,15 @@ binaries:
### Dependency version operators
-- `>=` -- greater or equal
-- `<=` -- less or equal
-- `>` -- greater
-- `<` -- less
-- `==` -- exact match
+Each package recipe defines a single current version. The dependency constraints check the currently installed packages in `/etc/ror/installed.json` to guarantee compatibility and trigger updates when needed.
+
+| Operator | Meaning |
+|:---|:---|
+| `>=` | greater or equal |
+| `<=` | less or equal |
+| `>` | greater |
+| `<` | less |
+| `==` | exact match |
### Dependency alternatives
diff --git a/src/resolver.rs b/src/resolver.rs
index 72ddf92..33c67e2 100755
--- a/src/resolver.rs
+++ b/src/resolver.rs
@@ -292,28 +292,22 @@ mod tests {
#[test]
fn test_compute_levels_ordering() {
let mut graph = DependencyGraph::new();
- // A depends on B, B depends on C
graph.add_dep("A".into(), "B".into());
graph.add_dep("B".into(), "C".into());
- // D has no deps
graph.edges.entry("D".into()).or_default();
let levels = graph.compute_levels();
- // C and D must be installed first (level 0)
assert_eq!(levels.len(), 3);
assert!(levels[0].contains(&"C".to_string()));
assert!(levels[0].contains(&"D".to_string()));
- // B must be installed second (level 1)
assert_eq!(levels[1], vec!["B".to_string()]);
- // A must be installed third (level 2)
assert_eq!(levels[2], vec!["A".to_string()]);
}
#[test]
fn test_cycle_does_not_drop_packages() {
let mut graph = DependencyGraph::new();
- // A depends on B, B depends on A
graph.add_dep("A".into(), "B".into());
graph.add_dep("B".into(), "A".into());
diff --git a/src/rootfs.rs b/src/rootfs.rs
index 65208a0..badc595 100755
--- a/src/rootfs.rs
+++ b/src/rootfs.rs
@@ -82,7 +82,6 @@ fn build_download_tasks(packages: &[String], target_arch: &str, target_libc: &st
let effective_filename = resolve_filename(&pkg, binary);
- //prefer local package files when available
let workspace = std::env::var("ROR_WORKSPACE").unwrap_or_else(|_| "/var/ror/cache".to_string());
let local_path = Path::new(&workspace).join(&effective_filename);
let urls: Vec<String> = if local_path.exists() {