|
|
|
@ -531,6 +531,22 @@ local function checkFileList(files, item)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
local function removeEmptyDirs(item)
|
|
|
|
|
-- removing an empty dir can reveal another one (parent)
|
|
|
|
|
local go_on = true
|
|
|
|
|
while go_on do
|
|
|
|
|
go_on = false
|
|
|
|
|
local f = io.popen('find usr/* -empty -type d', 'r')
|
|
|
|
|
for dir in f:lines() do
|
|
|
|
|
log("Remove empty directory %s created by %s",
|
|
|
|
|
dir, item)
|
|
|
|
|
os.remove(dir)
|
|
|
|
|
go_on = true
|
|
|
|
|
end
|
|
|
|
|
f:close()
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- builds package, returns list of new files
|
|
|
|
|
local function buildItem(item, item2deps, file2item, item2index)
|
|
|
|
|
gitCheckout(itemToBranch(item), item2deps[item], item2index)
|
|
|
|
@ -557,6 +573,7 @@ local function buildItem(item, item2deps, file2item, item2index)
|
|
|
|
|
item, file, creator_item)
|
|
|
|
|
end
|
|
|
|
|
checkFileList(concatArrays(new_files, changed_files), item)
|
|
|
|
|
removeEmptyDirs(item)
|
|
|
|
|
return new_files
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|