Commit Graph

22 Commits (d0edeec8fb8fa5abee8b3065cea5e4882d0c51c4)

Author SHA1 Message Date
Timo Teräs d0edeec8fb make the atom functions not use global state
This greatly helps with memory management on applications that
may want to daemonize and open/close database several times.

Also the lifetime and "owner" of memory for all data is now
explicitly bound to owning struct apk_database, which might
be helpful when writing language bindings. As side effect, the
interned "atoms" are unique only within what apk_database, so
comparing packages from different apk_database may not work
as expected.

Fixes #10697
2020-05-19 12:02:56 +03:00
TBK 5d796b5678 use SPDX-License-Identifier in source files 2020-05-07 10:45:42 +03:00
Timo Teräs 45d313c51c remove apk_time() as it is causing problems with shared objects
Instead, to make sure test mode produces same output, redefine
time() for the test mode binary.

Reverts parts of 0b82bcc53e.
2020-02-04 10:31:10 +02:00
Timo Teräs 0b82bcc53e lua: fix build and update to lua5.3
Fixes #8360
2019-12-30 16:17:14 +02:00
Kaarle Ritvanen 5c349335c7 db: separate init from open 2017-04-28 13:28:32 +03:00
Timo Teräs 22434a5ff0 lua: remove unused reg_apk_db_meta_methods 2016-07-22 10:11:04 +03:00
Dubiousjim ac7616b0a9 various: applet help text and comment fixes
Acked-by: Natanael Copa <ncopa@alpinelinux.org>
2013-06-28 13:45:41 +03:00
Timo Teräs 5b02400b26 lua: use apk_dep_analyze
and remove the now unused apk_dep_is_materialized_or_provided
which was superceded by apk_dep_analyze.
2013-06-15 19:48:30 +03:00
Natanael Copa f292a85867 lua: support for lua 5.2 2013-06-13 14:21:01 +00:00
Timo Teräs fd812dc722 lua: fix bindings, and build by default 2012-02-28 14:36:03 +02:00
Timo Teräs 00fd7b07f1 lua: fix compile error 2012-01-17 15:59:01 +02:00
Timo Teräs 1f9a36de68 db: support line feed as 'world' dependency separator
* default writing the world with spaces if a space is found
   (for backwards compatibility) for now
2012-01-12 14:33:29 +02:00
Natanael Copa bd0242e1de lua: adapt to new API
Use new apk_blob_pull_dep instead of the old apk_dep_from_blob
2011-10-20 12:46:13 +00:00
Natanael Copa 391cd01b41 lua: implement iterator with installed packages 2011-09-15 17:13:08 +00:00
Natanael Copa 9e60a72b92 lua: implement exists/is_installed
Tests whether given package string is installed
2011-09-15 17:13:08 +00:00
Natanael Copa c79302d973 lua: init fixes
- call apk_atom_init()
- if no open flag is specified, then default to read-only.
2011-09-15 17:13:08 +00:00
Natanael Copa 08533d74fa lua: implement who_owns 2011-09-15 17:13:07 +00:00
Natanael Copa 17b1e1aeca lua: open and close db 2011-09-15 17:13:07 +00:00
Natanael Copa d7374642c2 lua: initial db_open
so far we just parse the db options
2011-09-15 17:13:07 +00:00
Natanael Copa 21a213c212 lua: remove unneeded global vars 2011-09-14 14:28:36 +00:00
Natanael Copa 3cdee6a406 lua: typecast apk blob len
So we can build with -Werror
2011-09-14 14:14:22 +00:00
Natanael Copa 7aed449427 lua: initial lua module 2010-06-11 07:02:18 +00:00