fix(debian): build against rust-apt-0.7.0
1bcb7f8 bumped rust-apt from 0.5 to 0.7. This change made
Cache::packages(&self, &sort) a fallible function. The required change in
the Debian backend was missed.
This commit propagates the error in get_all_installed_packages and
get_explicitly_installed_packages for the Debian backend.
Fixes #64.
This commit is contained in:
@@ -34,7 +34,7 @@ impl Backend for Debian {
|
|||||||
let sort = PackageSort::default().installed();
|
let sort = PackageSort::default().installed();
|
||||||
|
|
||||||
let mut result = HashSet::new();
|
let mut result = HashSet::new();
|
||||||
for pkg in cache.packages(&sort) {
|
for pkg in cache.packages(&sort)? {
|
||||||
result.insert(Package::from(pkg.name().to_string()));
|
result.insert(Package::from(pkg.name().to_string()));
|
||||||
}
|
}
|
||||||
Ok(result)
|
Ok(result)
|
||||||
@@ -45,7 +45,7 @@ impl Backend for Debian {
|
|||||||
let sort = PackageSort::default().installed().manually_installed();
|
let sort = PackageSort::default().installed().manually_installed();
|
||||||
|
|
||||||
let mut result = HashSet::new();
|
let mut result = HashSet::new();
|
||||||
for pkg in cache.packages(&sort) {
|
for pkg in cache.packages(&sort)? {
|
||||||
result.insert(Package::from(pkg.name().to_string()));
|
result.insert(Package::from(pkg.name().to_string()));
|
||||||
}
|
}
|
||||||
Ok(result)
|
Ok(result)
|
||||||
|
|||||||
Reference in New Issue
Block a user