aports.lua: implement foreach_aport()
This commit is contained in:
parent
0b605e179e
commit
fda6873c5a
10
aports.lua
10
aports.lua
|
@ -207,6 +207,16 @@ function Aports:foreach_pkg(pkg, f)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Aports:foreach_aport(f)
|
||||||
|
self:foreach(function(pkgname)
|
||||||
|
self:foreach_pkg(pkgname, function(i, pkg)
|
||||||
|
if pkgname == pkg.pkgname then
|
||||||
|
f(pkg)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
function new(repodirs)
|
function new(repodirs)
|
||||||
local h = Aports
|
local h = Aports
|
||||||
h.repodirs = repodirs
|
h.repodirs = repodirs
|
||||||
|
|
Loading…
Reference in New Issue