Update copyright year for 2013

Signed-off-by: Allan McRae <allan@archlinux.org>
parseopts: remove superfluous continue/shift statements

Fun fact about bash: the below is valid and will only ever print 'a'!

  fn() {
    continue 2
  }

  for x in {1..5}; do
    for y in {a..e}; do
      echo "$y"
      fn
    done
  done

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
util/pactree: correctly free the deps list in walk_deps()

If we are reversed, then we were correctly freeing both the list and the
contained data. However, we were leaking a list in the case of a
non-reversed traversal.

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
Use a defined constant in delta.c for num_matches

This allows compiling in both clang and gcc without running into
oddities regarding const vs. defined constant values.

Signed-off-by: Dan McGee <dan@archlinux.org>
pacdiff: color filename and mention what we found

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Allan McRae <allan@archlinux.org>
pacdiff: be more verbose if we rename or remove

Doesn't hurt and reassures the user that we did the right thing.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Allan McRae <allan@archlinux.org>
pacdiff: check cmp's exit code rather than output

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Allan McRae <allan@archlinux.org>
pacdiff: Add option to overwrite, clarify remove option

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Allan McRae <allan@archlinux.org>
pacdiff: update copyright notice

Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Allan McRae <allan@archlinux.org>
Remove Cygwin support

Signed-off-by: Allan McRae <allan@archlinux.org>
Remove checks for geteuid

The geteuid function is defined in POSIX and we will not support any
operating systems without it.

Signed-off-by: Allan McRae <allan@archlinux.org>
makepkg: use --apparent-size when du supports it

Amazingly, using "sleep 1" to convince btrfs to report correct file
sizes is only a 90% fix.  Sometimes more sleep is needed.

Instead we use the --apparent-size argument to du to get actual file
sizes. This is used only on Linux as the various BSDs do not support
this argument.

Signed-off-by: Allan McRae <allan@archlinux.org>
Fixed missing asciidoc id

Generated webpage contained dead links to section 'Package and Database
Signature Checking'
doc: Fix section link in pacman-key man page

Signed-off-by: Allan McRae <allan@archlinux.org>
Update Doxyfile

A few parameters were outdated and this produced warnings from Doxygen

Signed-off-by: Allan McRae <allan@archlinux.org>
makepkg: Print out full version on pkgver update

When building sources with a pkgver function, makepkg will print out the
original version before pkgver() is run, claiming that that is the
package that will be built. This patch simply re-prints the output
later, after pkgver() has been run so people can see which package they
are actually building.

Signed-off-by: William Giokas <1007380@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Add a -n option to repo-add to only add new packages

Packages are already in the pkg db were given a warning, and then
readded anyway.  With -n specified, the warning is printed, but skips
readding it.

Signed-off-by: Danny George <dangets@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Split common utility functions for libalpm and pacman

There is duplicated code in the util.c files in the libalpm and pacman
source code. Split this into a separate file so that it can be shared
via a symlink. This prevents code divergence between the two code bases.

Also, move mbasename and mdirname from pacman/util.c into util-common.c
in preparation for the following patch that uses them to add an extension
to pacsave files.

Signed-off-by: Allan McRae <allan@archlinux.org>
Save backup files with extension .pacsave.n

Teach pacman to save backup files with extension .pacsave.n, where n is a
positive integer. The current backup file shall be saved as <name>.pacsave,
while existing .pacsave.n files will be renamed to <name>.pacsave.n+1

Example:
1. You have subversion installed in your local repo. /etc/conf.d/svnserve
   is a file to be backed up. It contains local modifications

2. You remove subversion from your repo. /etc/conf.d/svnserve is backed up as
   /etc/conf.d/svnserve.pacsave

2. You install subversion again

3. You edit /etc/conf.d/svnserve

4. You remove subversion. The existing /etc/conf.d/svnserve.pacsave is renamed
   to /etc/conf.d/svnserve.pacsave.1 and /etc/conf.d/svnserve is backed up as
   /etc/conf.d/svnserve.pacsave

Signed-off-by: Pang Yan Han <pangyanhan@gmail.com>

Rebased from original email and adjusted for util-common usage.
Signed-off-by: Florian Pritz <bluewind@xinu.at>

Signed-off-by: Allan McRae <allan@archlinux.org>
Fix spacing in HACKING spacing example

Signed-off-by: Allan McRae <allan@archlinux.org>