Some small changes [CI SKIP]

Jef Roosens 2022-02-04 17:48:17 +01:00
parent f7171b822d
commit a9f379c810
Signed by: Jef Roosens
GPG Key ID: 955C0660072F691F
3 changed files with 6 additions and 4 deletions

View File

@ -43,6 +43,10 @@ gdb: vieter
run: vieter run: vieter
$(ENV) ./vieter $(ENV) ./vieter
.PHONY: run-debug
run-debug: debug
$(ENV) ./dvieter
.PHONY: run-prod .PHONY: run-prod
run-prod: prod run-prod: prod
$(ENV) ./pvieter $(ENV) ./pvieter

View File

@ -10,8 +10,6 @@ const port = 8000
const buf_size = 1_000_000 const buf_size = 1_000_000
const db_name = 'pieter.db'
struct App { struct App {
web.Context web.Context
pub: pub:

View File

@ -40,7 +40,7 @@ pub fn new_multi(repo_dir string, pkg_dir string) ?MultiArchRepo {
pub fn (r &MultiArchRepo) add_from_path(repo_name string, pkg_path string) ?(bool, &package.Pkg) { 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 // First, we create the repo if it isn't present yet
repo := lock r.repos { rp := lock r.repos {
if repo_name !in r.repos { if repo_name !in r.repos {
r.repos[repo_name] = new_arch(os.join_path_single(r.repo_dir, repo_name), r.repos[repo_name] = new_arch(os.join_path_single(r.repo_dir, repo_name),
r.pkg_dir) ? r.pkg_dir) ?
@ -52,7 +52,7 @@ pub fn (r &MultiArchRepo) add_from_path(repo_name string, pkg_path string) ?(boo
// We read in the package file // We read in the package file
pkg := package.read_pkg(pkg_path) or { return error('Failed to read package file: $err.msg') } pkg := package.read_pkg(pkg_path) or { return error('Failed to read package file: $err.msg') }
added := repo.add(pkg) ? added := rp.add(pkg) ?
// Move over package to pkg dir if it was successfully added // Move over package to pkg dir if it was successfully added
if added { if added {