Pacaur

From ArchWiki
Revision as of 15:14, 4 December 2012 by Spyhawk (Talk | contribs) (Userbase target: added example)

Jump to: navigation, search

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary end

Pacaur is an Arch User Repository (AUR) 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.

Philosophy

Pacaur main feature revolves around a fast workflow idea, that is, spending as less time as possible interacting with package management prompts. The objectives of speed, simplicity and uncluttered interface were also taken into consideration.

Design concept:

  • simply extends pacman to manage the AUR rather than adding lot of features.
  • fast workflow to minimize user interaction.
  • usable as a single tool to manage official and AUR packages or as a separate AUR frontend (pacman-like and cower-like interfaces).
  • ready to be run on any system (bash script + C libraries).
  • built upon existing tools (cower, expac, sudo, pacman-color).

Main characteristics:

  • retrieve and edit all PKGBUILDs before building anything.
  • check and solve all conflicts before building anything.
  • pass arguments to pacman when appropriate.
  • search provides regex support (through cower).
  • show current *and* available version when checking update.
  • very good performance with minimal memory footprint (C backend).

Features not implemented "by design":

  • no "interactive" mode.
  • no customizedpkg support.
  • no complete dependencies recomputation after you've added/removed some of them. Only binary dependency checking is handled through makepkg.
  • no internationalization.

Installation

The following binary dependencies need to be installed:

You can then install cowerAUR and pacaurAUR. The package pacman-colorAUR is optional but highly recommended for adding color output support.

Userbase target

Pacaur is targeted to advanced users who wants some degree of automation for repetitive tasks and who know what they are doing.

Two types of users are 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).

Example

pacaur -Ss package will search the repo, then the AUR if necessary (fallback enabled).

$ pacaur -Ss expac
community/expac 1-2
    pacman database extraction utility
aur/expac-git 20110324-1 (24)
    pacman database extraction utility

pacaur -Ss package will be restricted to searching in the repo only, while pacaur -Ssa package will search the AUR (fallback disabled).

$ pacaur -Ss 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

Usage

Invoking pacaur consists of supplying an operation, any applicable options, and usually one or more targets.

usage:  pacaur <operation> [options] [package(s)]
operations:
 pacman extension
   -S, -Q          extend pacman operations to the AUR
 AUR only
   -s, --search    search AUR repository for matching strings
   -i, --info      view package information -- pass twice for details
   -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)
 general
   -v, --version   display version information
   -h, --help      display help information
   --fixbackend    quickly rebuild backend

options:
 pacman extension - can be used with the -S, -Ss, -Si, -Sii, -Sw, -Su, -Qu, -Sc, -Scc operations"
   -a, --aur       only search, install or clean packages from the AUR"
   -r, --repo      only search, install or clean packages from the repositories"
 general
   -e, --edit      edit target PKGBUILD -- can be combined with the -d, -m, -y, -u flags
   -c, --clean     clean target(s) build files -- can be combined with the -m, -y, -u flags"
   -q, --quiet     show less information for query and search
   --devel         consider AUR development packages upgrade
   --ignore        ignore a package upgrade (can be used more than once)
   --noconfirm     do not prompt for any confirmation
   --noedit        do not prompt to edit files
   --rebuild       always rebuild package

Here are the available options in the config file:

#
# /etc/xdg/pacaur/pacaur.conf
#

# The following options are commented out with their default values listed.
# If you wish to use different values, uncomment and update the values.
#builddir="${BUILDDIR:-$tmpdir}"        # build directory
#editor="${EDITOR:-vi}"                 # PKGBUILD editor
#editpkgbuild=true                      # edit PKGBUILD script
#editinstall=true                       # edit install script
#fallback=true                          # pacman fallback to the AUR
#clean=true                             # clean up after package install
#cleandevel=true                        # clean up devel package
#color=false                            # color support via pacman-color

See also man pacaur.

Troubleshooting

Pacman upgrade

When upgrading pacman to a newer version, pacman fails due to dependency conflicts with an older version of cower or pacaur. In pacman.conf, try adding them to the SyncFirst variable:

SyncFirst   = pacman cower pacaur

Using gvim as editor

When using gvim as editor, gvim opens but the build continues. In pacaur.conf, try:

editor="gvim --nofork"

Host name error

When checking AUR packages for updates, pacaur outputs a lot of "Couldn't resolve host name" and "Timeout was reached" messages in spite of the internet line working correctly.

  • Try using Google primary DNS (8.8.8.8 and 8.8.4.4), or
  • Tweak cower's config file to decrease the number of threads used in "MaxThread" variable.

Password timeout

When building a package that takes a long time to compile, sudo times out and pacaur does ask to enter the password again right before installing the package. If this is not done in a default delay of 5 min (typically if you went grabbing a coffee while waiting the build to finish), the password prompt times out and the install fails.

Try to disable the password timeout in your sudoers:

passwd_timeout 0

External Links