From 6c2e2e64362053b6a325f8faffbf6b2fccb23fad Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Thu, 9 Jan 2014 08:56:25 +0000 Subject: pkg: initialize arch on module load so we dont need a conditional in inner loops. --- aports/pkg.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aports/pkg.lua b/aports/pkg.lua index c25a0f8..4421936 100644 --- a/aports/pkg.lua +++ b/aports/pkg.lua @@ -1,6 +1,7 @@ local M = {} local abuild = require('aports.abuild') +local abuild_arch = abuild.get_arch() -- return a key list with makedepends and depends function M.all_deps(p) @@ -84,8 +85,7 @@ function M.get_apk_file_path(pkg) end local repodest = abuild.get_conf("REPODEST") if repodest ~= nil and repodest ~= "" then - local arch = abuild.get_arch() - return repodest.."/"..M.get_repo_name(pkg).."/"..arch.."/"..M.get_apk_file_name(pkg) + return repodest.."/"..M.get_repo_name(pkg).."/"..abuild_arch.."/"..M.get_apk_file_name(pkg) end return pkg.dir.."/"..M.get_apk_file_name(pkg) end -- cgit v1.2.3