diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-01-09 09:07:04 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-01-09 10:30:17 +0000 |
commit | 6be5f55184e4fbb2800a708fdc038e85f04a6858 (patch) | |
tree | a2d9651bcc38ae1baf9631a95b356f348b7014bf /aports | |
parent | 1e57c3248d0583aeff90fd74b3521a0363a32a74 (diff) | |
download | lua-aports-6be5f55184e4fbb2800a708fdc038e85f04a6858.tar.bz2 lua-aports-6be5f55184e4fbb2800a708fdc038e85f04a6858.tar.xz |
pkg: implement arch_enabled()
to test if package is relevant for current arch
Diffstat (limited to 'aports')
-rw-r--r-- | aports/pkg.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/aports/pkg.lua b/aports/pkg.lua index b2b25d1..87637d9 100644 --- a/aports/pkg.lua +++ b/aports/pkg.lua @@ -98,6 +98,10 @@ function M.apk_file_exists(pkg) return true end +function M.arch_enabled(pkg) + return pkg.arch.all or pkg.arch.noarch or pkg.arch[abuild_arch] +end + function M.init(pkg) pkg.all_deps = M.all_deps pkg.remote_sources = M.remote_sources @@ -106,5 +110,6 @@ function M.init(pkg) pkg.get_apk_file_name = M.get_apk_file_name pkg.get_apk_file_path = M.get_apk_file_path pkg.apk_file_exists = M.apk_file_exists + pkg.arch_enabled = M.arch_enabled end return M |