From e74a9607a35a811e07eed29622450ae9558d9d41 Mon Sep 17 00:00:00 2001 From: lukas-heiligenbrunner Date: Sun, 7 Jan 2024 20:29:12 +0100 Subject: [PATCH] do pacman -Sy before each build --- backend/src/pkgbuild/build.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backend/src/pkgbuild/build.rs b/backend/src/pkgbuild/build.rs index a95d72e..48e2442 100644 --- a/backend/src/pkgbuild/build.rs +++ b/backend/src/pkgbuild/build.rs @@ -11,6 +11,15 @@ pub async fn build_pkgbuild( pkg_name: &str, tx: Sender, ) -> anyhow::Result { + let mut child = tokio::process::Command::new("pacman") + .args([ + "-Sy", + ]) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .spawn()?; + child.wait().await?; + let makepkg = include_str!("../../scripts/makepkg"); // Create a temporary file to store the bash script content