summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Print package name before changelog entry with -QcSimon Gomizelj2012-12-14
| | | | | | | Fixes FS#32362 Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* query.c: simplify is_foreignAndrew Gregory2012-12-14
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Plug various minor memory leaksAndrew Gregory2012-12-14
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Display install status of optdependenciesAllan McRae2012-12-14
| | | | | | | | | When a packages (new) optdepends are printed in install (update), add a note of their current installation status. Packages currently installed are labelled with [installed] and packages to be installed in this transaction are labelled [pending]. Signed-off-by: Allan McRae <allan@archlinux.org>
* Add "Optional for" to package information outputAllan McRae2012-12-14
| | | | | | | | | Much like packages that require a give package are displayed in the "Required by" field of its information output, alos display packages that optionally require the package. Inspired-by: Benedikt Morbach <benedikt.morbach@googlemail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Display optdep install status in package query outputAllan McRae2012-12-14
| | | | | | | Indicate which optional dependencies are installed when viewing local package information (-Qi). Signed-off-by: Allan McRae <allan@archlinux.org>
* Notify of removed package required as optdependAllan McRae2012-12-14
| | | | | | | When a package is being removed, provide a notification (via a callback) if any local package requires it as an optdepend. Signed-off-by: Allan McRae <allan@archlinux.org>
* pactree: unindent first limbAndrew Gregory2012-11-27
| | | | | | | | Removing the leader for the toplevel package shifted the name left but not it's limb. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pactree: unify output between utf8 and asciiDave Reisner2012-11-27
| | | | | | | | | Ensure that both output formats have equal spacing, and therefore an equivalent layout. This change also removes the styling from the toplevel package being searched for. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* pactree: fix style violationsDave Reisner2012-11-27
| | | | | | | | Stick to c89 and avoid mixed code and declarations, and always brace block statements, even if they're only 1 line. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* pactree: autodetect and use unicode line drawing charactersDave Reisner2012-11-27
| | | | | | | | | | Add a compile time check for langinfo.h so that we can possibly use unicode line drawing characters if the current locale is supportive of them. This can be explicitly disabled at runtime with the use of a new switch: -a, --ascii. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* pactree: style last branch node differentlyAndrew Gregory2012-11-27
| | | | | | | | | | | | | | | | | Also removes the less helpful provides-specific branch tip. Old: New: |--pkg |--pkg +--dep1 provides dep5 |--dep1 provides dep5 | |--dep2 | `--dep2 |--dep3 `--dep3 |--dep4 `--dep4 [dreisner@archlinux.org: switch original suggestion of \-- to `--] Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* pactree: fix --sync getopt valueAndrew Gregory2012-11-27
| | | | | | | The long --sync options has apparently never worked. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman: add -n/--native filter to -QSimon Gomizelj2012-11-27
| | | | | Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* buildsys: eschew use of DEFS, prefer AM_CPPFLAGSDave Reisner2012-11-27
| | | | | | | This is redundant, and any usage of -D should belong to CPPFLAGS. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix thinko in configure.ac CFLAGS empty checkingDan McGee2012-11-27
| | | | | | | | | | Since commit d2669b47, CFLAGS specified on the command line haven't been respected at all, resulting in no optimization being applied to builds. This exposed one warning flag issue in some new code, which is also fixed here. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* Avoid interger overflow when calculating remaining line lengthAllan McRae2012-09-18
| | | | | | | | When the len and cidx were changed to size_t in a8a1b093, it was possible to have an integer overflow when a line ended right at the edge of the terminal width. Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix typo in documentationAllan McRae2012-09-18
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* query_fileowner, mdirname: add error checksAndrew Gregory2012-09-18
| | | | | | Also consolidates cleanup for query_fileowner. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* query_fileowner: remove assumption that root is "/"Andrew Gregory2012-09-18
| | | | | | | | Returning "/" from mdirname removes it as a special case which allows us to test it like any other directory. This corrects a false positive when querying a file in / and root is not set to /. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* query_fileowner: remove trailing '/' from targetsAndrew Gregory2012-09-18
| | | | | | | | Trailing '/' in paths causes lstat to dereference symlinks to directories which causes it to break even though the symlink is a valid target. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* query_fileowner: resolve root earlyAndrew Gregory2012-09-18
| | | | | | | | Resolving root early prevents later calls to realpath from having to do the work of actually resolving any symlinks in root. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* query_fileowner: remove resolve_path functionAndrew Gregory2012-09-18
| | | | | | | | resolve_path is a equivalent to calling realpath(path, NULL) except that the returned string is guaranteed to be PATH_MAX long. We never append to the returned string, so this is unnecessary. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* query_fileowner: break/continue pkgfile loopAndrew Gregory2012-09-18
| | | | | | | Break out of pkgfile loop on match or continue if the pkgfile path is too long. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* Move important information up in -Si outputAllan McRae2012-08-07
| | | | | | | | | Currently, the package description is printed at the end of the -Si output. This is probably one of the more important pieces of information so should be nearer the top. Also move the package architecture up. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* coding style fixesFlorian Pritz2012-08-07
| | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
* Allow cleaning only some cachedirsJan Alexander Steffens (heftig)2012-08-02
| | | | | | | | | | When cleaning the cache, ask for each cachedir separately. Allan: add some white space in output Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Clean up exclusion list in sync cache cleanupDan McGee2012-08-01
| | | | | | | | Make an array out of our various glob skip patterns and loop through them looking for items to skip. Additionally, when doing a full clean, delete all objects rather than respect this skip list. Signed-off-by: Dan McGee <dan@archlinux.org>
* Skip deltas and partial downloads in package cleanupDan McGee2012-08-01
| | | | | | This affects -Sc only, not -Scc. Signed-off-by: Dan McGee <dan@archlinux.org>
* pactree: show tree vertical "limbs"Andrew Gregory2012-08-01
| | | | | | | | | | | | | | | | | Showing vertical limbs makes the tree easier to follow. Old: New: |--pkg |--pkg |--dep1 |--dep1 |--dep2 | |--dep2 |--dep3 |--dep3 |--dep4 |--dep4 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> [Allan: fix shadow warning] Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* pactree: consolidate both walk_deps functionsAndrew Gregory2012-08-01
| | | | | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> [Allan: fix shadow warning] Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* pacman: be more descriptive when opening an include failsDave Reisner2012-07-10
| | | | | | | | if fopen returns NULL, append the libc strerror-ized error message to our own error message. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Allow leading "local/" in query operationsAllan McRae2012-06-25
| | | | | | | | | | | I find that when copying the output of "pacman -Qs foo" into a "pacman -Qi" operation to get more information on the packages, I consistently copy the "local/" prefix. It is a minor usability improvement to strip this if present. Dan: Pluck out LOCAL_PREFIX and magic numbers. Signed-off-by: Allan McRae <allan@archlinux.org>
* query: avoid false ownership matches for files in rootDave Reisner2012-06-25
| | | | | | | | | | | | | | | | Check for an exact match when querying ownership of files in the root. Previously, our test was too simple and would match the the basename of package files against the query parameter, e.g. $ pacman -Qo config /config is owned by cower-git 20120614-1 Adds a new test to verify this behavior, query007.py. Fixes FS#30388. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* pacman: support group selection delimited by commasDave Reisner2012-05-20
| | | | | | | | | We support multiple arguments being comma separated elsewhere, so this seems like a natural extension to support in our multiparse selection code. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Output "Packages" instead of "Targets"Allan McRae2012-04-29
| | | | | | | | | | Prefix the list of packages being installed/removed with "Packages" instead of "Targets" as they are package names by this stage. Fixes FS#23123. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* pacman/package.c: show checksums with -SiiDave Reisner2012-04-29
| | | | | | | | | These were removed entirely by f34864cc9e, but some people (myself included) still find them useful. Revive these details, but "demote" them, so that they're only displayed when extra sync data is requested. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* util/testdb: don't return crazy error valuesDan McGee2012-04-24
| | | | | | | | With some contrived examples, you could easily make testdb return a very high error count, which could easily overflow the 8-bit unsigned integer limit. Instead, simply return 1 or 0 based on whether errors were found. Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove SyncFirst optionDan McGee2012-04-12
| | | | | | | | | | | This has outlived its usefulness and causes more problems than it solves. It has historically only ever been used to install pacman first. That should not be needed given we provide the vercmp utility (which has no library dependencies) and so calling pacman in install scripts is a sign of poor packaging. Work-duplicated-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Various tweaks to support building with excessive GCC warning flagsDan McGee2012-04-08
| | | | | | | | | This fixes a bunch of small issues in order to enable a clean successful build with a crazy number of GCC warning flags. A lot of these changes are covered by -Wshadow, -Wformat-security, and -Wstrict-overflow=5. Signed-off-by: Dan McGee <dan@archlinux.org>
* buildsys: define warning CFLAGS in separate varDave Reisner2012-04-08
| | | | | | | Continue the trend of not touching the environment CFLAGS, ensuring that the user always has the final say. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* buildsys: use pkg-config for openssl detectionDave Reisner2012-04-08
| | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* Prefix alpm_pkgfrom_t members with ALPM_Allan McRae2012-04-07
| | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2012-04-07
|\ | | | | | | | | | | Conflicts: lib/libalpm/signing.c lib/libalpm/sync.c
| * Updates from TransifexDan McGee2012-04-07
| | | | | | | | | | | | | | This encompasses a few languages that have had changes since 4.0.2 available on Transifex. Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update all translation filesDan McGee2012-03-28
| | | | | | | | | | | | | | Pull updates from transifex, run update-po on all files, fix a few errors, and push them back to Transifex. Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman: show groups once with -SgPierre2012-04-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only displays groups that haven't appeared yet.. Previously 'pacman -Sg' iterated over syncs, printed every group. This change does not affect '-Sgg' which still orders by sync first. To reproduce, on a current Arch Linux with [extra] and [community]: $ pacman -Sg|sort|uniq -c|sort -n [...] 1 xorg-fonts 2 vim-plugins 2 xfce4-goodies Signed-off-by: Pierre <pierre@spotify.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Change table_display() to be staticDan McGee2012-03-16
| | | | | | | | | | | | It is only used inside util.c. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Reduce calls to getcolsDan McGee2012-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This dramatically improves upon a much older attempt in 2008 in commit ce3d70aa99ab86. We don't need to call it once per line we print unless there is a reasonable expectation of being able to resize the terminal mid-operation; this is really only the case during our callback progress bars. Some before and after numbers of ioctl() calls, gleaned from strace of the following operations (no targets to any of them to maximize the amount of output): pacman -Qii : 37768 -> 2616 (93.1% decrease) pacman -Qs : 2616 -> 4 (99.8%) pacman -Sii : 133036 -> 10926 (91.8%) pacman -Ss : 10926 -> 14 (99.9%) Obviously the search results are astounding; we only call getcols() once in the case of -Qs, and once per repo in the case of -Ss. For -Qii and -Sii we are still calling it once per package, but this is much better than once per line of info output. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Pass a file descriptor to getcols and flush_term_inputDan McGee2012-03-16
| | | | | | | | | | | | This makes these methods a bit more flexible. Signed-off-by: Dan McGee <dan@archlinux.org>