summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
AgeCommit message (Collapse)AuthorFilesLines
2021-03-01Update copyright yearAllan McRae50-50/+50
Signed-off-by: Allan McRae <allan@archlinux.org>
2021-02-08doxygen: fix missing parameter nameEli Schwartz1-1/+1
This was raising a warning during the build. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2021-02-08support xattr when extracting packagesEli Schwartz1-0/+1
This permits storing the result of setcap during package() and applying the resulting capabilities to the installed program. Formerly, it was necessary to edit the binary after the fact (and thus dirty the file according to -Qkk) by using an install scriptlet. One problem that needs to be solved before this is useful, is preventing the strip routine from destroying xattrs. This is taken care of in the previous patch. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2021-01-21libalpm: fix total download reporting wrong totalmorganamilo1-9/+7
When a package does not need to be downloaded but a signature does, total download didn't count that towards the total. Signed-off-by: Allan McRae <allan@archlinux.org>
2021-01-19do not try to download an empty db listAndrew Gregory1-0/+4
Starting the download process, even if there is nothing to actually download, causes an error when pacman is built without curl and has no XferCommand defined (like our test suite). Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2021-01-19make alpm download config accessible without curlAndrew Gregory2-13/+2
Download-related config options are currently limited to builds with curl. This causes compilation errors when those options are used without an appropriate guard which often goes unnoticed because we all use curl. Front-ends providing their own download callback may also want to use these settings. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2021-01-19sighandler: initialize sigaction fieldsAndrew Gregory1-0/+2
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2021-01-19fully free error list in check_keyringAndrew Gregory1-1/+2
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2021-01-19plug memory leaks in _alpm_key_importAndrew Gregory1-1/+4
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2021-01-11doc: move missed sections from alpm_ to libalpm_Allan McRae1-19/+23
Signed-off-by: Allan McRae <allan@archlinux.org>
2021-01-09doc: reference all libalpm sections within libalpm man pageAllan McRae1-5/+10
Also, fix minor typo. Signed-off-by: Allan McRae <allan@archlinux.org>
2021-01-09doc: rename libalpm-list man page for consistencyAllan McRae1-1/+1
All other libalpm man pages are in the form libalpm_<name>. Signed-off-by: Allan McRae <allan@archlinux.org>
2021-01-08doc: change group names to libalpm_*morganamilo2-36/+23
Also change the group's title to point to the group's man page. This makes generated man pages be named libalpm_* which is more consistent with what library man pages are usually called. Signed-off-by: Allan McRae <allan@archlinux.org>
2021-01-08libalpm: const annotate struct db_operationsEmil Velikov2-2/+2
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2021-01-08libalpm: const annotate struct pkg_operationsEmil Velikov5-6/+6
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2021-01-08get_file_pkg_ops: update commentAllan McRae1-3/+2
2021-01-08libalpm: introduce get_sync_pkg_ops() helperEmil Velikov1-2/+17
Currently default_pkg_ops is accessed in two different ways. There is get_file_pkg_ops (in be_package.c) creating a local once-off 'tweaked' copy. As well as load_pkg_for_entry (be_sync.c) which modifies in-place and uses default_pkg_ops. This seems rather misleading and fragile approach. Introduce a helper for the second use-case so that default_pkg_ops is handled consistently and essentially remains unchanged throughout. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2021-01-08Remove unused SYMHIDDEN macrosEmil Velikov2-2/+0
The macro hasn't been used since 2007 with commit 7f7da2b5fc01f46d28236384540c7ecfdac16a63. Although it was still copied over into alpm_list.c an year or so later with commit ca1a1871 ("More cleanup to alpm_list") Just remove all instances of it. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2021-01-08libalpm: pass the number of packages being downloaded in totaldlcbmorganamilo2-2/+7
Signed-off-by: Allan McRae <allan@archlinux.org>
2021-01-08libalpm: don't use curl's deprecated functionsmorganamilo2-8/+7
This bumps the minimun curl version from 7.32.0 to 7.55.0. Signed-off-by: Allan McRae <allan@archlinux.org>
2021-01-08libalpm: remove useless ifmorganamilo1-4/+0
Signed-off-by: Allan McRae <allan@archlinux.org>
2021-01-03doc: fix typosmorganamilo1-9/+9
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-29Move hex_representation() to src/commonEmil Velikov1-24/+0
We'll reuse the function in pacman with a later commit. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-29Remove pre libarchive 3.0 codeEmil Velikov1-20/+0
Pacman has required libarchive 3.0 or later for quite some time mow. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-21doc: add extra documentation to the man pagemorganamilo2-2/+16
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-21doc: rename alpm_api group to alpmmorganamilo1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-21doc: move top level items into groupsmorganamilo1-2/+11
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-21doc: move alpm_api group to top of filemorganamilo1-5/+5
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-21doc: document optionsmorganamilo1-28/+564
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-21doc: document alpm_listmorganamilo2-255/+294
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-21doc: document miscmorganamilo1-15/+20
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-21doc: document transactionsmorganamilo1-12/+23
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-21doc: document files and groupsmorganamilo1-46/+56
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-21doc: document packagesmorganamilo1-68/+96
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-21doc: document loggingmorganamilo1-5/+20
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-21doc: document databasesmorganamilo1-219/+249
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-21doc: document callbacksmorganamilo1-168/+271
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-21doc: document dependsmorganamilo1-131/+164
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-21doc: document signaturesmorganamilo1-115/+167
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-21doc: document handlemorganamilo1-28/+30
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-21doc: document errormorganamilo1-13/+109
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-21doc: add doc header to alpm.hmorganamilo1-0/+12
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-21doc: remove stray doxygen commentmorganamilo1-2/+0
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-09Implement TotalDownload functionalityAnatol Pomozov1-5/+0
With the recent 'multibar' interface changes TotalDownload has been disabled. Now we have a new UI and we need to find another way to display this information. When 'TotalDownload' config option is enabled we are going to have an extra progress bar at the bottom of the screen that shows how much of the entire download has been completed. Closes FS#68202 Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2020-12-03libalpm: set ret in download filesmorganamilo1-2/+4
download_files never set ret on failiure, so even when downloading fails, the transaction goes on to commit and error out. :: Retrieving packages... python-packaging-20.4-4-any.pkg.tar.zst failed to download error: failed retrieving file 'python-packaging-20.4-4-any.pkg.tar.zst' from mirror.oldsql.cc : The requested URL returned error: 404 warning: failed to retrieve some files (1/1) checking keys in keyring (1/1) checking package integrity error: failed to commit transaction (wrong or NULL argument passed) Errors occurred, no packages were upgraded. Also make the ret checking more consistent. Signed-off-by: Allan McRae <allan@archlinux.org>
2020-11-26libalpm: add alpm_option_get_parallel_downloadsmorganamilo2-0/+12
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-11-26libalpm: set errno when setting parallel downloads with an invalid numbermorganamilo1-3/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2020-11-26libalpm: clarify alpm_download_event_completed_t statusmorganamilo1-3/+3
The comment makes it seem that the result itself is an error code. But all it does is simply return -1 to indicate an error occured; Signed-off-by: Allan McRae <allan@archlinux.org>
2020-11-26libalpm: don't call dlcb when not setmorganamilo1-2/+2
Fixes FS#68728: Signed-off-by: Allan McRae <allan@archlinux.org>
2020-11-26libalpm: set parallel_downloads to 1 when creating the handlemorganamilo1-0/+2
Fixes FS#68729 Signed-off-by: Allan McRae <allan@archlinux.org>