diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-01-09 08:56:25 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-01-09 08:56:25 +0000 |
commit | 6c2e2e64362053b6a325f8faffbf6b2fccb23fad (patch) | |
tree | eb6d81b35b34e2f80da1aacaa832e63145f720a9 /aports | |
parent | 3ef6dfba60f8ecd1abb3d0c9748035ebb9a4b4d6 (diff) | |
download | lua-aports-6c2e2e64362053b6a325f8faffbf6b2fccb23fad.tar.bz2 lua-aports-6c2e2e64362053b6a325f8faffbf6b2fccb23fad.tar.xz |
pkg: initialize arch on module load
so we dont need a conditional in inner loops.
Diffstat (limited to 'aports')
-rw-r--r-- | aports/pkg.lua | 4 |
1 files 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 |