paccache: clarify help output

The help output referred to variables in the script rather than what
they were labelled in the parameter argument.

Signed-off-by: Allan McRae <allan@archlinux.org>
.gitignore: Add intl directory.

Signed-off-by: Allan McRae <allan@archlinux.org>
Close file descirptor before fork

FreeBSD chroot(2) fails with EPERM when a directory file descriptor is open
with either `kern.chroot_allow_open_directories` being 0, or when the process
already is inside a chroot.  This is exposed in alpm_run_chroot that uses
opendir() to open a file descriptor to the current directory before doing
the forking and chrooting.  Since the file descriptor is not used in the
forked process, we close it.

Fixes FS#36161.

Signed-off-by: Allan McRae <allan@archlinux.org>
pacscripts: Improve error message when sudo binary is not found

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
pacdiff: do not remove pacfile after viewing

Automatically removing the file after viewing is not good if on viewing you
decide to deal with it later.

Signed-off-by: Allan McRae <allan@archlinux.org>
Fix misspellings and some grammar issues in output of some pacman contrib scripts

Affected files:
-- contrib/bacman.sh.in
-- contrib/paccache.sh.in
-- contrib/pacdiff.sh.in
-- contrib/rankmirrors.sh.in

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
Color output from pm_vasprintf

This makes sure warning and error messages from _alpm_log are colored.
Fixes FS#35160.

Signed-off-by: Allan McRae <allan@archlinux.org>
alpm_sync_sysupgrade: skip packages being removed

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
makepkg: fix consistency of downloaded sources permissions

Running 'makepkg -g' or 'makepkg' to download source files results in
different permissions on the files if the user has a non-default umask.

Put the umask definition at the "beginning" of the makepkg script to
ensure all files generated by makepkg have a 0022 umask.

Signed-off-by: Allan McRae <allan@archlinux.org>
db.c: require unique database names

Allowing multiple databases with the same name causes conflicts as they
both point to the same database file but may use different servers,
usages, or siglevels.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
remove useless continue

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Fix pactest README

The --test option no longer exists.

Signed-off-by: Allan McRae <allan@archlinux.org>
Doxyfile: exclude foreign headers

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Doxyfile: make symbols beginning with _ private

Otherwise, doxygen will pick up ALL structs, enums, non-static
functions, and global variables.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Doxyfile: hide references relations

These are entirely unnecessary for public api documentation.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Doxyfile: don't generate directory file lists

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Doxyfile: generate manpage links

Allows calling `man <function>` directory instead of having to
look through the master pages.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
enforce naming convention for non-exported members

Rename all private structs, enums, non-static functions, and global
variables to include a leading '_alpm'.  Doxygen will pick up these
members by default.  Enforcing a common naming convention for these
members allows them to all be easily excluded from our public
documentation and puts them in our actual namespace.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
rename doxygen groups

Prefix groups with 'libalpm' and remove '_api'.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
set doxygen groups in header files

Managing member grouping is much more easily done within header files
where we have all of the members together in one place.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>