summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Handle repo/pkg style arguments to sync repo file listingAllan McRae2015-07-15
| | | | | | | | Passing "-Fl pkg" will print the filelist for the first occurance of "pkg" in the sync repos. Other version of the package can be printed using "-Fl repo/pkg". Signed-off-by: Allan McRae <allan@archlinux.org>
* Add regex search option to sync database file searchingAllan McRae2015-07-15
| | | | | | e.g. pacman -Fsx kcm.*print.*\.so Signed-off-by: Allan McRae <allan@archlinux.org>
* Implement searching for a file in the sync databasesAllan McRae2015-07-15
| | | | | | | Locates all packages that contain the listed file e.g. pacman -Fs libpng.so Signed-off-by: Allan McRae <allan@archlinux.org>
* Implement listing files from sync packagesAllan McRae2015-07-15
| | | | | | | | Does the equivalent of the -Ql option for local packages e.g. pacman -Fl glibc Signed-off-by: Allan McRae <allan@archlinux.org>
* Implement locating file owner in sync files databaseAllan McRae2015-07-15
| | | | | | | Equivalent to -Qo but for packages in the sync database e.g. pacman -Fo /usr/bin/pacman Signed-off-by: Allan McRae <allan@archlinux.org>
* Prototype pacman files database operationsAllan McRae2015-07-15
| | | | | | | Add the -F/--files operations, -s/--sync support and nd provide dummy functions for -s/--search, -l/-list and -o/--owns. Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman: move database syncing to util.cAllan McRae2015-07-15
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Add pacman support for .files databasesAllan McRae2015-07-15
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix formatting in parsearg_upgradeAllan McRae2015-07-14
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Simplify sync_cleandbAllan McRae2015-07-14
| | | | | | | | 1) Remove checks for removing pre-tardb files 2) Remove the long redundant keep_used parameter 3) Fix pacman error due to removing .sig file along with database Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix overflow warningsAndrew Gregory2015-07-12
| | | | | | | Fix new warnings generated by gcc-5 about potential overflows. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Match providers when showing optdep install statusLukas Fleischer2015-06-20
| | | | | | | | | | Use alpm_find_satisfier() instead of alpm_db_get_pkg() when retrieving the install status of a package to make sure we spot providers as well. Fixes FS#36412 Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* util.c: table_display: Fix incorrect docstringJohannes Löthberg2015-06-20
| | | | | | | | Commit 7b8f8753 removed the title parameter but forgot to remove it from the docstring. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* 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>