From 6be5f55184e4fbb2800a708fdc038e85f04a6858 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Thu, 9 Jan 2014 09:07:04 +0000 Subject: pkg: implement arch_enabled() to test if package is relevant for current arch --- aports/pkg.lua | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit v1.2.3