diff --git a/src/lua-apk.c b/src/lua-apk.c index eae78698d8bdbebcfc24789804ac52b45657f649..31987a67f34d5fe764269cc99d4880feae8ea11f 100644 --- a/src/lua-apk.c +++ b/src/lua-apk.c @@ -148,8 +148,11 @@ static int Papk_db_open(lua_State *L) memset(&opts, 0, sizeof(opts)); list_init(&opts.repository_list); + apk_atom_init(); if (lua_istable(L, 1)) get_dbopts(L, 1, &opts); + else + opts.open_flags |= APK_OPENF_READ; db = lua_newuserdata(L, sizeof(struct apk_database)); luaL_getmetatable(L, APKDB_META);