summaryrefslogtreecommitdiffstats
path: root/src/watch
diff options
context:
space:
mode:
Diffstat (limited to 'src/watch')
-rw-r--r--src/watch/detect.rs2
-rw-r--r--src/watch/mirror.rs2
-rw-r--r--src/watch/upstream.rs10
3 files changed, 4 insertions, 10 deletions
diff --git a/src/watch/detect.rs b/src/watch/detect.rs
index 3d2c955..1c72131 100644
--- a/src/watch/detect.rs
+++ b/src/watch/detect.rs
@@ -23,6 +23,7 @@ pub enum Outcome {
}
#[derive(Debug, Clone)]
+// CheckReport stays `pub`: what `detect::check_pkgbase` returns; the test tier drives it and binds the value without naming it.
pub struct CheckReport {
pub pkgbase: String,
pub head: String,
@@ -106,7 +107,6 @@ fn analyse(cfg: &Config, db: &Db, pb: &Pkgbase, head: &str) -> Result<CheckRepor
pkgver: a.pkgver.clone(),
pkgrel: a.pkgrel.clone(),
pins: accepted_pins.clone(),
- cached: true,
})
};
let (epoch, pkgver, pkgrel, pins) = match &resolved {
diff --git a/src/watch/mirror.rs b/src/watch/mirror.rs
index d7c793b..5b7e2b1 100644
--- a/src/watch/mirror.rs
+++ b/src/watch/mirror.rs
@@ -69,7 +69,7 @@ impl Tree {
pub fn recipe_hash(&self) -> String {
crate::hash::recipe_hash(&self.blobs)
}
- pub fn json_list(&self) -> String {
+ pub(crate) fn json_list(&self) -> String {
serde_json::to_string(&self.blobs).unwrap_or_else(|_| "[]".into())
}
}
diff --git a/src/watch/upstream.rs b/src/watch/upstream.rs
index 0845440..7987178 100644
--- a/src/watch/upstream.rs
+++ b/src/watch/upstream.rs
@@ -10,6 +10,7 @@ use crate::error::{Error, Result, TransientCause};
use crate::git;
#[derive(Debug, Clone)]
+// StageA stays `pub`: what `upstream::probe` returns; tests/ops.rs and tests/vcs.rs call `probe` directly.
pub struct StageA {
pub pins: Vec<UpstreamPin>,
pub unprobed: Vec<String>,
@@ -106,26 +107,20 @@ fn probe_impl(recipe: &Recipe, accepted: &[UpstreamPin]) -> Result<StageA> {
}
#[derive(Debug, Clone)]
-pub struct StageB {
+pub(crate) struct StageB {
pub epoch: String,
pub pkgver: String,
pub pkgrel: String,
pub pins: Vec<UpstreamPin>,
- pub cached: bool,
}
impl StageB {
- pub fn version(&self) -> String {
- crate::pkgver::full_version(&self.epoch, &self.pkgver, &self.pkgrel)
- }
-
fn from_cache(row: StageBCacheRow) -> Self {
StageB {
epoch: row.epoch,
pkgver: row.pkgver,
pkgrel: row.pkgrel,
pins: row.pins,
- cached: true,
}
}
@@ -274,7 +269,6 @@ fn run(
pkgver,
pkgrel,
pins,
- cached: false,
})
}