enable_colors: always set color strings

Only setting color strings when colors is true allowed subsequent
calls to enable colors but not disable them.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Consistently use 'directory' instead of 'folder'

Signed-off-by: Allan McRae <allan@archlinux.org>
pacman: use exit status 0 for --help and --version

The user requesting usage or version information is not an error.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Remove unneeded NULL check

Signed-off-by: Silvan Jegen <s.jegen@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Another unneeded NULL check removed

Signed-off-by: Silvan Jegen <s.jegen@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Another NULL check removed

Signed-off-by: Silvan Jegen <s.jegen@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Move NULL check before dereference

Signed-off-by: Silvan Jegen <s.jegen@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
local_db_populate: initialize empty pkgcache

If the db directory did not exist when local_db_populate was called, the
pkgcache wouldn't be initialized, causing pkghash_add_pkg to fail.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
dump_pkg_full: fix optionalfor memory leak

alpm_pkg_compute_optional returns a generated list that needs to be
free'd.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
sync_prepare: manually set pm_errno

_alpm_resolvedeps resets pm_errno to 0 by calling alpm_checkdeps.
Whenever the last call succeeded, pm_errno was not properly set,
preventing pacman from properly handling the error and leaking
additional memory.  We know pm_errno should be ALPM_ERR_UNSATISFIED_DEPS
if resolvedeps has failed, so just set it manually.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
_alpm_resolvedeps: free targ inside loop

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
table_display: free memory on errors

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Add PKGBUILD-vcs.proto

This PKGBUILD proto covers the newly introduced VCS capabilities of
pacman. It serves as a replacement for the current bzr, git, hg and svn
protos found in ABS.

Signed-off-by: Maxime Gauduin <alucryd@gmail.com>

[Allan: add to Makefile.am]
Signed-off-by: Allan McRae <allan@archlinux.org>
proto: Remove recommendation of "makepkg -g" in comments

This recommendation encouraged the practice of not checking the checksums
provided upstream.

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
makepkg.conf(5): Add missing backticks around vars, and use single quotes around "gpg" command

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
Remove ChangeLog.proto and move important info to PKGBUILD(5)

The change log prototype should be distribution determined.

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
makepkg.conf(5): Fix and improve grammar and spelling issues

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
pacsearch: Copyright year bump

Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
pacsearch: more accurate help message

Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
pacsearch: localized output

Signed-off-by: Pierre Neidhardt <ambrevar@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>