summaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2013-07-22Update gitignore files for use with autoreconfAllan McRae1-1/+9
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-07-22Remove autotools filesAllan McRae1-444/+0
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-07-05do not check error from close(2)Dave Reisner1-4/+1
On operating systems we support, the behavior is always such that the kernel will do the right thing as far as invalidating the file descriptor, regardless of the eventual return value. Therefore, potentially looping and calling close multiple times is wrong. At best, we call close again on an invalid FD and throw a spurious EBADF error. At worst, we might close an FD which doesn't belong to us when a multi-threaded application opens its own file descriptor between iterations of the loop. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-07-05Consolidate and improve table implementationsSimon Gomizelj1-115/+122
Implement both the VerbosePkgList and the summary message with the same table. Improve VerbosePkgList by caching attributes and cell's lengths instead of recaculating them. Right align every cell that containing a file size in both the VerbosePkgList and the summary. Simplify the printf statements and the alignment application. Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-26query_fileowner: resolve trailing . or .. in pathsAndrew Gregory1-1/+1
The full path needs to resolved any time it ends with "." or "..", not just when those are the entire path. This allows strange-but-valid paths such as: "/home/." to be queried. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-26query_fileowner: remove useless path variableAndrew Gregory1-27/+3
We no longer need it for resolving package files and using it to resolve root is unnecessary as alpm does that for us. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-26query_group: allow package filtersAndrew Gregory1-41/+47
Relocated query_group() to allow calling filter(). Fixes FS#19716 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-26skip unknown repo names for pacman -SlAndrew Gregory1-3/+3
Brings pacman -Sl behavior in line with other listing operations. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-26Make --unrequired filter packages that are optdep as wellOlivier Brunel2-5/+11
Specify it twice to only filter direct dependencies. Signed-off-by: Olivier Brunel <i.am.jack.mail@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-18Merge branch 'maint'Allan McRae13-196/+251
2013-06-18Pull translation updatesAllan McRae13-196/+251
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-06die if '-' is given with empty stdinAndrew Gregory1-0/+8
Several operations default to all packages/repos/etc if no targets are provided. If a user provides '-' they almost certainly expect there to be targets on stdin and will be surprised if pacman falls back to the default because there are none. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-06Merge branch 'maint'Allan McRae38-236/+251
2013-06-06Pull translation updates and regenerateAllan McRae38-236/+251
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-03query_fileowner: remove symlink supportAndrew Gregory1-73/+64
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-05-29Clean partial downloads from cacheAllan McRae1-3/+1
When using "pacman -Sc" to clean the cache, it make sense to also remove partially downloaded files. Fixes FS#34317. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-05-07Merge branch 'maint'Allan McRae42-1149/+1377
2013-05-07More translation updatesAllan McRae37-669/+735
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-05-07pacman/util.c: add missing bracesAndrew Gregory1-1/+2
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-05-07pacman/util.c: fix output flushing in questionsAndrew Gregory1-3/+3
Flush stream before taking input in select_question() and only flush once during question(). Also fix some tabs inside related fprintf statements. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-04-30Pull translation updates from transifexAllan McRae38-650/+812
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-04-24Remove ALPM_QUESTION_LOCAL_NEWERConnor Behan1-9/+0
Remove a question that hasn't been used since the 3.0 days. To prevent us from having an ugly enum of questions that is missing a bitmask, this changes the API of the hidden --ask option. Signed-off-by: Connor Behan <connor.behan@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-04-18Unify front and backend responses for --printConnor Behan1-0/+5
When libalpm asks the user a question, there are two possible defaults. One default for pacman (used when the user presses enter without typing and for --noconfirm) and the libalpm default. Currently the libalpm default gets used for the pacman "--print" option. This affects the printing of ignored packages since the defaults differ for "ALPM_QUESTION_INSTALL_IGNOREPKG". Adjust the response of this case when using --print so pacman acts consistently. Signed-off-by: Connor Behan <connor.behan@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-04-18Fix spelling errors using 'codespell' toolAnatol Pomozov3-8/+8
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-04-11Rework callback message to add translationAllan McRae1-5/+5
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-04-09pacman: add -Qkk to usage() helpAndrew Gregory1-1/+1
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-04-06ctypes.h shouldn't be included twiceSimon Gomizelj1-1/+0
Earnestly spotted this on #archlinux. Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-04-06use off_t for table_row_t.sizeAndrew Gregory1-2/+2
size went from off_t in _display_targets to int in add_transaction_sizes and back to off_t in humanize_size leading to potential overflows. Fixes FS#34616. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-04-01Update translations from transifexAllan McRae38-895/+909
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-31pm_asprintf logs 'failed to allocate' alreadySimon Gomizelj1-1/+0
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-30use default foreground color instead of whiteAndrew Gregory1-2/+4
Using white made important text invisible on terminals with white backgrounds. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-26signature_display should also be colourizedSimon Gomizelj1-1/+1
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-17More translation updatingAllan McRae39-2650/+5352
Pull updates from transifex. Add new "id" translation. Regerate po files with updated filelists... Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-17Update POTFILES.in for libalpm and pacmanAllan McRae1-0/+4
Be complete with files listed. Comment out files where code is used or heavily based on other projects so will never have translatable strings. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-15Fix typoAllan McRae37-37/+37
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-15Merge updates from TransifexAllan McRae37-758/+707
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-15Remove Indonesian translationAllan McRae2-1207/+0
I imported this translation from transifex without realising that there was no strings translated despite being "acitve" on transifex for quite some time. Remove it until translation begins... Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-14update util-common.h copyright yearAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-14Make "[removal]" translatableAllan McRae1-2/+2
Fixes FS#34241 Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-14Use C locale when parsing UseDelta floating point valuesDan McGee1-0/+9
We should save the current locale, use the 'C' locale during parsing, then restore the original locale. Config files should always parse regardless of the current user's locale setting. Fixes FS#34253. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10Update all translations files to push to TransifexAllan McRae38-4837/+10267
Run update-po and fix the few errors reported. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10Remove all leading :: from pacman translationsAllan McRae37-1407/+1407
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10Pull updated translations from transifexAllan McRae27-3476/+1557
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10Add new languages from TransifexAllan McRae11-0/+11504
Languages: eo, nl, hr, ko, ja, fa, ar, sl, gl, id Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10testdb: quote output substitutionsAndrew Gregory1-6/+6
Quoting output substitutions makes whitespace errors such as FS#30101 much more obvious: old: missing perl-test-pod dependency for perl-test-output new: missing 'perl-test-pod ' dependency for 'perl-test-output' Several of the quoted substitutions should not be capable of containing whitespace in theory, but this errs on the side of caution as the point of the tool is to find error conditions. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10testdb: pass empty local pkglist to alpm_checkdepsAndrew Gregory1-1/+1
Passing the local package list to alpm_checkdeps as both the local packages and packages to be upgraded did nothing but cause extra overhead as the packages were all removed from the installed package list because they were being upgraded. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10make status/log messages reflect version changeSimon Gomizelj1-0/+30
Currently pacman either prints 'adding' or 'upgrading' when installing a package. This make pacman print and log the other possible actions: 'downgrade' and 'reinstall' Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-10remove the duplicate strnlen and strndupSimon Gomizelj1-22/+0
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07colourize -QSimon Gomizelj1-1/+3
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-07colourize -Sl/-QlSimon Gomizelj2-7/+6
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>