Skip to content

Commit

Permalink
Display outdated information for packages in Debian/NEW
Browse files Browse the repository at this point in the history
When a crate is already packaged for Debian but is outdated, provide
more information about this discrepancy.

* Include "outdated" in the Debian information
* Color the crate name as yellow, rather than green, since the package
  can't be used as is
* Color the version as red
  • Loading branch information
jamessan committed Nov 29, 2023
1 parent 77303c0 commit cb16c51
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/format/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ impl<'a> fmt::Display for Display<'a> {
pkg.green(),
deb.version.yellow()
)?;
} else if deb.outdated {
write!(
fmt,
"{} (outdated, {} in debian)",
pkg.yellow(),
deb.version.red()
)?;
} else {
write!(fmt, "{} (in debian)", pkg.green())?;
}
Expand All @@ -76,11 +83,18 @@ impl<'a> fmt::Display for Display<'a> {
pkg.blue(),
deb.version.yellow()
)?;
} else if deb.outdated {
write!(
fmt,
"{}, (outdated, {} in debian NEW queue)",
pkg.blue(),
deb.version.red()
)?;
} else {
write!(fmt, "{} (in debian NEW queue)", pkg.blue())?;
}
} else if deb.outdated {
write!(fmt, "{} (outdated, {})", pkg.red(), deb.version)?;
write!(fmt, "{} (outdated, {})", pkg.red(), deb.version.red())?;
} else {
write!(fmt, "{pkg}")?;
}
Expand Down

0 comments on commit cb16c51

Please sign in to comment.