From 9db55faec9d248c4a1d23bb496dd8d5b8ef602af Mon Sep 17 00:00:00 2001 From: Max Erenberg Date: Sat, 28 Jan 2023 04:57:08 -0500 Subject: [PATCH] do not manually update trace files for Debian --- merlin/sync/post.go | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/merlin/sync/post.go b/merlin/sync/post.go index 2926f9c..bfd99d9 100644 --- a/merlin/sync/post.go +++ b/merlin/sync/post.go @@ -4,8 +4,6 @@ import ( "io" "os" "os/exec" - "path/filepath" - "time" "git.csclub.uwaterloo.ca/public/merlin/config" ) @@ -50,25 +48,8 @@ func zfsSync(repo *config.Repo) { func postSyncTraceUpdate(repo *config.Repo) { switch repo.SyncType { case "csc-sync-debian": - cscPostDebian(repo) - } -} - -// update our trace file's modification date by writing the current time -func cscPostDebian(repo *config.Repo) { - targetDir := filepath.Join(buildDownloadDir(repo), "project/trace") - target := filepath.Join(targetDir, config.Conf.Hostname) - - os.MkdirAll(targetDir, 0755) - f, err := os.OpenFile(target, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644) - - if err != nil { - repo.Logger.Error("Unable to open trace file: " + target) - return - } - if _, err = f.WriteString(time.Now().UTC().Format(time.RFC1123)); err != nil { - repo.Logger.Error("Unable to write to trace file: " + target) - return + // The ftpsync script provided by Debian takes care of updating the trace + // file, so we don't need to do this manually anymore. } }