fix built pkg not found for any archs
This commit is contained in:
parent
e74a9607a3
commit
64ef138302
@ -19,7 +19,7 @@ pub async fn init(db: DatabaseConnection, tx: Sender<Action>) {
|
|||||||
if let Ok(_result) = tx.subscribe().recv().await {
|
if let Ok(_result) = tx.subscribe().recv().await {
|
||||||
match _result {
|
match _result {
|
||||||
// add a package to parallel build
|
// add a package to parallel build
|
||||||
Action::Build(name, version, url, mut version_model) => {
|
Action::Build(name, version, url, version_model) => {
|
||||||
let _ = queue_package(
|
let _ = queue_package(
|
||||||
name,
|
name,
|
||||||
version,
|
version,
|
||||||
@ -39,7 +39,7 @@ async fn queue_package(
|
|||||||
name: String,
|
name: String,
|
||||||
version: String,
|
version: String,
|
||||||
url: String,
|
url: String,
|
||||||
mut version_model: versions::ActiveModel,
|
version_model: versions::ActiveModel,
|
||||||
db: DatabaseConnection,
|
db: DatabaseConnection,
|
||||||
semaphore: Arc<Semaphore>,
|
semaphore: Arc<Semaphore>,
|
||||||
) -> anyhow::Result<()> {
|
) -> anyhow::Result<()> {
|
||||||
|
@ -11,6 +11,7 @@ pub async fn build_pkgbuild(
|
|||||||
pkg_name: &str,
|
pkg_name: &str,
|
||||||
tx: Sender<String>,
|
tx: Sender<String>,
|
||||||
) -> anyhow::Result<String> {
|
) -> anyhow::Result<String> {
|
||||||
|
// update pacman cache
|
||||||
let mut child = tokio::process::Command::new("pacman")
|
let mut child = tokio::process::Command::new("pacman")
|
||||||
.args([
|
.args([
|
||||||
"-Sy",
|
"-Sy",
|
||||||
@ -111,7 +112,7 @@ fn locate_built_package(
|
|||||||
if let Some(file_name) = path.file_name() {
|
if let Some(file_name) = path.file_name() {
|
||||||
let file_name = file_name.to_str().unwrap();
|
let file_name = file_name.to_str().unwrap();
|
||||||
|
|
||||||
if file_name.ends_with("-x86_64.pkg.tar.zst")
|
if file_name.ends_with(".pkg.tar.zst")
|
||||||
&& file_name.starts_with(pkg_name.as_str())
|
&& file_name.starts_with(pkg_name.as_str())
|
||||||
{
|
{
|
||||||
if let Ok(metadata) = path.metadata() {
|
if let Ok(metadata) = path.metadata() {
|
||||||
|
Loading…
Reference in New Issue
Block a user