Difference between revisions of "Pacaur"

From ArchWiki
Jump to navigation Jump to search
m (Troubleshooting: added pod2man issue)
(info moved upstream, redirect)
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Package management]]
#REDIRECT: [[AUR helpers]]
[[Category:Arch User Repository]]
'''Pacaur''' is an [[Arch User Repository]] (AUR) [[AUR helpers|helper]] aiming at speed and simplicity, designed to minimize user prompt interaction and to use an uncluttered interface. It is written in Bash and built upon the well designed cower and expac C backends.
{{note|Pacaur is targeted at '''advanced users''' who want some degree of automation for repetitive tasks. As such, the user is expected to be familiar with the [[Arch User Repository|manual build process]]. }}
Pacaur's main feature revolves around a ''fast workflow'' idea, that is, '''spending as little time as possible interacting with package management prompts'''. Speed, simplicity and the need for an uncluttered interface were also taken into consideration.
A few characteristics:
* It minimizes user interaction, by retrieving and editing all PKGBUILDs, solving conflicts and asking about providers before building anything.
* It fully supports split packages with proper independent subpackages installation.
* It can be used as a separate AUR frontend, or a single tool to manage official and AUR packages.
* It does not add a lot of features, but simply extends pacman to manage the AUR.
* It solves the dependency tree entirely through the AUR RPC interface in a secure and
* It is a small bash script using existing tiny libraries and has very good performance with a small memory footprint.
See also [https://bbs.archlinux.org/viewtopic.php?pid=937423#p937423 Why pacaur sucks less] in the official forum thread.
Install {{AUR|cower}} and its dependencies, and then {{AUR|pacaur}} itself. Both packages are available in the [[AUR]].
Invoking pacaur consists of supplying an operation, any applicable options, and usually one or more targets.
usage: pacaur <operation> [options] [target(s)] -- See also pacaur(8)
pacman extension
  -S, -Q          extend pacman operations to the AUR
AUR specific
  -s, --search    search AUR for matching strings
  -i, --info      view package information
  -d, --download  download target(s) -- pass twice to download AUR dependencies
  -m, --makepkg    download and make target(s)
  -y, --sync      download, make and install target(s)
  -k, --check      check for AUR update(s)
  -u, --update    update AUR package(s)
  -v, --version    display version information
  -h, --help      display help information
pacman extension - can be used with the -S, -Ss, -Si, -Sii, -Sw, -Su, -Qu, -Sc, -Scc operations
  -a, --aur        only search, install or clean target(s) from the AUR
  -r, --repo      only search, install or clean target(s) from the repositories
AUR specific
  -c, --clean      clean target(s) build files -- can be combined with the -m, -y, -u operations
  -e, --edit      edit target(s) PKGBUILD and view install script
  -q, --quiet      show less information for query and search
  --devel          consider AUR development packages upgrade
  --foreign        consider already installed foreign dependencies
  --ignore        ignore a package upgrade (can be used more than once)
  --needed        do not reinstall already up-to-date target(s)
  --noconfirm      do not prompt for any confirmation
  --noedit        do not prompt to edit files
  --rebuild        always rebuild package(s)
  --silent        silence output
===Userbase target===
Pacaur has two types of users in mind:
* those who prefer to have one single tool to manage AUR and official repositories,
* those who prefer to keep their AUR frontend separate from Pacman.
As such there are two sets of commands:
* commands that wrap the pacman binary (-S, -Ss, -Si, -Sw. -Su, -Qu, -Sc) and extend its functions to the AUR. This behavior can be disabled with the ''fallback'' variable in the config file.
* commands that are AUR specific (-s, -i, -m, -y, -k, -u).
By default, pacaur -Ss ''package'' will search the repo, then the AUR if necessary.
$ pacaur -Ss expac
community/expac 1-2
    pacman database extraction utility
aur/expac-git 20110324-1 (24)
    pacman database extraction utility
This behavior is optional and can be disabled with the ''fallback'' variable in the config file. When disabled, pacaur -Ss ''package'' will search the repo only.
Also, pacaur -Ssr ''package'' will be restricted to searching in the repo only, while pacaur -Ssa ''package'' will search the AUR.
$ pacaur -Ssr expac
community/expac 1-2
    pacman database extraction utility
$ pacaur -Ssa expac
aur/expac-git 20110324-1 (24)
    pacman database extraction utility
pacaur -s ''package'' will search the AUR only.
$ pacaur -s expac
aur/expac-git 20110324-1 (24)
    pacman database extraction utility
Here are the available options in the config file:
# /etc/xdg/pacaur/config
# The following options are commented out with their default values listed.
# If you wish to use different values, uncomment and update the values.
# The Color and VerbosePkgLists options can be enabled in /etc/pacman.conf.
#builddir="${BUILDDIR:-$tmpdir}"      # build directory
#editor="${EDITOR:-vi}"                # PKGBUILD editor
#editpkgbuild=true                    # edit PKGBUILD and install scripts
#fallback=true                        # pacman fallback to the AUR
#clean=true                            # clean up after package install
#cleandevel=true                      # clean up devel package
#silent=false                          # silence output
#sortby=popularity                    # sort method (name|votes|popularity)
#sudoloop=false                        # prevent sudo timeout
See also '''man pacaur'''.
=== Config files ===
Pacaur fully honors pacman and makepkg configuration files, as well as the sudoers and cower config file (if existing).
In particular, the following options in {{ic|/etc/pacman.conf}} can be used for further configuration:
* '''Colors''' to enable colored output.
* '''VerbosePkgLists''' to display the name, version and size of target packages formatted as a table.
Note that pacman and makepkg '''environment variables''' ({{ic|$BUILDDIR}}, {{ic|$PKGDEST}}, {{ic|$PACMAN}}, ...) are fully honored.
=== Sudo configuration ===
Pacaur is designed to be used with [[sudo]] for minimal password prompting and your {{ic|/etc/sudoers}} should be configured accordingly.
To avoid password prompt timeout (typically if you went grabbing a coffee while waiting the build to finish), disable it in your sudoers:
Defaults passwd_timeout=0
Alternatively, enable the '''sudoloop''' option in the config file.
=== Auto completion ===
==== Bash ====
Because of speed issue, AUR completion is disabled by default.
You can enable it by uncommenting this line in the {{ic|/usr/share/bash-completion/completions/pacaur}} file:
    # S) _pacman_pkg Slq; _cower_pkg;; # disabled. Too slow and no fallback var support.
==== Zsh ====
You can disable AUR completion using the following zstyle:
    zstyle ':completion:*:pacaur:*' remote-access false
The name `remote-access` mimics other completion zstyles like _cvs and _scp
that use this for deciding whether to complete remote files or not.
{{note|Most complicated errors result from out-dated pacaur/cower package in your system, in case you did not even understand what the error is about and/or cannot find any solution, try explicitly updating your pacaur/cower first. }}
===Dependency pod2man not found===
If the required ''pod2man'' dependency isn't found when building with makepkg, you'll have to ensure {{ic|/usr/bin/core_perl}} is in your system {{ic|$PATH}}.
===No results found for error===
{{Merge|AUR helpers|This is due to a soname bump in libalpm, and other AUR helpers are affected by this}}
If pacman or its dependencies are updated, pacaur may output "no results found for error". If this occurs, you may need to [[Arch_User_Repository#Acquire_build_files|rebuild]] the {{AUR|cower}} backend.
===Host name error===
When checking AUR packages for updates, pacaur outputs a lot of "no results found for [packages]:" messages in spite of the internet line working correctly.
* [[General recommendations#DNS_speed_improvement|Configure your DNS server]] to improve queries speed. Try using Google primary DNS ( and
* Alternatively, tweak cower's config file to decrease the number of threads used in "MaxThread" variable.
===Using gvim as editor===
When using gvim as editor, gvim opens but the build continues. In the config file, try:
editor="gvim --nofork"
==Improving pacaur==
See [https://github.com/Spyhawk/pacaur/blob/master/po/HOWTO Internationalization howto].
===Bug reports===
When reporting problems, please:
* check whether "makepkg -si" can build and install a package successfully. As pacaur relies exclusively on makepkg to build and install packages, the PKGBUILD must be corrected by its maintainer if makepkg fails.
* check whether the package and its dependencies provide correct [[Arch_User_Repository#AUR_metadata|AUR metadata]].
* check that the problem is reproducible, and is not caused by a misconfiguration of pacaur/pacman/makepkg/sudoers/gpg/etc.
* post the ouput of "bash -x pacaur <your command>" in the [https://bbs.archlinux.org/viewtopic.php?pid=937423 forum thread] or on [https://github.com/Spyhawk/pacaur github] to help debug the issue.
===Feature requests===
Pacaur is considered as being "feature complete" and will most probably not include any new features. However, any improvement request or patch will be considered, and might be implemented as long as the objectives of speed, simplicity, fast workflow, uncluttered interface and the Arch way are respected.
==See also==
* [https://bbs.archlinux.org/viewtopic.php?pid=937423 Forum page]
* [https://github.com/rmarquis/pacaur pacaur's github page]

Latest revision as of 06:14, 5 October 2015

Redirect to: