summaryrefslogtreecommitdiff
path: root/lib/libalpm
Commit message (Collapse)AuthorAge
* extract_single_file: consolidate needbackup checksAndrew Gregory2015-01-21
| | | | | | We need to know if a file needs to be backed up for all extracted files. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* conf.c: use masks for siglevel inheritanceAndrew Gregory2015-01-21
| | | | | | | | This will allow pacman to parse its config file in a single pass and removes the need for the *_SET siglevels in alpm that were only required for pacman's siglevel inheritance. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* Merge branch 'maint'Allan McRae2015-01-21
|\
| * fix geometric growth in _alpm_greedy_growDaniel Micay2015-01-21
| | | | | | | | | | | | | | | | It was allocating the required size rather than the calculated new size, resulting in pathological incremental reallocations. Signed-off-by: Daniel Micay <danielmicay@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
| * be_local: fix _alpm_greedy_grow usageDaniel Micay2015-01-21
| | | | | | | | | | | | | | | | | | The files_size variable contains the current capacity (in bytes) and should not be used to calculate the next length increment. It only works because _alpm_greedy_grow currently results in incremental growth. Signed-off-by: Daniel Micay <danielmicay@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | initialize pointers passed to _alpm_pkg_dupAndrew Gregory2015-01-02
| | | | | | | | | | | | | | | | | | | | _alpm_pkg_dup leaves the destination pointer unaltered in case of fatal errors, so when commits 2f0ca00e and be4198b3 freed the pointer, they fixed a memory leak on non-fatal errors by replacing it with a segmentation fault on fatal errors. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | be_package.c: fix style violationAndrew Gregory2015-01-02
| | | | | | | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | Remove logically dead code in _alpm_local_db_writeAllan McRae2014-12-27
| | | | | | | | | | | | | | We can only get to cleanup: through fp being NULL due to fopen failing or normal execution when fclose is called. Signed-off-by: Allan McRae <allan@archlinux.org>
* | _alpm_run_chroot: only close working directory if it was openedAllan McRae2014-12-27
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | _alpm_db_add_pkgincache: free potential memory leakAllan McRae2014-12-27
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | Initialize memory to prevent issues when freeing on errorAllan McRae2014-12-27
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | _alpm_recursedeps: free memory on errorAllan McRae2014-12-27
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | apply_deltas: fix memory leak on errorAllan McRae2014-12-27
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | Merge branch 'maint'Allan McRae2014-12-27
|\|
| * fix duplication of package sha256sumAllan McRae2014-12-27
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | libalpm: Add accessors for the base fieldJohannes Löthberg2014-12-24
| | | | | | | | | | | | | | | | This commit adds the necessary accessor functions to get the PKGBASE of a package, forcing the desc file to be parsed. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | libalpm: Parse and write PKGBASEsJohannes Löthberg2014-12-24
| | | | | | | | | | | | | | | | | | | | This commit adds support to libalpm to parse the pkgbase present in packages .PKGINFO files, writing the PKGBASE to the %BASE% section of the local DBs desc files and for parsing it again when loading the local DB Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | mount_point_list: free memory on errorAllan McRae2014-12-24
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | conflict_new: free memory on errorAllan McRae2014-12-24
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | _alpm_runscriptlet: free memory on errorAllan McRae2014-12-24
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | add_fileconflict: free memory on errorAllan McRae2014-12-24
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | create_tempfile: fix memory leak on errorAllan McRae2014-12-24
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | _alpm_split_backup: free memory on errorAllan McRae2014-12-24
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | alpm_dep_from_string: free memory on errorAllan McRae2014-12-24
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | _alpm_conflict_dup: fix memory leak on errorAllan McRae2014-12-24
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | local_db_read: fix memory leak on errorAllan McRae2014-12-24
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | _alpm_db_new: free memory on errorAllan McRae2014-12-24
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | _alpm_db_get_pkgcache_hash: check for error when loading pkgcacheAllan McRae2014-12-24
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | _alpm_delta_parse: free memory on errorAllan McRae2014-12-24
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | _alpm_dep_dup: free memory on errorAllan McRae2014-12-24
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | build_payload: free memory on errorAllan McRae2014-12-24
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | depmiss_new: free memory on errorAllan McRae2014-12-24
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | _alpm_delta_dup: free memory on errorAllan McRae2014-12-24
|/ | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Use correct mode bits for the log file (0000 -> 0644)Evangelos Foutras2014-12-24
| | | | | | | 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>
* Update translations from transifexAllan McRae2014-12-19
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* remove.c: honor inverted patterns in noupgradeAndrew Gregory2014-12-18
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* add alpm_option_match_noupgradeAndrew Gregory2014-12-18
| | | | | | | 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>
* version: fix memory leak in early returnDave Reisner2014-11-19
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix translation error and remove empty po filesAllan McRae2014-11-19
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Update po files to send to TransifexAllan McRae2014-11-18
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Pull translation updates from TransifexAllan McRae2014-11-18
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Add alpm_option_match_noextractAllan McRae2014-11-18
| | | | | | This is useful for frontends testing whether a file is in NoExtract Signed-off-by: Allan McRae <allan@archlinux.org>
* extract_single_file: fix memory leak in error conditionAllan McRae2014-11-18
| | | | | | The memory assigned to checkfile was leaked in the error condition. Signed-off-by: Allan McRae <allan@archlinux.org>
* _alpm_backup_dup: fix memory leak in error caseAllan McRae2014-11-18
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove logging of NoExtract eventsAllan McRae2014-11-18
| | | | | | | 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>
* Fix crash when using external downloaderAllan McRae2014-11-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>
* dload: mark final_url as constChristian Hesse2014-10-19
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* dload: unlink file on filesize exceeded errorChristian Hesse2014-10-16
| | | | | | | | | | 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.
* dload: use better error message on exceeded file sizeChristian Hesse2014-10-16
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* be_sync: use effective URL for db file signature downloadChristian Hesse2014-10-16
| | | | | | | | | | | 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>