feat: add support for package conflicts in alternatives
- Introduced a new `conflicts` field in the `Alternatives` struct to track conflicting packages. - Updated database schema to include a `conflicts` table and related queries. - Enhanced package specification handling to include conflicts in TOML serialization and deserialization. - Modified the interactive package creation to allow input for conflicting packages. - Updated source repository index creation to handle conflicts and added relevant statistics. - Adjusted tests to cover new conflicts functionality in package alternatives.
This commit is contained in:
@@ -171,6 +171,17 @@ impl Packager {
|
||||
.collect(),
|
||||
),
|
||||
);
|
||||
map.insert(
|
||||
"conflicts".to_string(),
|
||||
toml::Value::Array(
|
||||
self.spec
|
||||
.alternatives
|
||||
.conflicts
|
||||
.iter()
|
||||
.map(|s| toml::Value::String(s.clone()))
|
||||
.collect(),
|
||||
),
|
||||
);
|
||||
|
||||
// Add install-relevant dependency kinds for repo/runtime consumers.
|
||||
let mut deps = toml::map::Map::new();
|
||||
|
||||
Reference in New Issue
Block a user