Verified Commit 8a57e8d3 authored by Karel Koci's avatar Karel Koci 🤘
Browse files

pkgupdate: default entry point used is relative to root directory

parent dd283bf0
......@@ -27,6 +27,7 @@ local reexec = reexec
local state_dump = state_dump
local log_event = log_event
local utils = require "utils"
local syscnf = require "syscnf"
local sandbox = require "sandbox"
local uri = require "uri"
local postprocess = require "postprocess"
......@@ -64,6 +65,9 @@ function required_pkgs(entrypoint)
end
function prepare(entrypoint)
if not entrypoint then
entrypoint = "file://" .. syscnf.root_dir .. "etc/updater/conf.lua"
end
local required = required_pkgs(entrypoint)
local run_state = backend.run_state()
local tasks = planner.filter_required(run_state.status, required, allow_replan)
......
......@@ -122,7 +122,7 @@ int main(int argc, char *argv[]) {
// Parse the arguments
struct cmd_op *ops = cmd_args_parse(argc, argv, cmd_op_allows);
struct cmd_op *op = ops;
const char *top_level_config = "file:///etc/updater/conf.lua";
const char *top_level_config = NULL;
const char *root_dir = NULL;
const char *target_model = NULL;
const char *target_board = NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment