summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-06-21 13:54:24 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-06-21 23:57:11 +0200
commitcaf48a69e711af9728fbe161d23a5b078a8df05d (patch)
treeb18eec74f02d0d5e0735530d03b7f878c18f94a5
parentc11f855f1eb8bac1f22bb4eb36a9e10fe35ecab5 (diff)
downloadlua-aports-caf48a69e711af9728fbe161d23a5b078a8df05d.tar.bz2
lua-aports-caf48a69e711af9728fbe161d23a5b078a8df05d.tar.xz
db: fill pkg table in construction
-rw-r--r--aports/db.lua34
1 files changed, 17 insertions, 17 deletions
diff --git a/aports/db.lua b/aports/db.lua
index c4c870c..75d8498 100644
--- a/aports/db.lua
+++ b/aports/db.lua
@@ -54,26 +54,26 @@ local function split_apkbuild(line)
if line == nil then
return nil
end
- local r = {}
local dir, pkgname, pkgver, pkgrel, pkgdesc, arch, license, options, depends,
makedepends, checkdepends, subpackages, linguas, source, url =
string.match(line, string.rep("([^\\]*)", 14, "\\"))
- r.dir = dir
- r.pkgname = pkgname
- r.pkgver = pkgver
- r.pkgrel = pkgrel
- r.pkgdesc = pkgdesc
- r.license = license
- r.depends = split_deps(depends)
- r.makedepends = split_deps(makedepends)
- r.checkdepends = split_deps(checkdepends)
- r.linguas = split(linguas)
- r.subpackages = split_subpkgs(subpackages, r.linguas, pkgname)
- r.source = split(source)
- r.url = url
- r.arch = split_key(arch)
- r.options = split_key(options)
- return r
+ return {
+ dir = dir,
+ pkgname = pkgname,
+ pkgver = pkgver,
+ pkgrel = pkgrel,
+ pkgdesc = pkgdesc,
+ license = license,
+ depends = split_deps(depends),
+ makedepends = split_deps(makedepends),
+ checkdepends = split_deps(checkdepends),
+ linguas = split(linguas),
+ subpackages = split_subpkgs(subpackages, r.linguas, pkgname),
+ source = split(source),
+ url = url,
+ arch = split_key(arch),
+ options = split_key(options)
+ }
end
-- parse the APKBUILDs and return an iterator