aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-aports/0001-pkg-support-arch-arch-syntax.patch
blob: 65268483dae7a5d2618e6216dcf55fe9367df64a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From d2e111262470976b190d6f9aabed0ebf3afe2cb9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Mon, 25 Jul 2016 13:15:20 +0300
Subject: [PATCH] pkg: support arch="!arch" syntax

---
 aports/pkg.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/aports/pkg.lua b/aports/pkg.lua
index b99bf68..f21f352 100644
--- a/aports/pkg.lua
+++ b/aports/pkg.lua
@@ -91,7 +91,7 @@ function M.all_apks_exists(pkg)
 end
 
 function M.arch_enabled(pkg)
-	return pkg.arch.all or pkg.arch.noarch or pkg.arch[abuild.arch]
+	return not pkg.arch["!"..abuild.arch] and (pkg.arch.all or pkg.arch.noarch or pkg.arch[abuild.arch])
 end
 
 function M.libc_enabled(pkg)
-- 
2.9.3