Commit Graph

175 Commits

Author SHA1 Message Date
Martchus 3d7310af30 lmdb: Get `std::shared_ptr` directly from iterator 2022-02-18 19:23:00 +01:00
Martchus 68c11be6bb Call `addDepsAndProvidesFromOtherPackage` *before* clearing existing packages 2022-02-16 19:54:21 +01:00
Martchus b3b396df5f Allow ignoring copying errors due to existing files when moving packages 2022-02-16 19:47:25 +01:00
Martchus 8949b5f3c1 Fix resetting running build actions on server startup 2022-02-16 19:17:29 +01:00
Martchus 557fd1a738 lmdb: Use lmdb to store build actions 2022-02-13 21:04:54 +01:00
Martchus 3c4f81bd55 lmdb: Declare use of lmdb on level of lmdb-safe 2022-02-05 21:52:20 +01:00
Martchus 4fbe3df095 Allow enabling Boost.Asio's support for using `io_uring`
It won't likely do much regarding file handling as code is currently still
using `boost::asio::posix::stream_descriptor` or Boost.Beast's file
handling (which uses blocking I/O). I suppose one needs to use the new file
API described here under "Asio 1.22.0 / Boost 1.78":
https://www.boost.org/doc/libs/1_78_0/doc/html/boost_asio/history.html
2022-02-05 20:31:11 +01:00
Martchus 9f0ff84bba lmdb: Update submodule 2022-02-04 17:57:22 +01:00
Martchus ff8b644221 Avoid redundant code in PackageUpdaterPrivate::submit() applying previous commit in all versions 2022-02-04 17:57:11 +01:00
Martchus e5a3b5f311 Fix accidentally removing dependency from index when already provided by existing package 2022-02-03 22:10:22 +01:00
Martchus e582d5f406 Remove useless blank line 2022-02-03 22:07:22 +01:00
Martchus 4ed645be94 Fix handling of head requests
* Fix condition for skipping
* Open destination file only if the request is not skipped (when doing a
  head request first)
2022-02-02 21:18:07 +01:00
Martchus 90379678ad Improve error handling when opening archive
* Treat an empty archive buffer/file as error as this should never happen
  and it is better to fail early than replacing existing data with nothing
* Query error message also when opening archive from file
2022-02-02 21:16:56 +01:00
Martchus d1d65dac80 Use `CacheRef(storage, entry)` c'tor as it is generally preferred
Passing any string here is more likely a mistake, see previous commit
2022-02-01 22:59:09 +01:00
Martchus 2a256e6ac1 Fix using dangling ref of package name as hash key 2022-02-01 22:57:13 +01:00
Martchus 3f9f5eae3f Avoid exceeding txn limit when pulling deps by avoiding recursion 2022-02-01 21:51:19 +01:00
Martchus bb9aaf7839 lmdb: Update subproject 2022-02-01 20:27:00 +01:00
Martchus 82eaae5d36 Remove unused object 2022-01-31 21:39:57 +01:00
Martchus 66f59fecb9 Make storing lib deps more efficient and allow for intermediate reads 2022-01-31 21:32:07 +01:00
Martchus 4b70682ab5 Fix querying package details by making corresponding function accessible 2022-01-31 21:32:07 +01:00
Martchus 162f56c5e3 Fix passing around different versions of PackageSpec
The way this is passed has gotten a bit inconsistent; let's just make it
compatible both ways.
2022-01-31 21:32:07 +01:00
Martchus 92f83fadb6 Fix/simplify move c'tor/assignment of Database 2022-01-31 20:48:02 +01:00
Martchus cca0db2d1f Install `main.js` 2022-01-30 22:37:50 +01:00
Martchus a0a1744611 lmdb: Update submodule 2022-01-30 22:37:31 +01:00
Martchus 3db350ce30 Fix finding bundled lmdb-safe when package config suffix is used 2022-01-30 22:03:28 +01:00
Martchus 43552dc9ae Fix triggering toolbar actions in Firefox 2022-01-30 21:40:35 +01:00
Martchus ac8976bf0b lmdb: Update submodule 2022-01-30 21:33:03 +01:00
Martchus eafa797262 lmdb: Avoid installing lmdb-safe when building it as part of this project
* Build lmdb-safe always as static library
* Disable install targets of lmdb-safe
2022-01-30 21:11:39 +01:00
Martchus ecf25ca260 lmdb: Build lmdb-safe as own CMake project/library 2022-01-30 01:28:03 +01:00
Martchus fa2ba49915 lmdb: Update subrepo 2022-01-26 00:47:25 +01:00
Martchus cd98c39c54 lmdb: Test clearing all packages 2022-01-26 00:47:12 +01:00
Martchus 0e61a726e1 Set `lastUpdate` to zero when clearing packages
Since reloading packages is now avoided clearing packages should not itself
count as update as it would prevent loading packages again.
2022-01-26 00:46:36 +01:00
Martchus 66d3e7b301 lmdb: Remove unused function 2022-01-26 00:44:07 +01:00
Martchus 45922b47ec lmdb: Allow configuring cache limit 2022-01-26 00:41:53 +01:00
Martchus d4d187463a Fix problems with global locks
* Aquire the mutex before setting `m_exclusivelyOwned = false`; otherwise
  it might be set after `lock()` has checked it but before `lock()` has
  entered `wait()` leading to a deadlock
* Check state again after `wait()` because it may also be unblocked
  "spuriously" so it isn't guaranteed that the state will have actually
  changed after unblocking
2022-01-25 22:49:20 +01:00
Martchus 218dfecf56 Avoid loading databases when modification date is <= last update
* Do HTTP head request first when loading database from mirror to avoid
  downloading the full database all the time
* Use the last modification date of the local database file because with
  the persistent storage even local database reloads became a bit expensive
2022-01-25 00:13:10 +01:00
Martchus fe09463b0a lmdb: Fix replacing existing packages when updating package via cache 2022-01-25 00:04:25 +01:00
Martchus 027358a340 lmdb: Update README 2022-01-25 00:03:22 +01:00
Martchus 300f74fb10 lmdb: Open LMDB file after restoring cache so DBs added from cache have the storage initialized 2022-01-25 00:01:59 +01:00
Martchus 5a66bdc8c2 Update README for JavaScript/xterm.js changes 2022-01-24 23:59:39 +01:00
Martchus ea00c9ca10 Update xterm.js to 4.16.0
* Update xterm.js to 4.16.0 and its search addon to 0.8.2
* Improve hack for using addon despite ES6 modules support still missing
2022-01-23 20:43:22 +01:00
Martchus 1c820fc2f6 lmdb: Fix storage initialization when config file cannot be loaded 2022-01-23 19:47:50 +01:00
Martchus 26f787fb42 lmdb: Do not make lmdb a public dependency as it is only used within libpkg 2022-01-23 19:47:28 +01:00
Martchus 2abc407c77 Use JavaScript modules 2022-01-23 19:46:57 +01:00
Martchus 1bb8a55169 lmdb: Update submodule 2022-01-22 19:20:29 +01:00
Martchus f088e54c61 lmdb: Use package cache when querying packages for dependencies
* Use package cache when querying packages for dependencies or library
  names
* Avoid manual instantiations of `std::shared_ptr<Package>`
2022-01-21 20:35:43 +01:00
Martchus fcdd4fa7b3 lmdb: Fix warning about type conversion 2022-01-21 20:29:52 +01:00
Martchus 9af3e4783f lmdb: Remove obsolete code 2022-01-21 20:29:25 +01:00
Martchus 7cdd472b0a lmdb: Update submodule 2022-01-20 23:34:15 +01:00
Martchus f73753792c lmdb: Use caching when finding package via ID 2022-01-20 23:33:02 +01:00