summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMyungJoo Ham <myungjoo.ham@samsung.com>2017-04-05 19:27:00 +0900
committerMyungJoo Ham <myungjoo.ham@samsung.com>2017-04-05 20:21:58 +0900
commitde3601e3cdf6049b0f57f7e0ee4ccd2c5fd4d799 (patch)
tree66c8d00560dff62661e22d6d85e528b9bbf8a97b
parent2a2650627a62480b1453df7c9fee387f661f0357 (diff)
downloadbuilding-blocks-de3601e3cdf6049b0f57f7e0ee4ccd2c5fd4d799.tar.gz
building-blocks-de3601e3cdf6049b0f57f7e0ee4ccd2c5fd4d799.tar.bz2
building-blocks-de3601e3cdf6049b0f57f7e0ee4ccd2c5fd4d799.zip
Main: .ks inclusion fix
1. A missing .ks won't create build errors. 2. KS package lists uses "-" to denote that the package is not included. Handle such syntax. Change-Id: I7c11201d1b2f30ffa427e25c2b078bbd8a891716 Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
-rw-r--r--packaging/building-blocks.spec28
1 files changed, 18 insertions, 10 deletions
diff --git a/packaging/building-blocks.spec b/packaging/building-blocks.spec
index 63159bd..2a91cfb 100644
--- a/packaging/building-blocks.spec
+++ b/packaging/building-blocks.spec
@@ -118,21 +118,29 @@ presets describing specific products.
# This script writes build-spec when building the build-spec itself. :)
# Importing .kg file with list_with_require() based on image-configuration will work
# after Tizen:Unified starts to generate its own platform images.
+
+# TODO1: How to interpret "- pkg"? just skip? or make it conflicted?
+# TODO2: How to handle "no file error"?
%define list_with_require() %{expand:%{lua:if posix.access(rpm.expand("%{SOURCE1001}"), "f") then \
local start = 0 \
- for line in io.lines(rpm.expand("%{1}")) do \
- if (string.match(line, '%%end')) then break end \
- if (string.match(line, '%%packages')) then \
- start = 1 \
- else \
- if (start == 1) then \
- if (string.match(line, '^#')) then \
- elseif (string.match(line, '^$')) then \
- else \
- print("Requires: "..line.."\\n") \
+ if posix.access(rpm.expand("%{1}")) then \
+ for line in io.lines(rpm.expand("%{1}")) do \
+ if (string.match(line, '%%end')) then break end \
+ if (string.match(line, '%%packages')) then \
+ start = 1 \
+ else \
+ if (start == 1) then \
+ if (string.match(line, '^#')) then \
+ elseif (string.match(line, '^-')) then \
+ elseif (string.match(line, '^$')) then \
+ else \
+ print("Requires: "..line.."\\n") \
+ end \
end \
end \
end \
+ else \
+ print("Requires: CANNOT_FIND_REQUIRED_FILES\\n") \
end \
end}}