summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Fix compilation if libarchive headers are not in standard locationCharles Duffy2015-05-12
| | | | | | | | | | | | | With commit 097d5a478b32, including alpm.h also drags in archive.h. Ensure the tools we build that depend on ALPM also include the necessary flags to find libarchive headers if they are not installed in a standard location. [Dan: Add commit message] Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsort: fix warning about signed overflow potential during comparison.Andrew Gregory2015-05-12
| | | | | | Some crazy person assumed we would have fewer than INT_MAX columns. Signed-off-by: Allan McRae <allan@archlinux.org>
* Pluralize callback stringAllan McRae2015-05-12
| | | | | | | In English, this string only has it plural form. However, we need to use the pluralized translation as some languages can have multiple plural formats. Signed-off-by: Allan McRae <allan@archlinux.org>
* Actually return the error value of check_db_localCharles Pigott2015-03-15
| | | | | Signed-off-by: Charles Pigott <charlespigott@googlemail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* common: Avoid errors on systems that define strnlen but not strndupWill Miles2015-03-03
| | | | | | | | Add a configure test for a system library supplied strnlen, and disable the embedded version in common if one is found. Signed-off-by: Will Miles <wmiles@sgl.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* util: Use util-common for strndup in pacsort and pactreeWill Miles2015-03-03
| | | | | | | | This small refactor reduces the number of replications of the local imeplementation of strndup. Signed-off-by: Will Miles <wmiles@sgl.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* sync_cleandb: ensure stat call succeedsAllan McRae2015-03-03
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsort: test string is not NULL before strlenAllan McRae2015-03-03
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix memory leaks in dump_pkg_fullAllan McRae2015-03-03
| | | | | | Leaks when using -Sii with package signatures Signed-off-by: Allan McRae <allan@archlinux.org>
* Merge branch 'maint'Allan McRae2015-02-20
|\
| * Update translations from TransifexAllan McRae2015-02-20
| |
| * Update translations from TransifexAllan McRae2015-02-14
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | Update copyright notices for 2015Allan McRae2015-02-01
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | remove support for .pacorig filesAndrew Gregory2015-01-21
| | | | | | | | | | | | | | | | Leave user files in place and save new config files with a .pacnew extension. This reduces the complexity of file extraction and respects the principle that pacman shouldn't modify files it didn't create. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* | ini.c: move error output into conf.cAndrew Gregory2015-01-21
| | | | | | | | | | | | | | Move the remaining output into conf.c by notifying the callback of read errors. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* | ini.c: remove useless key checkAndrew Gregory2015-01-21
| | | | | | | | | | | | | | key points to a statically allocated string so it can't be NULL and empty keys are rejected by the callback. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* | ini.c: remove empty section name restrictionAndrew Gregory2015-01-21
| | | | | | | | | | | | | | alpm will reject empty database names already. Reduces error handling in the ini parser. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* | ini.c: remove unnecessary helper functionAndrew Gregory2015-01-21
| | | | | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* | ini.c: move Include parsing to conf.cAndrew Gregory2015-01-21
| | | | | | | | | | | | | | Reduces the number of errors the ini parser must handle to make it more suitable for sharing with the backend. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* | ini.c: remove final callback callAndrew Gregory2015-01-21
| | | | | | | | | | | | | | Storing repo information removes the need for the final callback. This allows the call signature to be re-purposed for indicating read errors. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* | conf.c: parse config in a single passAndrew Gregory2015-01-21
| | | | | | | | | | | | Fixes FS#28255 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>
* | conf.c: store repo settings in dedicated structAndrew Gregory2015-01-21
| | | | | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* | Remove testdbAllan McRae2015-01-02
| | | | | | | | | | | | Replaced by pacman -Dk / -Dkk Signed-off-by: Allan McRae <allan@archlinux.org>
* | Integrate testdb into pacmanAllan McRae2015-01-02
| | | | | | | | | | | | | | | | | | | | | | | | The functionality of testdb is now available in pacman. pacman -Dk will check the local database for consistency, and pacman -Dkk will check the sync databases. Note that unlike testdb, you can not specify individual sync databases to check as sync databases act as a whole and not individually. A single database can be checked using an alternative pacman.conf file. Signed-off-by: Allan McRae <allan@archlinux.org>
* | Split install reason changing into its own functionAllan McRae2015-01-02
| | | | | | | | | | | | Prepare for other functions to be added to the --database option. Signed-off-by: Allan McRae <allan@archlinux.org>
* | Clarify "assume installed" error messageAllan McRae2014-12-28
| | | | | | | | | | | | | | | | The error message on failing to add an "assume installed" entry to the backend was not clear. Clarify by making "assume-installed" none translatable and adding a hyphen to match calling flag. Signed-off-by: Allan McRae <allan@archlinux.org>
* | pacsort: fix memory leakAllan McRae2014-12-27
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | pacman/util.c: fix potential memory leak in indentprintAllan McRae2014-12-24
| |
* | Fix memory leak in ALPM_EVENT_OPTDEP_REMOVAL callbackAllan McRae2014-12-24
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | Improve db upgrade error messageAllan McRae2014-12-24
|/ | | | | | This message is clearer without (another) error prefix. Signed-off-by: Allan McRae <allan@archlinux.org>
* Update translations from transifexAllan McRae2014-12-19
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* shut up GCC on -Wmaybe-initialized warningsDave Reisner2014-12-18
| | | | | | Admittedly, these are totally bogus, but a clean build is a happy build. Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix pointer declarations to be globally consistentMicah Saint Germain2014-12-18
| | | | | | | | | | | | Refactored inconsistent pointer declarations to better improve consistency throughout the pacman codebase which will, in turn, increase readability to the user. Expected format of a pointer declaration: `typename *varname` Signed-off-by: Micah Saint Germain <micah@lexme.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacsort: parse inputs up front into control structDave Reisner2014-11-20
| | | | | | | | | | | | | | | | | | | | | | This moves most of the parsing work out of the sorting path. The explode and splitfile functions now call input_new and append input_t structs to the list of sort candidates instead of raw strings. This lets us make smarter and easier decisions in the sorting callbacks, which are now also split into the version and file comparison methods for clarity. This fixes two bugs: 1) Incorrect ordering with filenames containing epoch in the pkgver 2) Incorrect ordering with package names which are substrings of each other (e.g. "systemd" and "systemd-sysvcompat"). Performance of the --files mode degrades slightly as a result of this change, but not unreasonably. Sorting with small inputs (5-10) doubles in runtime, but larger inputs (4000+) only increase by 20%. ref: https://bugs.archlinux.org/task/37631 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>
* Do not warn about missing files in NoExtractAllan McRae2014-11-18
| | | | | | When checking a packages files, ignore any missing files in NoExtract Signed-off-by: Allan McRae <allan@archlinux.org>
* Add --assume-installed to pacman --helpFlorian Pritz2014-11-05
| | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
* testdb: ignore ALPM_DB_VERSIONAndrew Gregory2014-10-19
| | | | | | | | Replaces the test for hidden files which appears to be leftover from 2e431e1cc before sync db checking was moved to a separate function. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman: add --confirm optionAndrew Gregory2014-10-13
| | | | | | | | | --confirm cancels the effect of a previous --noconfirm. This makes it easier for scripts to default to --noconfirm but allow users to override it. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Add --assume-installed optionFlorian Pritz2014-09-30
| | | | | | This allows to ignore specific dependencies. Signed-off-by: Florian Pritz <bluewind@xinu.at>
* table_display: only check width when non-zeroAndrew Gregory2014-09-30
| | | | | | | | A width of 0 indicates that either pacman is not attached to a tty or the user does not want line wrapping. Either way pacman should not fall back to the basic display. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* avoid line wrapping if not in a tty or COLUMNS=0Andrew Gregory2014-09-30
| | | | | | | Scripts that parse pacman's output (like pacsearch) generally do not want wrapped lines. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* Revert "Remove log_cb, add ALPM_EVENT_LOG instead"Andrew Gregory2014-09-30
| | | | | | | | | | | | | | | 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>
* pacman.c: Add -gg, -ii, and -yy to help summaryJohannes Löthberg2014-09-23
| | | | | | | | | | | | | The sync help summaries was missing the information about: * -gg: View all groups and members * -ii: View extended information * -yy: Force refresh even if DBs are up to date Fixes FS#41388. Original-work-by: Earnestly <zibeon@gmail.com> Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman: set SA_RESTART for signal handlerAndrew Gregory2014-09-23
| | | | | | | Calling a signal handler interrupts some functions, most notably read() and therefore fgets(). Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* wrap fgets to retry on EINTRAndrew Gregory2014-09-23
| | | | | | | | | | 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>
* sync.c: fix style violationsAndrew Gregory2014-08-04
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman.c: simplify stdin parsingAndrew Gregory2014-08-04
| | | | | | | | Incorporate memory exhaustion and end-of-stream checks into the main loop. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>