summaryrefslogtreecommitdiffstats
path: root/src/db/pkgbases.rs
diff options
context:
space:
mode:
authoraur-build <aur-build@localhost>2026-11-22 10:51:45 +0000
committeraur-build <aur-build@localhost>2026-11-22 10:51:45 +0000
commit053dfbca8a4955a616e9b2c0f5a5d664c0db7aef (patch)
tree969777fa32845f49723c52b1889c4870c98134cf /src/db/pkgbases.rs
parent1e1e12e7220a3fd288782ae40f0823db32acf6cb (diff)
downloadaur-build-053dfbca8a4955a616e9b2c0f5a5d664c0db7aef.tar.gz
aur-build-053dfbca8a4955a616e9b2c0f5a5d664c0db7aef.zip
src,tests: retire the census commentary from the source
A gated item used to carry its own defence: why it is `pub` only under `test-support`, which census once mistook a filename for a caller, why a wrapper is compiled out rather than deleted. The budget file already holds those claims and the ratchet already checks them, so the source keeps the one line that says what the item is. The module headers stop narrating the refactor that produced them. What survives is the wire protocol, the git pipe, the poisoned lock that must be recovered rather than unwedged.
Diffstat (limited to 'src/db/pkgbases.rs')
-rw-r--r--src/db/pkgbases.rs16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/db/pkgbases.rs b/src/db/pkgbases.rs
index 1513928..ba52472 100644
--- a/src/db/pkgbases.rs
+++ b/src/db/pkgbases.rs
@@ -45,10 +45,7 @@ pub fn get_pkgbase_by_id(db: &Db, id: i64) -> Result<Option<Pkgbase>> {
})
}
-/// The release a pkgbase currently points at, if it points at one. This is a
-/// pointer stored on the pkgbase row, so reading it is a persistence question,
-/// not a review one — the watcher needs it to decide what a change is a change
-/// *from*, and review must not be the only way to ask.
+/// The release a pkgbase currently points at, if it points at one.
pub fn accepted_release_for(db: &Db, pb: &Pkgbase) -> Result<Option<ReleaseRow>> {
match pb.current_accepted_release_id {
Some(id) => release_by_id(db, id),
@@ -64,15 +61,8 @@ pub fn set_aur_head(writer: &Writer, pkgbase_id: i64, head: &str, mirror: &str)
})
}
-/// Compare-and-set the accepted-release pointer.
-///
-/// Test-tier only, and the reason is worth keeping next to it: production
-/// performs this CAS inside a transaction through `cas_accepted_release_in`,
-/// which is what `pipeline::publish` calls at publish.rs:208. This standalone
-/// form takes a `Writer` and is called by nothing in the crate — `tests/db.rs`
-/// alone pins that the pointer moves once and refuses the second time. The two
-/// names differ by three characters, which is exactly how a name-match census
-/// once credited this function with a production caller it never had.
+/// Compare-and-set the accepted-release pointer. Production does its CAS inside
+/// a transaction through `cas_accepted_release_in`.
#[cfg(feature = "test-support")]
pub fn cas_accepted_release(writer: &Writer, pkgbase_id: i64, expected: Option<i64>, new_id: i64) -> Result<bool> {
writer.tx(move |tx| {