Commit Graph

23 Commits

Author SHA1 Message Date
Martchus c2d5e2f749 Use DB path when checking timestamps in repo cleanup
Otherwise it can break if files DBs are used.
2022-05-02 22:23:35 +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 4293eb92bf Ignore libs for cross-compilation when checking any packages for binaries
Not really generic yet (e.g. doesn't cover `aarch64-linux-gnu-glibc`) but
good enough for now.
2022-03-04 21:50:56 +01:00
Martchus c633eea607 Add any-packages containing binaries as problem when checking for errors 2022-03-03 23:08:14 +01:00
Martchus ff7f039519 Ensure problems of repos with different archs but the same name aren't mixed up 2022-02-22 22:50:51 +01:00
Martchus bdbfd42e5e Avoid package object being reused after 3d7310af3 2022-02-20 19:50:44 +01:00
Martchus b3b396df5f Allow ignoring copying errors due to existing files when moving packages 2022-02-16 19:47:25 +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 a93924bb3a Fix cleanup of signatures
* Record full path for the deletion of orphaned signatures
* Test for the existence of the signature symlink itself and not the target
  because the symlink target (in the any directory) might not exist anymore
  but the symlink should be removed in any case
2021-08-29 00:32:19 +02:00
Martchus 49aebdd8a5 Fix typos found via `codespell --skip .git -w` 2021-07-03 19:59:57 +02:00
Martchus 12050364c8 Handle signature cleanup alongside related package even if package symlink broken 2021-04-27 17:06:47 +02:00
Martchus ac7f38e8fa Do not access moved-from object in CleanRepository::run() 2021-03-16 15:36:57 +01:00
Martchus 9581716d8b Delete signature in the src repo when moving package 2021-03-16 15:16:03 +01:00
Martchus 307322ab11 Handle signatures when cleaning up repository 2021-03-15 19:22:28 +01:00
Martchus 45bf4fa234 Handle signature file when adding/removing/moving/checking/cleaning packages 2021-03-14 01:53:40 +01:00
Martchus cbfa8d8298 Use locks when checking/cleaning repository 2021-03-05 23:11:48 +01:00
Martchus 0760860c6d Log lock acquisitions/releases 2021-02-25 22:12:56 +01:00
Martchus b7f27cb0a0 Use locks to prevent multiple actions accessing the same db files and chroot dirs 2021-02-22 23:44:06 +01:00
Martchus 5127ca351f Allow ignoring certain dependencies/libraries when checking for problems 2021-02-08 23:54:03 +01:00
Martchus aa356944da Log process IDs of started sub processes 2021-02-08 23:54:02 +01:00
Martchus c1554f4c87 Initial import 2021-02-08 23:53:56 +01:00