Commit Graph

35 Commits

Author SHA1 Message Date
Martchus a43fec4868 Fix memory leak in archiving utilities 2024-03-07 00:29:43 +01:00
Martchus cc05267338 Allow parsing sub-variants of mingw-w64 packages
This might be useful for providing additional targets in the future. The
exact names of those sub-variants are still subject to change.
2024-02-18 15:54:58 +01:00
Martchus 91ee500b0a Show amended upstream version correctly 2023-09-03 22:09:28 +02:00
Martchus c377a9d6ca Fix typos 2023-06-18 22:50:28 +02:00
Martchus 671c45aae5 Re-use string holding file contents
This should reduce memory allocations while walking through an archive's
files.
2023-06-05 20:52:45 +02:00
Martchus bb8d875059 Apply clang-format 2023-04-07 19:15:50 +02:00
Martchus 2b0b495715 Add missing <cstdint> include 2023-04-07 17:52:21 +02:00
Martchus e02d4d449c Use `pubsetbuf` only with `libstdc++`
This usage of the function seems only to work as intended with that
standard lib. With `libc++` and the MSVC standard lib the call has no
effect.
2023-02-28 21:21:04 +01:00
Martchus 2e448b427b Consider libs under `…/lib/linux/…` Android-specific as well 2023-02-18 20:29:44 +01:00
Martchus 5feb95039e Parse conflicts and replaces of AUR packages retrieved via AUR RPC 2022-09-01 21:45:31 +02:00
Martchus ccf232a7a7 Parse provides of AUR packages retrieved via AUR RPC 2022-08-29 20:55:28 +02:00
Martchus c155176098 Fix missing build date in package search
* Avoid using buildDate of PackageInfo in favor of the same field in
  PackageBase
    * PackageInfo::buildDate should be removed on the next breaking change
* Do not really use the deprecated attribute because it is still used by
  (de)serialization code until it is removed for good
2022-06-08 22:44:58 +02:00
Martchus ecebf9fbde Fix showing arch of packages after optimization
* Move the binary package arch truly into the base package
2022-05-31 20:13:15 +02: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 5699895a37 Add extra prefix to static-compat libs to avoid confusion with normal libs 2022-05-01 22:21:21 +02:00
Martchus 0294bc241e Support static-compat package variant 2022-05-01 21:02:04 +02:00
Martchus 5c2f007589 Use auto consistently in PackageNameData 2022-05-01 20:56:38 +02:00
Martchus 6965d9b40b Pass package pointer by reference when parsing database file 2022-04-20 23:14:49 +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 1f3f0b0df1 Avoid high memory usage when reloading database
Especially when enabling files DBs it is quite problematic to store all
package objects of a database within one big array. This change avoids the
array and instead adds the packages directly. The disadvantage is that
clearing the database isn't as simple anymore.
2022-04-19 00:23:46 +02:00
Martchus af66549d87 Avoid possibly accessing packageCacheDirs when it is empty 2022-03-15 01:08:19 +01:00
Martchus 30e3d0343e Fix condition in `Package::isPkgInfoFileOrBinary()` 2022-03-10 23:04:18 +01:00
Martchus 1f3abd5596 Distinguish Android libs from GNU/Linux libs 2022-03-04 21:48:28 +01:00
Martchus 8e18b4747f Assume the filename as library name for ELF libraries without soname field 2022-03-03 23:00:16 +01:00
Martchus 6456273951 Fix early return for special handling of `mingw-w64-crt` 2022-03-03 22:43:31 +01:00
Martchus 22cfb4bb29 Use std::string_view when parsing pkg info 2022-02-25 23:08:12 +01:00
Martchus fd35aa0da6 Parse sources and size from pkg info 2022-02-25 23:07:55 +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 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 2ffa6629c8 lmdb: Use lmdb to store packages and dependency indices 2022-01-18 21:50:53 +01:00
Martchus 1cc8a3d6db Add warnings about missing DLLs to the build action's result 2021-08-28 15:06:24 +02:00
Martchus 2ad4a39aea Handle case when a split package overrides the archs from the base 2021-08-28 00:25:09 +02:00
Martchus 49aebdd8a5 Fix typos found via `codespell --skip .git -w` 2021-07-03 19:59:57 +02: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