diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-12-13 14:51:29 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-12-13 14:51:29 +0000 |
commit | 1a1199b9ec509745a69eec147ea7b0fb3441894b (patch) | |
tree | e89888bada1cd65a49e54651472068a9d79e62df /ap.in | |
parent | ce0e95607d04e95b0d07a11aacbaaa4dae26bfd7 (diff) | |
download | abuild-1a1199b9ec509745a69eec147ea7b0fb3441894b.tar.gz abuild-1a1199b9ec509745a69eec147ea7b0fb3441894b.tar.bz2 abuild-1a1199b9ec509745a69eec147ea7b0fb3441894b.tar.xz abuild-1a1199b9ec509745a69eec147ea7b0fb3441894b.zip |
ap: bugfix in builddirs
Diffstat (limited to 'ap.in')
-rwxr-xr-x | ap.in | 29 |
1 files changed, 14 insertions, 15 deletions
@@ -66,9 +66,8 @@ subcmd.builddirs = { desc = "Print the build dirs for given packages in build order", usage = "PKG...", run = function(opts) - local i, _ + local i, p, _ local visited = {} - local dir_visited = {} local apkdb, rev = aports.init_apkdb(repodirs) local to_print = {} function recursdir(pn) @@ -78,23 +77,23 @@ subcmd.builddirs = { visited[pn] = true local i, p for i,p in pairs(apkdb[pn]) do - if not dir_visited[p.dir] then - dir_visited[p.dir] = true - local _, d - for _, d in pairs(p.depends) do - recursdir(d) - end - for _, d in pairs(p.makedepends) do - recursdir(d) - end - if to_print[pn] then - print(p.dir) - end + local _, d + for _, d in pairs(p.depends) do + recursdir(d) + end + for _, d in pairs(p.makedepends) do + recursdir(d) + end + if to_print[p.dir] then + print(p.dir) + to_print[p.dir] = nil end end end for i = 2, #opts do - to_print[opts[i]] = true + for _,p in pairs(apkdb[opts[i]]) do + to_print[p.dir] = true + end end for i = 2, #opts do recursdir(opts[i]) |