summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2015-11-11Refactor strtrim functionSilvan Jegen1-9/+5
Signed-off-by: Silvan Jegen <s.jegen@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-11-11Use correct format specifiersRikard Falkeborn3-10/+10
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-11-04files_search: reset found for each targetAndrew Gregory1-1/+2
Otherwise any invalid targets following a successful match will not get an error message. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-11-04files_search: free compiled regexAndrew Gregory1-0/+3
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-11-04files: do not unnecessarily strdup targetsAndrew Gregory1-25/+10
Targets are never modified so we can just use the original copy. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-11-04files.c: add vim modelineAndrew Gregory1-1/+2
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-11-04add detail to broken dependency errorsAndrew Gregory2-6/+24
The difference between a sync target having an unmet dependency and breaking a dependency for an installed package is a common source of confusion. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-11-04add --quiet to -FhAndrew Gregory1-0/+1
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-11-03package.c: Fix incorrect buffersize and constant-foldingPierre Neidhardt1-4/+3
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-11-03Add -F --machinereadable optionFlorian Pritz3-6/+50
Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-27Align titles automatically in information displayPierre Neidhardt1-32/+141
Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-27Use ARRAYSIZE macro for non-string array size computationPierre Neidhardt4-3/+5
Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-21pacsort: clean up if errorRikard Falkeborn1-3/+8
* free memory * close open file Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-21pacsort: don't overwrite memory if realloc failsRikard Falkeborn1-4/+6
That makes it impossible to free it later. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-21pacsort: handle failing list_addRikard Falkeborn1-1/+5
Since it can fail, check the return value. If it fails, we need to free the memory of the object we wanted to add to the list. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-19Pluralize malloc failure stringAllan McRae1-1/+3
Not particularly useful in English (will always be plural), but useful in languages that have multiple plural forms. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-18package.c: Comment stylePierre Neidhardt1-1/+1
Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-18Do not print any root prefix in files database operationsAllan McRae1-3/+25
Combining with the --root flag and outputing a consistent root prefix leads to many situations that make no sense. Instead, do not print any prefix for any --files operations. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-18package.c: Remove obsolete param from docPierre Neidhardt1-1/+0
Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-18pacman: add user hook directoriesAndrew Gregory4-0/+36
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-09-20move ini parser into commonAndrew Gregory4-146/+148
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-09-20move strtrim to util-commonAndrew Gregory6-77/+42
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-08-08copy assumeinstalled optionsAndrew Gregory1-1/+1
All other option setters copy their input. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-08-08pacman/util.c: Fix memory leak if realloc failsRikard Falkeborn1-2/+5
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-08-08Remove ko_KR translationAllan McRae2-1626/+0
The "ko_KR" locale is the same as the "ko" locale. Remove the "ko_KR" variant as it is incomplete and has been superseded by "ko" on transifex. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-07-20pacman/files.c: fix memory leak on regex errorAllan McRae1-0/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-07-15Handle repo/pkg style arguments to sync repo file listingAllan McRae1-2/+25
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>
2015-07-15Add regex search option to sync database file searchingAllan McRae3-8/+35
e.g. pacman -Fsx kcm.*print.*\.so Signed-off-by: Allan McRae <allan@archlinux.org>
2015-07-15Implement searching for a file in the sync databasesAllan McRae1-1/+63
Locates all packages that contain the listed file e.g. pacman -Fs libpng.so Signed-off-by: Allan McRae <allan@archlinux.org>
2015-07-15Implement listing files from sync packagesAllan McRae1-2/+36
Does the equivalent of the -Ql option for local packages e.g. pacman -Fl glibc Signed-off-by: Allan McRae <allan@archlinux.org>
2015-07-15Implement locating file owner in sync files databaseAllan McRae1-1/+53
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>
2015-07-15Prototype pacman files database operationsAllan McRae7-2/+158
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>
2015-07-15pacman: move database syncing to util.cAllan McRae3-32/+33
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-07-15Add pacman support for .files databasesAllan McRae2-3/+7
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-07-14Fix formatting in parsearg_upgradeAllan McRae1-4/+12
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-07-14Simplify sync_cleandbAllan McRae1-33/+12
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>
2015-07-12Fix overflow warningsAndrew Gregory2-6/+5
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>
2015-06-20Match providers when showing optdep install statusLukas Fleischer2-2/+4
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>
2015-06-20util.c: table_display: Fix incorrect docstringJohannes Löthberg1-1/+0
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>
2015-05-12Fix compilation if libarchive headers are not in standard locationCharles Duffy2-2/+4
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>
2015-05-12pacsort: fix warning about signed overflow potential during comparison.Andrew Gregory1-1/+1
Some crazy person assumed we would have fewer than INT_MAX columns. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-05-12Pluralize callback stringAllan McRae1-2/+3
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>
2015-03-15Actually return the error value of check_db_localCharles Pigott1-1/+1
Signed-off-by: Charles Pigott <charlespigott@googlemail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-03-03common: Avoid errors on systems that define strnlen but not strndupWill Miles1-1/+3
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>
2015-03-03util: Use util-common for strndup in pacsort and pactreeWill Miles5-46/+7
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>
2015-03-03sync_cleandb: ensure stat call succeedsAllan McRae1-1/+4
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-03-03pacsort: test string is not NULL before strlenAllan McRae1-1/+5
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-03-03Fix memory leaks in dump_pkg_fullAllan McRae1-0/+5
Leaks when using -Sii with package signatures Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-20Merge branch 'maint'Allan McRae27-443/+2243
2015-02-20Update translations from TransifexAllan McRae6-25/+28