diff options
author | Boris Nagaev <bnagaev@gmail.com> | 2015-12-23 21:41:59 (GMT) |
---|---|---|
committer | Boris Nagaev <bnagaev@gmail.com> | 2016-01-01 10:32:48 (GMT) |
commit | 6a9a889b4d3f9b68340d25df6f64829abe65843d (patch) | |
tree | 3f46574a15170432365346fcbd8107c3f2607d71 /tools/build-pkg.lua | |
parent | f9d83fe44b52eefe9f2453bcdcca5feaf3d651f6 (diff) | |
download | mxe-6a9a889b4d3f9b68340d25df6f64829abe65843d.zip mxe-6a9a889b4d3f9b68340d25df6f64829abe65843d.tar.gz mxe-6a9a889b4d3f9b68340d25df6f64829abe65843d.tar.bz2 |
build-pkg: check each item builds one package
Diffstat (limited to 'tools/build-pkg.lua')
-rwxr-xr-x | tools/build-pkg.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/build-pkg.lua b/tools/build-pkg.lua index 7895496..c6c0282 100755 --- a/tools/build-pkg.lua +++ b/tools/build-pkg.lua @@ -193,6 +193,11 @@ local function parseItem(item) return item:match("([^~]+)~([^~]+)") end +-- return item name from target and package +local function makeItem(target, package) + return target .. '~' .. package +end + -- return several tables describing packages for all targets -- * list of items -- * map from item to list of deps (which are also items) @@ -538,6 +543,19 @@ local function isBuilt(item, files) return false end +local function findForeignInstalls(item, files) + for _, file in ipairs(files) do + local pattern = 'usr/([^/]+)/installed/([^/]+)' + local t, p = file:match(pattern) + if t then + local item1 = makeItem(t, p) + if item1 ~= item then + log('Item %s built item %s', item, item1) + end + end + end +end + -- script building HUGE_TIMES from MXE main log -- https://gist.github.com/starius/3ea9d953b0c30df88aa7 local HUGE_TIMES = { @@ -614,6 +632,7 @@ local function buildPackages(items, item2deps) for i, item in ipairs(items) do if not brokenDep(item) then local files = buildItem(item, item2deps, file2item) + findForeignInstalls(item, files) if isBuilt(item, files) then item2files[item] = files table.insert(unbroken, item) |