summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
AgeCommit message (Collapse)AuthorFilesLines
2014-12-24mount_point_list: free memory on errorAllan McRae1-3/+3
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24conflict_new: free memory on errorAllan McRae1-2/+6
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24_alpm_runscriptlet: free memory on errorAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24add_fileconflict: free memory on errorAllan McRae1-0/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24create_tempfile: fix memory leak on errorAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24_alpm_split_backup: free memory on errorAllan McRae1-4/+3
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24alpm_dep_from_string: free memory on errorAllan McRae1-3/+7
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24_alpm_conflict_dup: fix memory leak on errorAllan McRae1-2/+6
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24local_db_read: fix memory leak on errorAllan McRae1-0/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24_alpm_db_new: free memory on errorAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24_alpm_db_get_pkgcache_hash: check for error when loading pkgcacheAllan McRae1-1/+4
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24_alpm_delta_parse: free memory on errorAllan McRae1-4/+8
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24_alpm_dep_dup: free memory on errorAllan McRae1-3/+7
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24build_payload: free memory on errorAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24depmiss_new: free memory on errorAllan McRae1-2/+6
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24_alpm_delta_dup: free memory on errorAllan McRae1-4/+8
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24Use correct mode bits for the log file (0000 -> 0644)Evangelos Foutras1-1/+1
Following commit 086bbc5 (Use O_CLOEXEC as much as possible when opening files), the log file would be created by pacman with blank permissions. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-19Update translations from transifexAllan McRae43-1495/+3156
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-18remove.c: honor inverted patterns in noupgradeAndrew Gregory1-2/+2
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-18add alpm_option_match_noupgradeAndrew Gregory2-0/+6
For parity with alpm_option_match_noextract. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-19version: fix memory leak in early returnDave Reisner1-1/+2
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-19Fix translation error and remove empty po filesAllan McRae4-1619/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-18Update po files to send to TransifexAllan McRae38-1238/+9332
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-18Pull translation updates from TransifexAllan McRae43-1039/+4446
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-18Add alpm_option_match_noextractAllan McRae2-0/+6
This is useful for frontends testing whether a file is in NoExtract Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-18extract_single_file: fix memory leak in error conditionAllan McRae1-1/+1
The memory assigned to checkfile was leaked in the error condition. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-18_alpm_backup_dup: fix memory leak in error caseAllan McRae1-2/+7
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-18Remove logging of NoExtract eventsAllan McRae1-2/+0
With globbing in NoExtract, these log events can quickly pile up hiding important information from the log. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-17Fix crash when using external downloaderAllan McRae1-4/+17
Commit 9d96bed9 attempts to use the same effective URL for the db and its signature download. However, this information is not available when we use an external downloader, resulting in a crash. Fall back to the old method when the effective URL is unavailable. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-10-19dload: mark final_url as constChristian Hesse3-7/+6
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-10-16dload: unlink file on filesize exceeded errorChristian Hesse1-0/+1
On filesize exceeded error pacman leaves a .part file in cache dir, resulting in this error on next try: error: failed to commit transaction (wrong or NULL argument passed) Errors occurred, no packages were upgraded. Unlink the file on error to avoid this.
2014-10-16dload: use better error message on exceeded file sizeChristian Hesse1-4/+2
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-10-16be_sync: use effective URL for db file signature downloadChristian Hesse1-4/+5
If download server is dynamic mirror chances are that db file download and db file signature download are redirected to different mirrors, resulting in invalid signature. This uses effective URL for db file signature download and makes the files always match. Signed-off-by: Christian Hesse <mail@eworm.de> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-10-13sync.c: download packages before starting commitAndrew Gregory3-3/+19
download_files sets the transaction state to STATE_DOWNLOADING. Modifying the state after it has already been set to STATE_COMMITTING created a brief window where SIGINT would fail to interrupt the process and caused interrupted downloads to result in a 'transaction started' message in the log with no matching transaction end. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-10-02alpm: Fix wrong xferred/total sizes when resuming downloadsOlivier Brunel1-1/+3
When a package is already partially downloaded in the cache, its download size will only be of what's left to be downloaded. Since pkg->download_size is what's used when calculating the total download size for the totaldl callback, same thing apply. However, the download progress callback was including this initial size, which would thus lead to invalid values (and percentage) used in frontends. That is, the progress bar could e.g. go further than 100% In the case of pacman, there is a sanity check for different historical reason (44a57c89), so before the possible "overflow" was noticed, the total download size/progress reported was wrong. Once caught, the TotalDownload option was ignored and it would use individual file download values as fallback instead. Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-10-01_alpm_key_in_keychain: cache known keysAndrew Gregory3-0/+14
Implements FS#38042 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-10-01check_keyring: skip keys known to be missingAndrew Gregory1-4/+3
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-10-01remove retry check from signature validationAndrew Gregory1-8/+2
The retry path was removed by 4ccf16dff589ce9f369d377bb5d3f490bd27c624 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-09-30Add --assume-installed optionFlorian Pritz4-2/+74
This allows to ignore specific dependencies. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-09-30libalpm: export alpm_splitdep as alpm_dep_from_depstring and alpm_dep_freeFlorian Pritz8-23/+32
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-09-30deps.c: split _alpm_depcmp into _alpm_depcmp_providesFlorian Pritz2-7/+15
This allows to reuse the provision checker for a simple list of provisions without a package. Signed-off-by: Florian Pritz <bluewind@xinu.at>
2014-09-30Revert "Remove log_cb, add ALPM_EVENT_LOG instead"Andrew Gregory4-30/+34
Moving logging to the event callback caused warnings under clang due to non-literal format strings and silenced all log messages when --print was used. This reverts commit cd793c5ab7689cc8cbc18277375b368060e5acfe. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Conflicts: lib/libalpm/alpm.h src/pacman/callback.c Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-23wrap fgets to retry on EINTRAndrew Gregory3-9/+10
The read() underlying fgets() can be interrupted by a signal handler causing fgets() to return NULL. Before we started handling SIGWINCH, the odds of interrupting a read were low and typically resulted in termination anyway. Replace all fgets calls with a wrapper that retries in EINTR. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-09-23alpm.h: remove outdated pkg_get_backup doxygenAndrew Gregory1-3/+0
alpm_pkg_get_backup hasn't returned strings since 54ef162a1a9e27e362732d873f0739bc0a2cf1bf in 2011. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-23Check the version of the local database during validationAllan McRae1-18/+11
When we check the database version directly, there is no longer a need to scan for depends files. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-23Add version file to empty local databaseAllan McRae1-12/+32
If a user manually creates the local database directory, or has an empty local database for some other reason, we silently add a version file Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-23Add version file when creating local database directoryAllan McRae1-0/+18
The version of the local pacman database is stored in its root in the file ALPM_DB_VERSION. The version is starting at 9, corresponding to the next libalpm library version. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-23Create local database directory if it is missingAllan McRae1-14/+26
This means that a missing local database becomes an error (as it should be immediately created). Note this only creates the "local" directory and not its parent, which is checked for during locking. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-16fix improper FREELIST callsAndrew Gregory2-3/+6
* conflicts need to be freed with alpm_conflict_free * sync dbs need to be unregistered and are handled by alpm_release Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-08-09Fix loading invalid packageOlivier Brunel1-1/+3
In 5acfa65f when adding a new variable (hit_mtree), the initialization of a variable (config) was dropped, which could lead to loading invalid package files, i.e. files that aren't archive (no metadata loaded) would return a new alpm_pkg_t with everything set to 0/NULL. Depending on the operation/use of the package, this could lead to segfault. Signed-off-by: Olivier Brunel <jjk@jjacky.com> Signed-off-by: Allan McRae <allan@archlinux.org>