From 883140073f1dcd29f20f0614246e5d00e505030d Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Tue, 26 May 2020 22:51:23 -0500 Subject: hscript: Make --keys-dir relative --- hscript/script_e.cc | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'hscript') diff --git a/hscript/script_e.cc b/hscript/script_e.cc index 8c857d7..a05d41e 100644 --- a/hscript/script_e.cc +++ b/hscript/script_e.cc @@ -530,14 +530,13 @@ bool Script::execute() const { output_info("internal", "initialising APK"); if(opts.test(Simulate)) { std::cout << "/sbin/apk --root " << targetDirectory() << " --initdb " - << "--keys-dir " << targetDirectory() << "/etc/apk/keys add" - << std::endl; + << "--keys-dir " << "etc/apk/keys add" << std::endl; } #ifdef HAS_INSTALL_ENV else { if(run_command("/sbin/apk", {"--root", targetDirectory(), "--initdb", "--keys-dir", - targetDirectory() + "/etc/apk/keys", "add"}) != 0) { + "etc/apk/keys", "add"}) != 0) { EXECUTE_FAILURE("pkginstall"); return false; } @@ -553,17 +552,14 @@ bool Script::execute() const { } std::cout << "apk --root " << targetDirectory() << " --keys-dir " - << targetDirectory() << "/etc/apk/keys" << " update" - << std::endl; + << "etc/apk/keys" << " update" << std::endl; std::cout << "apk --root " << targetDirectory() << " --keys-dir " - << targetDirectory() << "/etc/apk/keys" << " add " - << pkg_list.str() << std::endl; + << "etc/apk/keys" << " add " << pkg_list.str() << std::endl; } #ifdef HAS_INSTALL_ENV else { - if(run_command("/sbin/apk", - {"--root", targetDirectory(), "--keys-dir", - targetDirectory() + "/etc/apk/keys", "update"}) != 0) { + if(run_command("/sbin/apk", {"--root", targetDirectory(), "--keys-dir", + "etc/apk/keys", "update"}) != 0) { EXECUTE_FAILURE("pkginstall"); return false; } @@ -572,7 +568,7 @@ bool Script::execute() const { params[0] = "--root"; params[1] = targetDirectory(); params[2] = "--keys-dir"; - params[3] = targetDirectory() + "/etc/apk/keys"; + params[3] = "etc/apk/keys"; params[4] = "add"; std::copy(this->internal->packages.begin(), this->internal->packages.end(), -- cgit v1.2.3-70-g09d2