Failed attempt at fixing bug [CI SKIP]

Jef Roosens 2022-02-13 13:30:37 +01:00
parent a9f379c810
commit 793ee7c01b
Signed by: Jef Roosens
GPG Key ID: 955C0660072F691F
1 changed files with 10 additions and 1 deletions

View File

@ -31,17 +31,26 @@ pub fn new_multi(repo_dir string, pkg_dir string) ?MultiArchRepo {
}
}
return MultiArchRepo{
res := MultiArchRepo{
pkg_dir: pkg_dir
repo_dir: repo_dir
repos: repos
}
lock res.repos {
res.repos = repos.clone()
}
return res
}
pub fn (r &MultiArchRepo) add_from_path(repo_name string, pkg_path string) ?(bool, &package.Pkg) {
// First, we create the repo if it isn't present yet
println('wow')
rp := lock r.repos {
println('wollah')
if repo_name !in r.repos {
println('yicht')
r.repos[repo_name] = new_arch(os.join_path_single(r.repo_dir, repo_name),
r.pkg_dir) ?
}