From 3aff9c58c68d6882294e6586ddb384709ce95abe Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 1 Dec 2026 02:47:32 +0000 Subject: populate: probe passage and pass sources too A passage source ran rsync on every run, about a dozen round trips to a remote target, and a pass source a command reading .pass_info, which tells whether the passwords changed. The probe lists the target paths of passage sources too, and reads what pass sources' .pass_info contains. After decrypting, a passage source lists its working directory with find, whose files have the times of their .age files and fixed modes, and doesn't run rsync if the listings are the same; Delivery::transfer does that for any source the probe listed. A pass source takes .pass_info from the probe. --- pkgs/populate/src/probe.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'pkgs/populate/src/probe.rs') diff --git a/pkgs/populate/src/probe.rs b/pkgs/populate/src/probe.rs index 7228cd2..3da117a 100644 --- a/pkgs/populate/src/probe.rs +++ b/pkgs/populate/src/probe.rs @@ -1,7 +1,8 @@ //! What's at the target paths of the sources whose delivery may find //! nothing to do, found out with one command on the target, right after -//! taking the lock, so their delivery doesn't need any: file sources, see -//! rsync's Listing, symlink sources, and git sources with a commit as ref. +//! taking the lock, so their delivery doesn't need any: file and passage +//! sources, see rsync's Listing, symlink and pass sources, and git sources +//! with a commit as ref. use crate::rsync::{self, Listing}; use crate::run::{Context, Result}; @@ -12,10 +13,13 @@ use std::collections::BTreeMap; /// What the probe found at a source's target path. #[derive(Debug, Default, PartialEq)] pub struct Target { - /// For a file source, its listing, if populate can compare it. + /// For a file or passage source, its listing, if populate can compare + /// it. pub listing: Option, /// For a symlink source, the target of the symlink there, if any. pub link: Option, + /// For a pass source, what its .pass_info contains, if anything. + pub info: Option, /// For a git source, the state of the work tree there, if it's one /// that git_problems finds nothing wrong with. pub git: Option, @@ -125,6 +129,7 @@ fn parse(output: &str) -> BTreeMap { } } "L" => target.link = fields.next().map(str::to_string), + "I" => target.info = fields.next().map(str::to_string), // Dirty until git status says otherwise. "C" => { fields.next(); -- cgit v1.3.1 [cgit] Unable to lock slot /tmp/cgit/44000000.lock: Permission denied (13)