Commit Graph

21 Commits

Author SHA1 Message Date
Martchus 1376a01570 Allow fetching official PKGBUILDs from GitLab
The old approach of using a local checkout does not work anymore
after the Git migration. One could use
`pkgctl repo clone --universe` to get a similar checkout but this
takes ages on my server. So let's better just download the
individual sources as needed, similar to how it is done for AUR
packages.
2023-05-28 23:43:13 +02:00
Martchus 809bafa6ee Log "Loading …" message when reloading DBs also without force-flag 2022-11-01 14:35:00 +01:00
Martchus 68d67f543f Refactor to optimize deserialization of base-data
* Break backwards compatibility
* Allow to deserialize only base-data of packages and build
  actions to potentially speed up showing tables
* Speed up package search in many cases by only deserializing
  base-data (unless details are actually wanted)
2022-05-31 19:04:57 +02:00
Martchus 26caa78956 Reduce memory usage when loading packages
* Avoid creation of map with all archive contents; instead parse packages
  while walking though the archive
* Avoid instantiation of std::string in come cases (using std::string_view)
* Reuse libarchive's archive entry when walking though archive
* Use visitor-based database parser in all places to avoid intermediate big
  array with all package objects
2022-04-20 22:47:10 +02:00
Martchus 7ade757c8d Avoid locking whole config when updating DBs
* Only lock the config for writing the reloading the config file
* Make sure all write operations to the database acquire an "update mutex"
  to ensure only one write operation happens at a time
* Do *not* acquire any additional locks when reading from a database as it
  should be safe to do so even when a write operation happens because
    * LMDB read and write transactions can happen at the same time
    * The package cache has its own mutex anyways
    * Write ops to the package cache try to lock the "update mutex" to
      prevent writing "old" data to the cache during updates
* Make "lastUpdate" atomic to avoid locking the config when accessing it
2022-03-05 18:55:52 +01:00
Martchus afc61bcad6 Speed up AUR updates using `PackageUpdater` 2022-03-05 16:10:33 +01:00
Martchus 382169ab6e Fix varoius build action related problems
* Fix crashes in some situations
* Fix aborting reloading library dependencies
2022-02-22 22:49:40 +01:00
Martchus bdbfd42e5e Avoid package object being reused after 3d7310af3 2022-02-20 19:50:44 +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 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 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 2ffa6629c8 lmdb: Use lmdb to store packages and dependency indices 2022-01-18 21:50:53 +01:00
Martchus 1ce736d66f Fix passing the body limit to nested `cachePackages()` calls 2021-07-25 01:25:30 +02:00
Martchus e0a913b16c Apply clang-format 2021-07-13 00:41:49 +02:00
Martchus c05a581322 Increase the max. download size for packages and allow configuring it 2021-07-12 15:00:43 +02:00
Martchus 80c99cb179 Support receiving a body as well when handling chunks individually 2021-04-14 17:56:29 +02:00
Martchus da9ddc2079 Apply clang-format 2021-04-14 17:56:29 +02:00
Martchus e47edcc09e Allow live-streaming via CLI 2021-04-12 14:03:47 +02:00
Martchus bfbde3f957 Refactor client code 2021-03-27 19:55:24 +01:00
Martchus fa969270c1 Fix warnings 2021-03-22 15:08:41 +01:00
Martchus c1554f4c87 Initial import 2021-02-08 23:53:56 +01:00