mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-10 03:25:01 -05:00
42042723a8
When a SyncFirst transaction kicks in, no flags like '--force' are honored. This is for good reason, as honoring something like '--asdeps' could be quite unintentional. Document this fact and a possible workaround. Signed-off-by: Dan McGee <dan@archlinux.org>
219 lines
8.2 KiB
Plaintext
219 lines
8.2 KiB
Plaintext
/////
|
|
vim:set ts=4 sw=4 syntax=asciidoc noet:
|
|
/////
|
|
pacman.conf(5)
|
|
==============
|
|
|
|
Name
|
|
----
|
|
pacman.conf - pacman package manager configuration file
|
|
|
|
|
|
Synopsis
|
|
--------
|
|
{sysconfdir}/pacman.conf
|
|
|
|
|
|
Description
|
|
-----------
|
|
Pacman, using linkman:libalpm[3], will attempt to read pacman.conf each time it
|
|
is invoked. This configuration file is divided into sections or repositories.
|
|
Each section defines a package repository that pacman can use when searching
|
|
for packages in '\--sync' mode. The exception to this is the options section,
|
|
which defines global options.
|
|
|
|
|
|
Example
|
|
-------
|
|
|
|
--------
|
|
#
|
|
# pacman.conf
|
|
#
|
|
[options]
|
|
NoUpgrade = etc/passwd etc/group etc/shadow
|
|
NoUpgrade = etc/fstab
|
|
|
|
[core]
|
|
Include = /etc/pacman.d/core
|
|
|
|
[custom]
|
|
Server = file:///home/pkgs
|
|
--------
|
|
|
|
NOTE: Each directive must be in CamelCase. If the case isn't respected, the
|
|
directive won't be recognized. For example. noupgrade or NOUPGRADE will not
|
|
work.
|
|
|
|
Options
|
|
-------
|
|
*RootDir =* path/to/root::
|
|
Set the default root directory for pacman to install to. This option is
|
|
used if you want to install a package on a temporary mounted partition
|
|
which is "owned" by another system, or for a chroot install.
|
|
*NOTE*: If database path or logfile are not specified on either the
|
|
command line or in linkman:pacman.conf[5], their default location will
|
|
be inside this root path.
|
|
|
|
*DBPath =* path/to/db/dir::
|
|
Overrides the default location of the toplevel database directory. A
|
|
typical default is ``/var/lib/pacman/''. Most users will not need to set
|
|
this option. *NOTE*: if specified, this is an absolute path and the root
|
|
path is not automatically prepended.
|
|
|
|
*CacheDir =* path/to/cache/dir::
|
|
Overrides the default location of the package cache directory. A typical
|
|
default is ``/var/cache/pacman/pkg/''. Multiple cache directories can be
|
|
specified, and they are tried in the order they are listed in the config
|
|
file. If a file is not found in any cache directory, it will be downloaded
|
|
to the first cache directory with write access. *NOTE*: this is an absolute
|
|
path, the root path is not automatically prepended.
|
|
|
|
|
|
*LogFile =* '/path/to/file'::
|
|
Overrides the default location of the pacman log file. A typical default
|
|
is ``/var/log/pacman.log''. This is an absolute path and the root directory
|
|
is not prepended.
|
|
|
|
*HoldPkg =* package ...::
|
|
If a user tries to '\--remove' a package that's listed in `HoldPkg`,
|
|
pacman will ask for confirmation before proceeding.
|
|
|
|
*IgnorePkg =* package ...::
|
|
Instructs pacman to ignore any upgrades for this package when performing
|
|
a '\--sysupgrade'.
|
|
|
|
*SyncFirst =* package ...::
|
|
Instructs pacman to check for newer version of these packages before any
|
|
sync operation. The user will have the choice to either cancel the current
|
|
operation and upgrade these packages first or go on with the current
|
|
operation. This option is typically used with the 'pacman' package.
|
|
*NOTE*: when a `SyncFirst` transaction takes place, no command line flags
|
|
(e.g. '\--force') are honored. If this is not ideal, disabling `SyncFirst`
|
|
and performing a manual sync of the involved packages may be required.
|
|
|
|
*IgnoreGroup =* group ...::
|
|
Instructs pacman to ignore any upgrades for all packages in this
|
|
group when performing a '\--sysupgrade'.
|
|
|
|
*Include =* path::
|
|
Include another config file. This file can include repositories or
|
|
general configuration options.
|
|
|
|
*XferCommand =* /path/to/command %u::
|
|
If set, an external program will be used to download all remote files.
|
|
All instances of `%u` will be replaced with the download URL. If present,
|
|
instances of `%o` will be replaced with the local filename, plus a
|
|
``.part'' extension, which allows programs like wget to do file resumes
|
|
properly.
|
|
+
|
|
This option is useful for users who experience problems with built-in
|
|
http/ftp support, or need the more advanced proxy support that comes with
|
|
utilities like wget.
|
|
|
|
*NoPassiveFtp*::
|
|
Disables passive ftp connections when downloading packages. (aka Active Mode)
|
|
|
|
*NoUpgrade =* file ...::
|
|
All files listed with a `NoUpgrade` directive will never be touched during
|
|
a package install/upgrade, and the new files will be installed with a
|
|
'.pacnew' extension.
|
|
These files refer to files in the package archive, so do not include the
|
|
leading slash (the RootDir) when specifying them.
|
|
|
|
*NoExtract =* file ...::
|
|
All files listed with a `NoExtract` directive will never be extracted from
|
|
a package into the filesystem. This can be useful when you don't want part
|
|
of a package to be installed. For example, if your httpd root uses an
|
|
'index.php', then you would not want the 'index.html' file to be extracted
|
|
from the 'apache' package.
|
|
These files refer to files in the package archive, so do not include the
|
|
leading slash (the RootDir) when specifying them.
|
|
|
|
*CleanMethod =* KeepInstalled | KeepCurrent::
|
|
If set to `KeepInstalled` (the default), the '-Sc' operation will clean
|
|
packages that are no longer installed (not present in the local database).
|
|
If set to `KeepCurrent`, '-Sc' will clean outdated packages (not present in
|
|
any sync database).
|
|
The second behavior is useful when the package cache is shared among
|
|
multiple machines, where the local databases are usually different, but the
|
|
sync databases in use could be the same.
|
|
|
|
*UseSyslog*::
|
|
Log action messages through syslog(). This will insert log entries into
|
|
``/var/log/messages'' or equivalent.
|
|
|
|
*ShowSize*::
|
|
Display the size of individual packages for '\--sync' and '\--query' modes.
|
|
|
|
*UseDelta*::
|
|
Download delta files instead of complete packages if possible. Requires
|
|
the xdelta3 program to be installed.
|
|
|
|
*TotalDownload*::
|
|
When downloading, display the amount downloaded, download rate, ETA,
|
|
and completed percentage of the entire download list rather
|
|
than the percent of each individual download target. The progress
|
|
bar is still based solely on the current file download.
|
|
|
|
Repository Sections
|
|
-------------------
|
|
Each repository section defines a section name and at least one location where
|
|
the packages can be found. The section name is defined by the string within
|
|
square brackets (the two above are 'current' and 'custom'). Locations are
|
|
defined with the 'Server' directive and follow a URL naming structure. If you
|
|
want to use a local directory, you can specify the full path with a ``file://''
|
|
prefix, as shown above.
|
|
|
|
A common way to define DB locations utilizes the 'Include' directive. For each
|
|
repository defined in the configuration file, a single 'Include' directive can
|
|
contain a file that lists the servers for that repository.
|
|
|
|
--------
|
|
[core]
|
|
# use this repository first
|
|
Server = ftp://ftp.archlinux.org/core/os/arch
|
|
# next use servers as defined in the mirrorlist below
|
|
Include = /etc/pacman.d/mirrorlist
|
|
--------
|
|
|
|
During parsing, pacman will define the `$repo` variable to the name of the
|
|
current section. This is often utilized in files specified using the 'Include'
|
|
directive so all repositories can use the same mirrorfile.
|
|
|
|
--------
|
|
Server = ftp://ftp.archlinux.org/$repo/os/arch
|
|
--------
|
|
|
|
The order of repositories in the configuration files matters; repositories
|
|
listed first will take precedence over those listed later in the file when
|
|
packages in two repositories have identical names, regardless of version
|
|
number.
|
|
|
|
Using Your Own Repository
|
|
-------------------------
|
|
If you have numerous custom packages of your own, it is often easier to generate
|
|
your own custom local repository than install them all with the '\--upgrade'
|
|
option. All you need to do is generate a compressed package database in the
|
|
directory with these packages so pacman can find it when run with '\--refresh'.
|
|
|
|
repo-add /home/pkgs/custom.db.tar.gz /home/pkgs/*.pkg.tar.gz
|
|
|
|
The above command will generate a compressed database named
|
|
'/home/pkgs/custom.db.tar.gz'. Note that the database must be of the form
|
|
'{treename}.db.tar.gz', where '{treename}' is the name of the section defined in
|
|
the configuration file. That's it! Now configure your custom section in the
|
|
configuration file as shown in the config example above. Pacman will now use your
|
|
package repository. If you add new packages to the repository, remember to
|
|
re-generate the database and use pacman's '\--refresh' option.
|
|
|
|
For more information on the repo-add command, see ``repo-add \--help'' or
|
|
linkman:repo-add[8].
|
|
|
|
|
|
See Also
|
|
--------
|
|
linkman:pacman[8], linkman:libalpm[3]
|
|
|
|
include::footer.txt[]
|