diff options
Diffstat (limited to 'src/watch/staleness.rs')
| -rw-r--r-- | src/watch/staleness.rs | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/watch/staleness.rs b/src/watch/staleness.rs index e052b26..2631769 100644 --- a/src/watch/staleness.rs +++ b/src/watch/staleness.rs @@ -1,14 +1,3 @@ -//! Staleness (§10.2): "would rebuilding this change what a consumer gets?" -//! -//! Computed **on read**, never stored. A stored staleness flag goes wrong the -//! moment anything else is published, and there is always something else being -//! published; deriving it from the world snapshots and the current index means -//! it can never lie. -//! -//! The pair comes from §10.1: each build recorded the versions of *our* -//! packages it was built against. If any of those differ from what the index -//! holds now, the artifact was built against a world that no longer exists. - use crate::db::{self, Db}; use crate::error::Result; @@ -73,12 +62,10 @@ pub fn stale_for(db: &Db, pkgbase: &str) -> Result<Vec<Stale>> { Ok(stale_rows(db)?.into_iter().filter(|s| s.pkgbase == pkgbase).collect()) } -/// AUR now offers a **lower** version than we serve (§10.2). This is not a -/// build request; it is an announcement that the mirror and the upstream have -/// disagreed, and someone has to decide which one consumers follow. +/// AUR now offers a **lower** version than we serve (§10.2). This is not a build +/// request; it is an announcement that the mirror and upstream have disagreed. /// -/// Derived on read from the newest candidate per pkgbase against the accepted -/// release, so it disappears the moment either side moves. +/// Derived on read, so it disappears the moment either side moves. pub fn downgrades(db: &Db) -> Result<Vec<Stale>> { let rows = db::served_vs_offered_pkgvers(db)?; let mut out = Vec::new(); |
