pacman/lib/libalpm
morganamilo 2b4c022925
libalpm: add iterator interface for syncdb files
This commit adds an iterator interface for reading files from the
syncdbs. Instead of using alpm_pkg_get_files(), you now get the files
from the database using alpm_db_files_open(), you then use
alpm_db_files_next() to iterate through the files for each package. If
you want to actually load the files from that package you then use
alpm_db_files_load().

This means alpm_pkg_get_files() will always return empty for syncdbs,
even on .files databases, however these functions still work on the
localdb and loaded packages.

This aproach is faster when dumping the entire file list but slower when
searching for a specific package.

The memory usage of pacman is drastically less. See below.

build/pacman -Fl        0.55s user 0.01s system 99% cpu 0.556 total
build/pacman -Fl pacman 0.46s user 0.01s system 99% cpu 0.472 total
build/pacman -Fx pacman 2.88s user 0.09s system 99% cpu 2.965 total

pacman -Fl              1.60s user 0.13s system 99% cpu 1.731 total
pacman -Fl pacman       0.24s user 0.04s system 99% cpu 0.283 total
pacman -Fx pacman       2.45s user 0.14s system 99% cpu 2.593 total

                         Peak Memory
build/pacman -Fl         43.52MB
build/pacman -Fl pacmam  11.292MB

pacman -Fl               677.048MB
pacman -Fl pacman        163.288MB
2021-10-06 08:18:55 +01:00
..
po Include az_AZ translation files 2021-09-04 18:02:39 +10:00
.gitignore libalpm: add pkg-config file 2012-04-25 20:02:36 -04:00
add.c Update copyright year 2021-03-01 12:22:20 +10:00
add.h Update copyright year 2021-03-01 12:22:20 +10:00
alpm.c skip servers with too many errors 2021-04-07 22:33:52 +10:00
alpm.h libalpm: add iterator interface for syncdb files 2021-10-06 08:18:55 +01:00
alpm_list.c Update copyright year 2021-03-01 12:22:20 +10:00
alpm_list.h libalpm: rename __foo tyes to _foo 2021-09-04 19:52:23 +10:00
backup.c Update copyright year 2021-03-01 12:22:20 +10:00
backup.h Update copyright year 2021-03-01 12:22:20 +10:00
base64.c base64.c: comment out unused variable 2014-01-15 15:54:56 +10:00
base64.h Do not #define _RESERVED_IDENTIFIERS 2016-09-25 18:04:57 +10:00
be_local.c Update copyright year 2021-03-01 12:22:20 +10:00
be_package.c Update copyright year 2021-03-01 12:22:20 +10:00
be_sync.c libalpm: add iterator interface for syncdb files 2021-10-06 08:18:55 +01:00
conflict.c Update copyright year 2021-03-01 12:22:20 +10:00
conflict.h Update copyright year 2021-03-01 12:22:20 +10:00
db.c libalpm: clone data on alpm_db_set_servers 2021-05-09 22:54:20 +10:00
db.h libalpm: add iterator interface for syncdb files 2021-10-06 08:18:55 +01:00
deps.c Update copyright year 2021-03-01 12:22:20 +10:00
deps.h Update copyright year 2021-03-01 12:22:20 +10:00
diskspace.c Update copyright year 2021-03-01 12:22:20 +10:00
diskspace.h libalpm: rename __foo tyes to _foo 2021-09-04 19:52:23 +10:00
dload.c Order downloads by descending max_size 2021-09-04 10:34:00 +10:00
dload.h libalpm: Give -U downloads a random .part name if needed 2021-09-04 10:33:51 +10:00
error.c libalpm: remove unused error value 2021-05-20 11:34:00 +10:00
filelist.c libalpm: add iterator interface for syncdb files 2021-10-06 08:18:55 +01:00
filelist.h libalpm: add iterator interface for syncdb files 2021-10-06 08:18:55 +01:00
graph.c Update copyright year 2021-03-01 12:22:20 +10:00
graph.h libalpm: rename __foo tyes to _foo 2021-09-04 19:52:23 +10:00
group.c Update copyright year 2021-03-01 12:22:20 +10:00
group.h Update copyright year 2021-03-01 12:22:20 +10:00
handle.c add front-end provided context to callbacks 2021-05-01 12:08:14 +10:00
handle.h libalpm: rename __foo tyes to _foo 2021-09-04 19:52:23 +10:00
hook.c Update copyright year 2021-03-01 12:22:20 +10:00
hook.h Update copyright year 2021-03-01 12:22:20 +10:00
libalpm.pc.in Update urls to not use www. for archlinux.org 2021-04-08 10:14:33 +10:00
libarchive-compat.h Update copyright year 2021-03-01 12:22:20 +10:00
log.c add front-end provided context to callbacks 2021-05-01 12:08:14 +10:00
log.h Update copyright year 2021-03-01 12:22:20 +10:00
meson.build Remove support for deltas from libalpm 2019-03-07 11:12:12 +10:00
package.c libalpm: add iterator interface for syncdb files 2021-10-06 08:18:55 +01:00
package.h libalpm: rename __foo tyes to _foo 2021-09-04 19:52:23 +10:00
pkghash.c Update copyright year 2021-03-01 12:22:20 +10:00
pkghash.h libalpm: rename __foo tyes to _foo 2021-09-04 19:52:23 +10:00
rawstr.c Remove all modelines from the project 2018-05-14 09:59:15 +10:00
remove.c Update copyright year 2021-03-01 12:22:20 +10:00
remove.h Update copyright year 2021-03-01 12:22:20 +10:00
signing.c _alpm_key_import: Initialise fetch_key 2021-09-05 09:58:18 +10:00
signing.h Update copyright year 2021-03-01 12:22:20 +10:00
sync.c Use attribute to declare case statement fallthroughs 2021-05-17 20:02:21 +10:00
sync.h Update copyright year 2021-03-01 12:22:20 +10:00
trans.c libalpm: add ALPM_TRANS_FLAG_NOHOOKS 2021-09-04 20:46:47 +10:00
trans.h libalpm: take alpm_trans_t out of the public API 2021-09-04 19:52:23 +10:00
util.c Fix build error when SIGPOLL is not available 2021-04-19 17:29:24 +10:00
util.h Update copyright year 2021-03-01 12:22:20 +10:00
version.c Update copyright year 2021-03-01 12:22:20 +10:00