-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement "outdated" check and introduce "compatible" version
Package search only returns a boolean depending on whether a package with a correct version exists in Debian (or NEW). This isn't sufficient to handle the cases where the package exists, but is so outdated that the version in Debian is likely incompatible with the crate we're inspecting. Moreover, this doesn't differentiate between exact version matches and semver'd matches (e.g. when the Debian version is older but has the same major -- and, if needed, minor -- as the version found on crates.io). In order to deal with the latter case, this change introduces the notion of "compatible" version: it represents crates already packaged in Debian but not on the latest version, although it *should* still be compatible with the requirements. The "compatible" and "outdated" information are then propagated, as well as the Debian package version, through a new `db::PkgInfo` structure used as the return type for the `db::search*` functions. That way, this additional information can easily be processed by other modules and ultimately be reported to the user.
- Loading branch information
Showing
3 changed files
with
88 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters