summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* common: compare value rather than pointer addressSami Kerola2013-09-04
| | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Allan McRae <allan@archlinux.org>
* Store fgetc output as an int.Allan McRae2013-08-21
| | | | | | | Bug exposed on ARM when char is unsigned resulting in the comparison to EOF always failing. Signed-off-by: Allan McRae <allan@archlinux.org>
* check.c: break backup file search loop after matchAndrew Gregory2013-08-21
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Do not refer to FlySpray numbersAllan McRae2013-08-21
| | | | | | | | These references to bug numbers assume we will forever be using that bug tracker. It is better to properly comment the code instead (which was done in almost all cases anyway). Signed-off-by: Allan McRae <allan@archlinux.org>
* ini.c: give recursion limit file scopeAndrew Gregory2013-08-21
| | | | | | | | | The recursion limit is an artificial limitation imposed to prevent memory exhaustion in a recursive function. Giving it file-level scope increases its visibility. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* ini.c: make errors in includes fatalAndrew Gregory2013-08-21
| | | | | | | | If an error in the main file would be fatal there is little reason to ignore the error in an included file. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* ini.c: reuse line bufferAndrew Gregory2013-08-21
| | | | | | | | By the time we make the recursive call we have already finished with the line buffer, making it safe to reuse. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* conf.c: extract ini parsing code to separate filesAndrew Gregory2013-08-21
| | | | | | | | Move _parseconfig to ini.c as _parse_ini and create a convenient wrapper for the public API. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* conf.c: pass _parse_directive as a callbackAndrew Gregory2013-08-21
| | | | | | | This will allow passing arbitrary key/value handlers. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* conf.c: move section handling out of _parseconfigAndrew Gregory2013-08-21
| | | | | | | | | _parseconfig now tracks the current section name directly so that the name stored in the section struct is just a pointer to the one stored by _parseconfig. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* conf.c: move directive parsing out of _parseconfigAndrew Gregory2013-08-21
| | | | | | | Include directives no longer have to be within a section. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* conf.c: move repo parsing out of _parseconfigAndrew Gregory2013-08-21
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* conf.c: add parse_options to section_tAndrew Gregory2013-08-21
| | | | | | | This consolidates all of our state information into a single variable. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Report missing directory if we can not initialise alpm libraryAllan McRae2013-07-30
| | | | | | | | | | | | | When pacman failed to initialise the alpm library due to the database directory being missing (either via the root not existing or the database directory itself not existing), it just printed the non-informative message "could not find or read directory". Add the directory information the the error output. E.g.: error: failed to initialize alpm library (could not find or read directory: /this/does/not/exist/var/lib/pacman/) Signed-off-by: Allan McRae <allan@archlinux.org>
* Warn when directory ownership differs between filesystem and packageAllan McRae2013-07-30
| | | | | | | | | | | | | We currently only warn if a directory's permissions differ, but using -Qkk on my system shows that directory permissions tend to change in packages reasonably frequently without notice. Provide a warning in such cases so that it can be altered. Example output: (1/1) reinstalling nginx warning: directory ownership differs on /var/lib/nginx/proxy/ filesystem: 33:0 package: 0:0 Signed-off-by: Allan McRae <allan@archlinux.org>
* Only note backup file changes with -QkkAllan McRae2013-07-30
| | | | | | | | Backup files are expected to be changed and should not be flagged by -Qkk. Note changed back-up files in -Qkk but do not count them as altered. Do not report backup files in -Qqkk. Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix whitespace in pacsort.c and pactree.cJason St. John2013-07-30
| | | | | | | | Replace spaces with tabs. Remove extra spaces. Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
* Corrected return codes for Sg flagAshley Whetter2013-07-22
| | | | | | | | Non-zero is now returned if a group is searched for that doesn't exist. Fixes FS#36097. Signed-off-by: Ashley Whetter <awhetter.2011@my.bristol.ac.uk> Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix typoAllan McRae2013-07-22
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* clarified descriptions for pactree -r (--help)Zulker Nayeen Nahiyan2013-07-22
| | | | | Signed-off-by: Zulker Nayeen Nahiyan <nahiyan02@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Clarify inter-conflicts messageAllan McRae2013-07-22
| | | | | | | Use a clear message rather than using a made up word to describe what we are doing. Signed-off-by: Allan McRae <allan@archlinux.org>
* Update gitignore files for use with autoreconfAllan McRae2013-07-22
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove autotools filesAllan McRae2013-07-22
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* do not check error from close(2)Dave Reisner2013-07-05
| | | | | | | | | | | | | | | 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>
* Consolidate and improve table implementationsSimon Gomizelj2013-07-05
| | | | | | | | | | | | | | | | 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>
* query_fileowner: resolve trailing . or .. in pathsAndrew Gregory2013-06-26
| | | | | | | | | 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>
* query_fileowner: remove useless path variableAndrew Gregory2013-06-26
| | | | | | | | 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>
* query_group: allow package filtersAndrew Gregory2013-06-26
| | | | | | | | | 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>
* skip unknown repo names for pacman -SlAndrew Gregory2013-06-26
| | | | | | | 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>
* Make --unrequired filter packages that are optdep as wellOlivier Brunel2013-06-26
| | | | | | | 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>
* Merge branch 'maint'Allan McRae2013-06-18
|\
| * Pull translation updatesAllan McRae2013-06-18
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | die if '-' is given with empty stdinAndrew Gregory2013-06-06
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'maint'Allan McRae2013-06-06
|\|
| * Pull translation updates and regenerateAllan McRae2013-06-06
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | query_fileowner: remove symlink supportAndrew Gregory2013-06-03
| | | | | | | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | Clean partial downloads from cacheAllan McRae2013-05-29
| | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'maint'Allan McRae2013-05-07
|\|
| * More translation updatesAllan McRae2013-05-07
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * pacman/util.c: add missing bracesAndrew Gregory2013-05-07
| | | | | | | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
| * pacman/util.c: fix output flushing in questionsAndrew Gregory2013-05-07
| | | | | | | | | | | | | | | | | | 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>
| * Pull translation updates from transifexAllan McRae2013-04-30
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Fix spelling errors using 'codespell' toolAnatol Pomozov2013-04-18
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * Rework callback message to add translationAllan McRae2013-04-11
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * pacman: add -Qkk to usage() helpAndrew Gregory2013-04-09
| | | | | | | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
| * ctypes.h shouldn't be included twiceSimon Gomizelj2013-04-06
| | | | | | | | | | | | | | Earnestly spotted this on #archlinux. Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
| * use off_t for table_row_t.sizeAndrew Gregory2013-04-06
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Remove ALPM_QUESTION_LOCAL_NEWERConnor Behan2013-04-24
| | | | | | | | | | | | | | | | | | 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>
* | Unify front and backend responses for --printConnor Behan2013-04-18
|/ | | | | | | | | | | | | 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>
* Update translations from transifexAllan McRae2013-04-01
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>