## poldek manual

###

$Id$

Abstract

This document provides a guide for poldek meta-package manager 0.30.

## 1. Overview

poldek is a full-featured frontend to RPM package manager. Its core features are similar to every modern package updater like apt-get. The features include package installation, upgrading and removal with automatic dependency handling, querying/ search the package database and more.

Features

Easy to use

  poldek is easy to learn for users familiar with rpm because the basic command line options and switches are similar in use. Apart from rpm-like command line switches, poldek provides higher level command set ("install", "upgrade", "ls", etc) quite intuitive for those who knows apt-get. A very handy shell-like interface with auto-completion and history is also provided.

Relatively fast and scalable

  poldek has been designed with efficiency and scalability in mind. The native package repository index format is optimized for storage size and loading speed. Dependency processing (dependencies, conflicts, package ordering) is significantly faster and needs less memory than rpmlib-based tools. poldek can handle 20K packages without noticable speed degradation on typical machine.

Incremental repository updates

  poldek's native repositories are able to update incrementally. During the update only the incremental files are transferred instead of the complete index. Such files are certainly much smaller, what drastically reduces amout of data need to be retrieved when remote repository was changed a bit.

Support for multiple repository types

  poldek supports various types of package repositories including apt-get, yum and XML Package Metadata. See the list of supported repository types for details. Support for other types may be easily added.

Flexible installation of a big package sets

  Before their installation packages are divided into small groups, usually 2-10 items (depending on their reciprocal dependencies). Each group is installed separately, what ensures that unsucessful installation of one of the groups does not influence other ones. Another benefit of this separate installation is that it requires less memory and disk space than the usual one.

Flexible downloading

  Out of the box FTP, HTTP, HTTPS, RSYNC and SMB are supported. This list may be easily extended to other protocols by external scripts.

  FTP and HTTP are handled by built-in client designed to retrieve files over slow or unstable network connections -- if a download fails due to a network problem, it will keep trying until the whole file will be downloaded. Download resuming, timestamp checking, proxy support are implemented as well.

Repository management

  poldek provides functionality which helps to manage distribution repositories. Features include:

  - Detail reports about dependency loops, unmet dependencies, package conflicts, file sharing/conflicts, orphaned directories and missing dependencies.

  - Division package set to chunks to be placed on removable media with ordering according dependency tree and with priority handling.

  - Moving packages from one repository to another with full dependency checking.

## 2. Quick start

Suppose you want to: a) use remote repository of Fedora Core 4, b) prepare your local package directory `$HOME/rpm/RPMS` to be available to poldek.

### 2.1. Step #1 - Configure repositories

Source configuration may be placed in your local `$HOME/.poldekrc` or global `/etc/poldek/source.conf`. Whatever you choose, put there something like:

    [source]
    _fcurl = http://download.fedora.redhat.com # macro, just for short
    name   = fc4                               # name
    type   = metadata                          # use xml metadata indexes
    url    = %{_fcurl}/pub/fedora/linux/core/4/i386/os/

    [source]
    name = home
    path = $HOME/rpm/RPMS

### 2.2. Step #2 - Create repository index

Fedora Core 4 index is ready, we must create one for `$HOME/rpm/RPMS`:

    $ poldek -n home --makeidx

As result several files with package data will be created under `$HOME/rpm/RPMS`.

    $ poldek -n home --makeidx
    Creating pndir index of /home/me/rpm/RPMS (type=dir)...
    Loading [dir]home...
    200..400..600..800..1000..1200..1400..1600..1652
    Writing /home/me/rpm/RPMS/packages.ndir.gz...

Remember to call this command after every change of `$HOME/rpm/RPMS`'s content.

### 2.3. Step #3 - Use the program

poldek provides two commands: poldek with rpm-like command line interface and ipoldek with interactive mode command interface. Invoking syntax is:

    $ poldek [OPTION...] [PACKAGE...]
    $ ipoldek [OPTION...] [COMMAND] [COMMAND_OPTION...] [PACKAGE...]

For example to install or upgrade Apache HTTP server:

    $ poldek -uv apache
    $ ipoldek install apache

Selection of particular repositories may be done by `-n` option:

    $ ipoldek -n fc4 ls foo\*
    $ poldek -n home -uv foo-3.1-2
    $ ipoldek -n home -s http://foo.bar/RPMS/ install foo-3.1\*

Most used poldek command options are compliant with rpm: `--install` (`-i`), `--upgrade` (`-u`,`-U`), `--erase` (`-e`), etc. Their ipoldek equivalents are: `install -IN` (--install), `install` (--upgrade) and `uninstall` (--erase). Notice that ipoldek `install` command it more general -- equivalent of `--install` is `install -IN`.

Extensive help is available for all commands, for poldek by using the `--help` switch, for ipoldek by using the `help` command and `--help` switch for individual commands:

    $ poldek --help
    $ ipoldek help
    $ ipoldek install --help

ipoldek provides comfortable shell-like mode which puts you into a readline interface. To enter it, execute ipoldek without any command:

    $ ipoldek -n ac
    Loading [pdir]ac...
    10998 packages read
    Loading [rpmdbcache]/var/lib/rpm...
    1751 packages loaded

    Welcome to the poldek shell mode. Type "help" for help with commands.

    poldek:/all-avail>

Once you are on poldek's command line, type 'help' and the rest should be, more or less, self-explanatory.

    poldek:/all-avail>help

    ls        [OPTION...] [PACKAGE...]             List packages
    search    [OPTION...] PATTERN [PACKAGE...]     Search packages
    get       [OPTION...] PACKAGE...               Download packages
    desc      [OPTION...] PACKAGE...               Display packages info
    install   [OPTION...] PACKAGE...               Install packages
    uninstall [OPTION...] PACKAGE...               Uninstall packages
    cd        [PATH]                               Change current package directory
    pwd                                            Print name of current directory
    help                                           Display this help
    alias                                          Print defined command aliases
    reload                                         Reload installed packages
    quit                                           Exit poldek

    Type COMMAND -? for details.
    poldek:/all-avail>

## 3. Package repositories

Like other packages management tools poldek uses package repositories (sources) to obtain meta-information about available packages. Repository consist of database (package index) of package meta-data (dependencies, files, description, etc) and, of course packages itself. Various types of repositories are supported including apt-get and yum ones.

Supported repositories

pndir (features: read, write, update, incremental update)

  Native poldek index format. Based on tndb (cdb-like) DBM library. Consist of 3 database files: first, `packages.ndir` with essential package meta-data, second `packages.ndir.dscr` with with common (BuildHost, Distribution, etc) and "C" package descriptions and third, `packages.ndir.dscr.i18n` with all non-English descriptions (if any)

metadata (features: read, update)

  XML Package Metadata format

hdrl (features: read, update)

  Native apt-get and other tools (urpmi AFAIK) index format. Consist of one file (pkglist.%{repository}.bz2, hdlist) with raw, often cut down, RPM package headers.

  Aliases: apt

yum (features: read, update)

  Native yum index format. Consist of one file with list of packages IDs and directory of *.hdr files with raw RPM package headers.

pdir (features: read, write, update, incremental update)

  Native poldek index format prior to 0.20 version. Based on custom binary format. Consist of one database file (packages.dir) with all needed package header data.

dir (features: read)

  Dynamic index built by scanning directory with a bunch of packages in it, no indexing required.

Native poldek repositories 'pndir' and 'pdir' have “incremental updates” feature consist in creation of package index delta files with differences between already created and previous package index. Deltas are used later to perform update of local indexes what noticeably reduces amout of data downloaded. In the other words, when repository was changed by adding a few packages, only information about those few packages will be retrieved on update (see Update subsection).

### 3.1. Repositories configuration

Although repositories can be specified directly at command line, they are usually configured. Every repository has its own configuration section “[source]”, for example:

    [source]
    type   = pndir                                      # package index type
    name   = distro                                     # name of the source
    path   = http://my-favourite-distro.org/1.0/RPMS/   # path
    signed = yes                                        # verify package signatures

    [source]
    type   = pndir
    name   = distro-updates
    path   = http://my-favourite-distro.org/1.0/updates/
    signed = yes

    [source]
    type = dir
    name = home
    path = ${HOME}/rpm/RPMS
    auto = no                                            # load on demand only

`type` is not obligatory - if not set, then type is taken from `default index type` configuration option value. For all possible source configuration and extensible option description see Configuration and and `*source.conf` files supplied with poldek.

poldek is can read apt-get's `/etc/apt/sources.list` directly. It is controlled by `load apt sources list`, to load apt's sources do:

    load apt sources list = yes

### 3.2. Using repositories

#### 3.2.1. Selection

poldek loads all configured repositories at startup Executed without repository selection options poldek loads all configured repositories at startup, except they which have `auto` turned off. To use particular repositories use `--sn` (`-n`) option, for example, to use only home source, do:

    $ poldek -n home

Repository name can be also a glob, to use all sources with “distro” prefix, do:

    $ poldek -n distro\*

Non configured repositories can be specified directly at command line by `--source` (`-s`) option. The syntax is:

    $ poldek [--st=TYPE] --source=SOURCEPATH [--prefix=PATH]

where TYPE is one of index supported types, and SOURCEPATH is the path or URL of repository. If package index and packages are located in different paths/URLs then `--prefix` can be used to point packages location. Examples:

    $ poldek -s ~/rpm/RPMS
    $ poldek --st pdir -s ftp://foo.bar.org/RPMS/
    $ poldek -s ftp://foo.bar.org/RPMS.index/ --prefix ftp://foo.bar.org/RPMS/
    $ poldek -s /tmp/packages.ndir.gz --prefix /media/cdrom

#### 3.2.2. Updating

To resynchronize the package index from its repository use `--update` (`--up`) or `--update-whole` (`--upa`):

    $ poldek [-s PATH] [-n NAME] --update
    $ poldek [-s PATH] [-n NAME] --update-whole

With `--update` program looks for an index delta files which can be used to update local package index. If they are unavailable, then whole index is downloaded. With `--update-whole` program updates whole package index if it is outdated. It is a good idea to run do updates regularly to keep indexes up to date.

Update requested for local repositories causes verification integrity of indexes.

Examples:

    $ poldek --st pdir -s ftp://foo.bar.org/RPMS/ --up
    $ poldek -s ftp://foo.bar.org/RPMS.index/ --prefix ftp://foo.bar.org/RPMS/ --upa
    $ poldek -n home --up

#### 3.2.3. Listing available repositories

To list all configured repositories use `--sl` (`-l`):

    $ poldek -l
    distro          http://my-favourite-distro.org/1.0/RPMS/    (sign,type=pndir)
    distro-updates  http://my-favourite-distro.org/1.0/updates/ (sign,type=pndir)
    home            /home/me/rpm/RPMS/  (noauto,type=dir)

#### 3.2.4. Listing available repository types

To list all available repository types, use `--stl`:

    $ poldek --stl
    dir    r--  Dynamic index built by scanning directory for packages
                 (aliases: rpmdir)
    hdrl   r-u  File with raw RPM package headers; used by apt-rpm
                 (aliases: apt)
    pdir   rwu  Native poldek's index format prior to 0.20 version
                 (aliases: pidx)
    pndir  rwu  Native poldek's index format
    rpmdb  r--  RPM package database
    yum    r-u  Yum index format
    Legend: r - readable, w - writeable, u - updateable

### 3.3. Creating

Creation of poldek's repositories is quite simple, the syntax is:

    $ poldek -s PATH --mkidx[=PATH] [--mt=TYPE[,TYPE]...] [--nodesc] [--nocompress] [--nodiff]
    $ poldek -n NAME --mkidx[=PATH] [--mt=TYPE[,TYPE]...] [--nodesc] [--nocompress] [--nodiff]

what creates package index of repository specified by `-n` or `-s` and saves it under directory specified by `--mkidx` (a package directory by default). Type of created index is the same as specified by `default index type` configuration option. To make index of the other type or make many indexes of different types at once, use `--mt` option.

For 'pndir' and 'pdir' indexes delta files are created if previous repository index is different from currently created one. Outdated deltas are automatically removed. To skip deltas creation use `--nodiff` option.

Other related options are: `--nodesc` with that package descriptions are not saved to repository index and `--nocompress` means that uncompressed index will be created.

Examples:

    $ poldek -s ~/rpm/RPMS --mkidx --nodiff
    $ poldek -s /cdrom/RPMS --mkidx=/tmp
    $ poldek -n home --mkidx
    $ poldek -n pld --mkidx --mt=pdir,pndir

### 3.4. Cache

By default only package index files are cached. To cache packages too, i.e. keep them even after successful installation, set `keep downloads` configuration option. Default cache directory is `$HOME/.poldek-cache`, it can be set to different location by `cachedir` configuration option. Cached files can be removed by three options:

- `--clean` remove source index files

- `--clean-pkg` remove cached packages.

- `--clean-whole` remove all files from cache directory

In conjunction with `-n` or `-s` cleannig may be limited to files belongs to specified repositories only. Examples:

    $ poldek -s http://foo.bar/RPMS --clean
    $ poldek -n foo --clean-whole
    $ poldek --clean-pkg

## 4. Managing packages

poldek operates in two basic modes - the first one is more generic and compliant with rpm (poldek command) and the second, called interactive mode with simplified and intuitive command set.

Interactive mode commands is available from both command line (ipoldek command) and shell like interface with auto-completion and history. To enter shell interface execute ipoldek without any "command" options like "install", "erase", etc. See also an example.

### 4.1. Specifying packages

Packages can be specified in five ways:

- as package Name[-[Epoch:]Version-Release] mask, e.g.

      $ poldek ... apache
      $ poldek ... apache-1.3.31-2
      $ poldek ... apache-2:1.3.31-2
      $ poldek ... 'apache-1.3*'
      $ poldek ... 'apache-mod_*pam*'

- as packages files, e.g:

      $ poldek ... apache-1.3.31-1.i386.rpm

- as Name#Version[-Release] string, e.g.:

      $ poldek ... apache#1.3.31
      $ poldek ... apache#1.3.31-1

- by package capability (Provides):

      $ poldek ... --caplookup webserver
      $ poldek ... --caplookup smtpdaemon

  `--caplookup` is available in command line mode only.

- as list read from file, e.g.:

      $ poldek ... --pset ~/.package-sets/tiny-system
      $ poldek ... --pset http://foo.bar.com/package-sets/tiny-system.txt

  Syntax of file passed as `--pset` argument is very simple. Each package is specified in separated line in following syntax:

           NAME [EVR] | @VIRTUAL [DEFAULT_NAME [DEFAULT_EVR]]

  '@' specifies virtual package. Hashed lines are treated as comments. Example:

      FHS 2.1
      basesystem
      pdksh
      @bootloader lilo 2.1
      @smtpdaemon exim

  `--pset` is available in command line mode only.

### 4.2. Installing packages

To install packages in rpm sense, i.e. do not upgrade even if older version is already installed:

    $ poldek  [OPTION..] --install                 (command line mode)
    $ ipoldek [OPTION..] install -IN               (interactive mode)

It is useful when installation of multiple instance of package is needed (kernel for example). Example:

    $ poldek -iv kernel-2.6.11
    Processing dependencies...
    There are 1 package to install:
    I kernel-2.6.11-2
    Need to get 13.4MB of archives (13.4MB to download).
    After unpacking 15.2MB will be used.
    Retrieving ac::kernel-2.6.11-2.i686.rpm...
    .............................. 100.0% [13.4MB (2M/s)]
    Executing sudo /bin/rpm --install -vh --root / --noorder...
    Preparing...                ########################################### [100%]
       1:kernel                 ########################################### [100%]

To install or upgrade package if older version is already installed:

    $ poldek  [OPTION..] --upgrade                 (command line mode)
    $ ipoldek [OPTION..] install                   (interactive mode)

This is most used installation type. Example:

    $ ipoldek install vim
    Loading [pdir]ac...
    10998 packages read
    Processing dependencies...
    vim-6.2.479-1 obsoleted by vim-6.3.067-1
    vim-6.3.067-1 marks vim-rt-6.3.067-1 (cap vim-rt = 4:6.3.067-1)
      vim-rt-6.2.479-1 obsoleted by vim-rt-6.3.067-1
        greedy upgrade gvim-gtk-6.2.479-1 to 6.3.067-1 (unresolved vim-rt = 4:6.2.479-1)
          gvim-gtk-6.2.479-1 obsoleted by gvim-gtk-6.3.067-1
        greedy upgrade vim-ispell-6.2.479-1 to 6.3.067-1 (unresolved vim-rt = 4:6.2.479-1)
          vim-ispell-6.2.479-1 obsoleted by vim-ispell-6.3.067-1
    There are 4 packages to install (3 marked by dependencies), 4 to uninstall:
    I vim-6.3.067-1
    D gvim-gtk-6.3.067-1, vim-ispell-6.3.067-1, vim-rt-6.3.067-1
    R gvim-gtk-6.2.479-1, vim-rt-6.2.479-1, vim-6.2.479-1, vim-ispell-6.2.479-1
    Need to get 4.5MB of archives (4.5MB to download).
    After unpacking 14.0MB will be used.

    Retrieving ac::vim-ispell-6.3.067-1.i686.rpm...
    .............................. 100.0% [526.3K (56.4K/s)]
    Retrieving ac::vim-6.3.067-1.i686.rpm...
    .............................. 100.0% [518.0K (62.5K/s)]
    Retrieving ac::gvim-gtk-6.3.067-1.i686.rpm...
    .............................. 100.0% [679.2K (69.1K/s)]
    Retrieving ac::vim-rt-6.3.067-1.i686.rpm...
    .............................. 100.0% [2.9M (56.4K/s)]

    Executing sudo /bin/rpm --upgrade -vh --root / --noorder...
    Preparing...                ########################################### [100%]
       1:vim-rt                 ########################################### [ 25%]
       2:gvim-gtk               ########################################### [ 50%]
       3:vim                    ########################################### [ 75%]
       4:vim-ispell             ########################################### [100%]

To upgrade packages, i.e. install only if older version is already installed:

    $ poldek  [OPTION..] --upgrade --fresh         (command line mode)
    $ ipoldek [OPTION..] upgrade                   (interactive mode)

Example:

    $ poldek -uvF 'apache*'

To upgrade all packages need upgrade `--upgrade-dist` can be used, or, in interactive mode '*' may be specified as package mask. Examples:

    $ poldek -v --upgrade-dist

    $ ipoldek -v upgrade '*'
    $ ipoldek -v install -F '*' (the same, "upgrade" is just an alias for "install -F")

### 4.3. Installation system from a scratch

poldek can be used as system installer, to install system from scratch use `--install-dist` option. The syntax is:

    $ poldek --install-dist=DIR [PACKAGE...]

All unmet dependencies will be satisfied by marking additionall packages. Packages are installed one by one what reduces memory consumption and CPU utilization of CPU and permits to install the system on older machines.

As example, command which installs system under `/mnt/dest` might looks like:

    $ poldek -s ftp://foo.bar/RPMS --install-dist=/mnt/dest --pset ftp://foo-bar/package-sets/myset.txt

### 4.4. Removing packages

poldek removes packages with its reverse-dependent ones by default. Packages are removed in the right order following Requires(un) rpm requirements.

To remove installed packages:

    $ poldek  [OPTION..] --erase                      (command line mode)
    $ ipoldek [OPTION..] uninstall [ERASE_OPTION...]  (interactive mode)

Examples:

    $ poldek -e apache
    $ poldek -e kernel-2.6.11.5-3
    $ poldek -e kernel-3:2.6.11.5-3
    $ ipoldek uninstall kernel-2.6.11.5-3

### 4.5. Obtaining information about packages

Package details, both about installed and available ones can be easily accessed through interactive mode commands: ls, search and desc.

#### 4.5.1. ls - package listing

ls like system ls, list packages in different ways. Type `"ls --help"` to see all available options. Output example:

    poldek:/installed> ls -O *gimp*
    gimp-2.0.0-1
        The GNU Image Manipulation Program
    gimp-print-lib-4.2.6-1
        gimp-print library

#### 4.5.2. search - search packages

Package repositories may be easily searched by many criteria like package description, summary, group, requirements, etc. Type `"search --help"` to see all available options. Syntax of command is:

    search [OPTION...] PATTERN [PACKAGE...]

Where PATTERN is a glob or, with `--perlre`, Perl regular expression. For instance to find the packages that contains `/usr/sbin/ab` file:

    $ ipoldek search -l /usr/sbin/ab
    2 package(s) found:
    apache-2.0.53-4
    apache1-tools-1.3.33-4

Try to find something for audio files manipulation:

    $ ipoldek search --perlre /audio.+editor/
    3 package(s) found:
    ecawave-0.6.1-3
    piave-0.2.4-2
    rezound-0.11.1-0.beta.2

#### 4.5.3. desc - show package details

Command gives access to all package information: package description and summary, group, vendor, build time,requirements, capabilities and conflicts, full file list, etc. Type `"desc --help"` to see all available options. Example:

    poldek:/all-avail> desc apache
    Package:        apache-2.0.53-4
    Summary:        The most widely used Web server on the Internet
    Group:          Networking/Daemons
    Vendor:         PLD
    License:        Apache Group License
    Arch/OS:        i686/linux
    URL:            http://httpd.apache.org/
    Built:          2005/03/14 22:02 at i686.ac.pld-linux.org
    Size:           2.4 MB (2516798 B)
    Package size:   1.0 MB (1097448 B)
    Path:           http://ftp.pld-linux.org/dists/ac/PLD/i686/PLD/RPMS
    File:           apache-2.0.53-4.i686.rpm
    Description:
    Apache is a powerful, full-featured, efficient and freely-available
    Web server. Apache is also the most popular Web server on the Internet.

## 5. Security issues

Although there is not known security problems, it is strongly recommended to use poldek as an ordinary user and use the root privileges for package installation and removal only. It is possible in two ways with help of sudo command.

### 5.1. Using sudo

`use sudo` configuration opinion causes execution of rpm binary through sudo for read-write operations. The rest works without super user privileges.

Of course it is necessary to configure sudo to allow the user to run rpm binary.

`use sudo` is set to "auto" by default, means that rpm is executed through sudo when poldek is run by an ordinary user.

### 5.2. Automatic switching to an ordinary user

There is more automated way of using sudo. Configured by `runas` option poldek will automatically switch to an ordinary user if detects being executed by root. To setup this scenario, set `runas` option:

    runas = poldek

and configure “poldek” user account. There is `poldekuser-setup.sh` script which automates user account configuration supplied with poldek.

## 6. Repository management

poldek can be useful for distribution developers and maintainers by make detailed reports about package set consistency, automating move packages from one repository to another and helping to generate CD/DVD ISO images.

### 6.1. Verification of package set quality

poldek can do reports about package set consistency: dependency loops, unmet dependencies, conflicts between packages, orphaned directories and missing (not the same as unmet) dependencies. Reports are accessible through `--verify`(`-V`) switch with report type as argument.

Avaialble reports:

Dependency loops and unmet dependencies

  This report allows to verify if package set contain any unsatisfied dependencies and requirements (PreReqs) loops (loop makes impossible to install packages in the right order). This report is called deps and it is the default one, so it is accessible through `--verify` without an argument. Output example:

      $ poldek -n home --verify
      Verifying dependency loops...
      error: PreReq loop: pam <- coreutils <- pam <- SysVinit
      error: PreReq loop: xinitrc <- XFree86 <- xinitrc
      2 prerequirement loops detected

      Verifying dependencies...
      error: docbook-utils-0.6.13-7: req perl(Getopt::Long) >= 2.01 version mismatch
      eog-2.8.2-1: req libexif.so.10 not found
      error: ruby-gnome2-0.11.0-2: req ruby-rbogl not found
      3 unsatisfied dependencies found

Package conflicts

  Report prints all package pairs being in conflict or being obsoleted one another. It lets to verify if all conflicts are needed, what are redundant, and so on. Report is called conflicts. Output example (Obsoletes are printed with asterisk '*'):

      $ poldek -n foo --verify=conflicts
      Verifying conflicts...
      bind-9.2.5-2 -> *maradns-1.1.30-1, *dnsmasq-2.19-1, *pdnsd-1.1.8b1-0.par8.2
      maradns-1.1.30-1 -> *bind-9.2.5-2
      login-2.12-15 -> *heimdal-login-0.6.3-2
      pdnsd-1.1.8b1-0.par8.2 -> *maradns-1.1.30-1, *maradns-zoneserver-1.1.30-1
      shadow-4.0.4.1-3 -> pwdutils-2.6.90-3

File conflicts

  Report prints all package pairs being in conflict on file level and pairs which share the same file. It lets to verify if all file conflicts are wanted. Report is called file-conflicts:

      $ poldek -n foo --verify=file-conflicts
      Path: /usr/lib/perl5/vendor_perl/5.8.0/i686-pld-linux-thread-multi/Image
        shr   perl-base-5.8.6-3(D m40755 s4096)  -  ImageMagick-perl-6.1.8.9-1(D m40755 s4096)

      Path: /var/log/archiv/mail
        cnfl  syslog-ng-1.6.6-2(D m40755 s4096) <-> zmailer-2.99.56-4(D m40750 s48)

      Path: /usr/bin/digest
        cnfl  perl-XMLDigest-0.1-1(F m100755 s1418) <-> nss-tools-3.1-1(F m100755 s32964)

  '<' and '>' mean missing explicit conflict between packages.

Orphaned directories

  Report prints all directories without an owner, i.e. directories not explicit included in packages (a %files section of RPM spec file). In proper package distribution set such directories should not happened. Orphans are created with root's umask and they later cannot be verified by rpm.

  Report is called file-orphans:

      $ poldek -n foo --verify=file-orphans
      error: /etc/X11/dm: orphaned directory from gdm-2.4.4.5-1, gnome-session-2.4.0-1
      error: /var/games/phantasia: orphaned directory from bsd-games-2.16-2

Missing dependencies

  Report helps to avoid rather subtle packaging bugs when one package has files in directories owned by other package which is not requied by the first one.

  Report is called file-missing-deps:

      $ poldek -n foo --verify=file-missing-deps
      GConf-1.0.9-11: /etc/gconf: not in required packages (missing Requires: gnome-utils?)
      cups-1.1.19-13: /etc/logrotate.d: not in required packages (missing Requires: logrotate?)

Some or all of above reports may be requested at once, `--verify` can be fed by comma separated report list, for example:

    $ poldek -n foo --verify=deps,file-orphans,file-missing-deps

Package subset can verified too. If it is not desirable to verify whole repository, just give to poldek package list you want to verify:

    $ poldek -n foo --verify=deps --pset=packages-minicd.txt
    $ poldek -n foo --verify=deps glibc poldek

### 6.2. Preparation of distribution disks

poldek can partition package set for the purpose of placing it on removable media like DVD or CD. Package set is divided in the way that minimize needs of disk changes, i.e if distribution packages fits on 3 CDs, then only 2 changes of CD disk are necessary during installation system from a scratch. The invoking syntax is:

    $ poldek --split=SIZE[:FIRST_FREE_SPACE] [--priconf=FILE] [--split-out=PREFIX]

Where SIZE is a size of the chunk in megabytes. Optional FIRST_FREE_SPACE makes the first chunk FIRST_FREE_SPACE MB smaller, useful to save space for installer for example.

Packages are placed in successive chunks in order of their installation. To reorder packages moving some to higher or lower chunk, especially on first/ last one, priorities may be assigned to them. Package priorities are taken from file given by `--priconf`. Format of this file is quite simple, see sample `poldek-pri-sample.conf` supplied with poldek.

Each chunk is written as `NAME-EVR.ARCH.rpm` list to PREFIX.XX file, the default PREFIX is “packages.chunk”.

### 6.3. Managing repository packages

A typical scenario during distribution development looks like there is repository for untested packages from where they periodically, when found to be tested enough, are moved to the another repository marked as stable branch.

poldek can help movig packages between repositories through “to repository” installation, i.e. packages are copied from source to destination repository with full dependency checking. Thus this feature allows to move subtree of packages from one repository to another without a risk of break dependencies. The syntax is:

    $ poldek ... --dn SOURCE_NAME [--dn SOURCE_NAME] ...

Where SOURCE_NAME is a name of destination repository to which we want to move packages, for example:

    $ poldek -n ac-test --dn ac -uv libselinux
    Loading [pdir]ac-test...
    1161 packages read
    Loading [pdir]ac...
    Processing dependencies...
    libselinux-1.18-1 obsoleted by libselinux-1.22-1
      greedy upgrade libselinux-devel-1.18-1 to 1.22-1 (unresolved libselinux = 1.18-1)
        libselinux-devel-1.18-1 obsoleted by libselinux-devel-1.22-1
          greedy upgrade libselinux-static-1.18-1 to 1.22-1 (unresolved libselinux-devel = 1.18-1)
            libselinux-static-1.18-1 obsoleted by libselinux-static-1.22-1
      greedy upgrade libselinux-utils-1.18-1 to 1.22-1 (unresolved libselinux = 1.18-1)
        libselinux-utils-1.18-1 obsoleted by libselinux-utils-1.22-1
    There are 4 packages to install (3 marked by dependencies), 4 to uninstall:
    I libselinux-1.22-1
    D libselinux-devel-1.22-1, libselinux-static-1.22-1, libselinux-utils-1.22-1
    R libselinux-1.18-1, libselinux-devel-1.18-1, libselinux-static-1.18-1, libselinux-utils-1.18-1
    Need to get 153.9KB of archives (153.9KB to download).
    rm /home/ftp/pub/ac/libselinux-1.18-1.i686.rpm
    rm /home/ftp/pub/ac/libselinux-devel-1.18-1.i686.rpm
    rm /home/ftp/pub/ac/libselinux-static-1.18-1.i686.rpm
    rm /home/ftp/pub/ac/libselinux-utils-1.18-1.i686.rpm
    cp libselinux-utils-1.22-1.i686.rpm /tmp/RPMS/libselinux-utils-1.22-1.i686.rpm
    cp libselinux-static-1.22-1.i686.rpm /tmp/RPMS/libselinux-static-1.22-1.i686.rpm
    cp libselinux-devel-1.22-1.i686.rpm /tmp/RPMS/libselinux-devel-1.22-1.i686.rpm
    cp libselinux-1.22-1.i686.rpm /tmp/RPMS/libselinux-1.22-1.i686.rpm

Removing packages from repositories in that safe manner is also possible:

    $ poldek --dn ac -e poldek
    mark poldek-0.18.8-3
    Processing dependencies...
    poldek-0.18.8-3 marks libpi-0.1.1-1 (req poldek)
      libpi-0.1.1-1 marks libpi-devel-0.1.1-1 (req libpi = 0.1.1-1)
      libpi-0.1.1-1 marks pacman-0.1-3 (req libpi)
    poldek-0.18.8-3 marks poldex-0.17.4-1 (req poldek)
    There are 5 packages to remove (4 marked by dependencies):
    R poldek-0.18.8-3
    D libpi-0.1.1-1, libpi-devel-0.1.1-1, pacman-0.1-3, poldex-0.17.4-1
    Proceed? [y/N]

Sometimes it is not desirable to let poldek to move packages itself. With `--test` and `--parsable-tr-summary` switches easy to parse output is produced, what allows to handle move operation by external scripts. Example:

    $ poldek --dn ac -et poldek --parsable-tr-summary
    [cut]
    %R poldek-0.18.8-3
    %D libpi-0.1.1-1
    %D libpi-devel-0.1.1-1
    %D pacman-0.1-3
    %D poldex-0.17.4-1

## 7. Command line options reference

### 7.1. Repository index creation

`--mkidx[=PATH]`

  Create package index (under SOURCE-PATH by default)

`--mt=TYPE[,TYPE]`

  Set created index type (use --stl to list available values)

`--nodesc`

  Don't put package user-level information (like Summary or Description) into created index.

`--nodiff`

  Don't create index delta files

`--nocompress`

  Create uncompressed index

### 7.2. Repository selection

`-s, --source=PATH`

  Get packages info from repository under PATH

`-n, --sn=SOURCE-NAME`

  Get packages info from repository named SOURCE-NAME

`--dn=SOURCE-NAME`

  Install to source SOURCE-NAME instead to the system

`--st=SOURCE-TYPE`

  Set the source type (use --stl to list available values)

`-P, --prefix=PREFIX`

  Get packages from PREFIX instead of SOURCE

### 7.3. Repository related actions

`--stl`

  List available source types

`-l, --sl`

  List configured sources

`--update`

  Update the source and verify it

`--update-whole`

  Update whole index of source

`--clean`

  Remove source index files from cache directory

`--clean-pkg`

  Remove cached packages of the source

`--clean-whole`

  Remove all files belongs to source from cache directory

### 7.4. Package related options

`--pset=FILE`

  Take package set definition from FILE

`--caplookup`

  Look into package capabilities and files to resolve packages

### 7.5. Package installation

`-i, --install`

  Install given packages

`--reinstall`

  Reinstall given packages

`--downgrade`

  Downgrade

`-u, --upgrade`

  Upgrade given packages

### 7.6. Distribution installation/upgrade

`--install-dist=DIR`

  Install package set under DIR as root directory

`--upgrade-dist[=DIR]`

  Upgrade all packages needs upgrade

`--reinstall-dist[=DIR]`

  Reinstall all packages under DIR as root directory

### 7.7. Installation switches

`--hold=PACKAGE[,PACKAGE]...`

  Prevent packages listed from being upgraded if they are already installed. If option is not set then packages to hold are taken from `hold` configuration option. Held package won't be upgraded with exception if it will be pointed directly by the user.

  Example:

         $ poldek --hold=kernel\*,dev ...

  Configuration option: `hold = PACKAGE[,PACKAGE]...`

`--nohold`

  Do not hold any packages. Disables --hold settings.

`--ignore=PACKAGE[,PACKAGE]...`

  Make packages listed invisible to the program. If option is not set then packages to ignore are taken from `ignore` configuration option.

  Example:

        $  poldek --ignore=kernel\*-smp\*,foo

  Configuration option: `ignore = PACKAGE[,PACKAGE]...`

`--noignore`

  Make invisibled packages visible. Disables --ignore settings.

`-Q, --uniq`

  Remove package duplicates from available package list

`--parsable-tr-summary`

  Print installation summary in parseable form

`--force`

  Install packages ignoring broken dependencies, conflicts, etc

`-t, --test`

  Do not install packages, but tell if it would work or not. Given once causes poldek's checks only, to perform full tests using rpm;, option must be given twice.

`-F, --fresh`

  Upgrade packages, but only if an earlier version currently exists

`-N, --nofollow`

  Don't install packages required by selected ones

`--follow[=[yes|no]]`

  Install packages required by selected ones

`--greedy[=[yes|no]]`

  Automatically upgrade packages which dependencies are broken by uninstalled ones, for example if package foo is upgraded from version 1.0 to 1.2 and package foo-devel is already installed with requirement "foo = 1.0" then foo-devel will be upgraded to version 1.2 too.

  Configuration option: `greedy = [yes|no]`

`--fetch[=DIR]`

  Download packages to DIR (poldek's cache directory by default)instead of install them

`-r, --root=DIR`

  Set top directory to DIR

`--nodeps`

  Install packages with broken dependencies

`-m, --mercy`

  Be tolerant for unmatched versioned dependencies which rpm; tolerates, e.g. package A requires capability foo >= 1.0 while package B provides "foo" without any version. Use with care.

  Configuration option: `mercy = [yes|no]`

`--promoteepoch`

  Promote non-existent requirement's epoch to package's one (rpm; < 4.2.1 behaviour).

  Configuration option: `promoteepoch = [yes|no]`

`--dump[=FILE]`

  Print packages file names to FILE (stdout by default) instead of install them

`--dumpn[=FILE]`

  Print packages names to FILE (stdout by default) instead of install them

`--justdb`

  Modify only the database

`--pm-nodeps`

  Same as --nodeps but applied to PM (rpm) only

`--pm-force`

  Same as --force but applied to PM (rpm) only)

`--pmopt=OPTION`

  Pass option to package manager (rpm) binary. Example:

          $ poldek --pmopt=ignoreos

### 7.8. Package deinstallation

`-e, --erase`

  Uninstall given packages

`-t, --test`

  Do not remove, but tell if it would work or not

`-N, --nofollow`

  Remove only selected packages

`--nodeps`

  Ignore broken dependencies

`--greedy[=[yes|no]]`

  Remove packages required by selected ones if possible

### 7.9. Verification options/switches

`-V, --verify[=REPORT-TYPE...]`

  Verify package set, available reports are: 'deps', 'conflicts', 'file-conflicts', 'file-orphans' and 'file-missing-deps'. Default is 'deps'.

### 7.10. Splitting options

`--split=SIZE[:FIRST_FREE_SPACE]`

  Split packages to SIZE MB size chunks, the first chunk will be FIRST_FREE_SPACE MB smaller

`--priconf=FILE`

  Take package priorities from FILE

`--split-out=PREFIX`

  Write chunks to PREFIX.XX, default PREFIX is 'packages.chunk'

### 7.11. Miscellaneous options

`--pmcmd=FILE`

  Use FILE as PM(rpm) binary

`--sudocmd=FILE`

  Use FILE as sudo binary

`--cachedir=DIR`

  DIR points to directory where all downloaded files will be stored. If not set then $TMPDIR is used. If $TMPDIR is not set then $HOME/.poldek-cache is created and used as cache directory

`--cmd`

  Run in command mode (like ipoldek does by default)

`--ask`

  Confirm packages installation and let user choose among equivalent packages

`--noask`

  Don't ask about anything

`--shell`

  Run in interactive mode (default)

`--skip-installed`

  Don't load installed packages at startup

`--conf=FILE`

  Read configuration from FILE

`--noconf`

  Do not read configuration

`--upconf`

  Update remote configuration files (if any)

`--version`

  Display program version information and exit

`--log=FILE`

  Log program messages to FILE

`--runas=USER`

  Run program as user USER

`-O OPTION=VALUE`

  Can be used to give options in the format used in the configuration file. This is useful for specifying options for which there is no separate command-line flag. Whitespaces in option names may be replaced with underscore '_' or dash '-' there, for example:

      $ poldek -O keep-downloads=yes

`-v`

  Be verbose.

`-q`

  Do not produce any output.

## 8. Configuration

### 8.1. File format

The file consists of directives, sections and parameters. A section begins with thename of the section in square brackets and continues until the next section begins ('ini'-like format). Sections contain parameters of the form:

    name = value

The file is line-based - that is, each newline-terminated line represents either a comment, a section name or a parameter. Any line beginning with a hash (``#'') character is ignored, as are lines containing only whitespace.

In most string paramameters environment variables are expanded:

    path = $HOME/foo

### 8.2. Special directives

File can be combined from multiple configuration files with `%include` directive. Either local and remote HTTP/FTP files can be included, examples:

    %include /etc/foo.conf            # simply include /etc/foo.conf
    %include foo.conf                 # include foo.conf from directory of includer
    %include http://bar.org/foo.conf  # include foo.conf from remote location

Any "[global]" sections from included files are simply ignored. Remote files are cached, they can be updated using `--upconf` switch.

Second directive, `%includedir` includes all *.conf files from given directory, examples:

    %include repos.d                  # include all *.conf files from repos.d subdirectory
    %include /etc/repos.d             # include all *.conf files from /etc/repos.d

### 8.3. Macros

Simple macros are supported. Macros are declared as paramameter with underscore ('_') at beginning:

    _foo = /bar

and can be expanded in any following value in %{NAME} form:

    path = %{_foo}/dir    # path will be '/bar/dir'

Macros are local to file beeing declared, they are not visible in included files as they are not visible to includer.

### 8.4. Section descriptions

There are three section types: [global], [source] and [fetcher].

`[global]`

  Section contains global paramameters. May be declared multiple times, in this case content of all global sections are concatenated.

`[source]`

  This section contains poldek's repository configuration. Each section describes one repository.

`[fetcher]`

  Configuration of external file getters. Each section declares one external downloader.

To make things simpler default configuration consists of several files. Repositories are declared in separate `source.conf` and `*-source.conf`, file getters are declared in `fetch.conf`. All of them are included by `poldek.conf`.

### 8.5. Parameters of [global] section

`default index type`

  This parameter allows to configure the default repository index type.

  Default: default index type = pndir

`cachedir`

  Cache directory for downloaded files. NOTE that parent directory of cachedir must exist.

  Default: cachedir = $HOME/.poldek-cache

`runas`

  Switch to ordinary user at startup when executed by root

  Default: runas =

`use sudo`

  Permits using root privileges for installation only. If set to "auto" then automatically turned on when poldek executed as ordinary user.

  Default: use sudo = auto

`load apt sources list`

  Load `/etc/apt/sources.list`.

  Default: load apt sources list = no

`vfile external compress`

  Handle gzipped indexes externally (needed on RedHat 9 and Fedora Core 1 and 2). This option is a workaround for broken zlib linked into librpm; with enabled 'auto zlib in rpm' poldek tries to detect such case and then enables external *.gz handling automatically.

  Default: vfile external compress = no

`auto zlib in rpm`

  Auto detection of zlib linked into librpm. See 'vfile external compress' description.

  Default: auto zlib in rpm = yes

`autoupa`

  Automatically download whole index if incremental update fails.

  Default: autoupa = yes

`exclude path`

  Do not save given paths into created indexes. This option may significantly reduce index size. Example (notice missing starting '/'):

       exclude path = usr/share/doc:usr/share/man:usr/src

`pm command`

  Full path name to a PM (rpm for now) binary.

  Default: pm command = /bin/rpm

`sudo command`

  Full path name to sudo binary.

  Default: sudo command = /usr/bin/sudo

File downloaders configuration

`vfile ftp sysuser as anon passwd`

  Send ${USER}@${HOSTNAME} as anonymous FTP password (by default `'poldek@znienacka.net'` is sent)

  Default: vfile ftp sysuser as anon passwd = no

`default fetcher`

  File getters configuration parameter. By this option URL handlers may be configured. To get file from HTTP and FTP servers poldek uses its internal client (what is recommended), although it can be changedby this option. Others protocols handled by external utilities can be configured also. The syntax is:

       default fetcher = PROTOCOL[,PROTOCOL...]:FETCHER_NAME

  where FETCHER_NAME is a name of one of the fetcher preconfigured in [fetch] sections (placed in `fetch.conf` in default configuration). Examples:

       default fetcher = ftp,http:internal
       default fetcher = https:wget
       default fetcher = cdrom:vfjuggle

  `vfjuggle` is a cdrom getter supplied with poldek.

  Default: default fetcher = http,ftp: internal

`proxy`

  Proxies for internal FTP and HTTP client may be configured in usual way, by environment variables ftp_proxy and http_proxy, or by this option. Its syntax is similar to "default fetcher" one:

       proxy = PROTOCOL[,PROTOCOL...]:PROXY_URL

  Example:

       proxy = http: http://w3cache.foo.org:8080

  Default: proxy =

`noproxy`

  Comma separated list of hosts or domains which will not be accessed via proxy. Option overrides no_proxy environment variable. Example:

       noproxy = localhost, .pl, ftp.foo.bar.org

  Default: noproxy =

`vfile retries`

  Internal HTTP and FTP client is stubborn, it retries to retrive file if connection breaks. This option tells it how many times it should try.

  Default: vfile retries = 128

Installation options

`particle install`

  Install packages in small groups instead of doing all-or-nothing installations.

  Default: particle install = yes

`keep downloads`

  Do not remove downloaded packages after its successful installation.

  Default: keep downloads = no

`unique package names`

  Controls visibility of multiple package instances with different EVR. If on, only one, highest version will be visible.

  Default: unique package names = no

`promoteepoch`

  Epoch autopromotion during dependency comparision. RPM specific. Set it up if you are using system with rpm prior to 4.2.1 version.

  Default: promoteepoch = no

`confirm installation`

  Confirm packages installation.

  Default: confirm installation = no

`confirm removal`

  Confirm packages removal.

  Default: confirm removal = yes

`choose equivalents manually`

  Let the user select package among equivalents.

  Default: choose equivalents manually = no

`hold`

  Prevent package listed from being upgraded if they are already installed.

       hold = kernel*

  Default: hold =

`ignore`

  Ignore package list - packages fits given mask will be invisible.

       ignore = *-smp-* foo*
       ignore = vserver-packages

  Default: ignore =

`allow duplicates`

  Conflicts with already installed packages are treated as resolved if at least one of multiple-installed package satisfies conflict. rpm doesn't support such cases, so `--pm-nodeps` is needed (use with care).

  Default: allow duplicates = yes

RPM specific options

`rpmdef`

  rpm macros can be set by this option. Examples:

       rpmdef   = _install_langs pl:pl_PL:lt:lt_LT

  Do not install any documentation:

       rpmdef  = _netsharedpath /usr/share/info:/usr/share/man
       rpmdef  = _excludedocs 1

  If non-zero, all erasures will be automagically repackaged.

       rpmdef  = _repackage_all_erasures 1

  Default: rpmdef =

Dependency processing settings

Subtle dependency processing options, they should not be changed unless you know what you are doing

`auto directory dependencies`

  RPM 4.4.6 introduces auto dependencies based on package directories. Option controls this feature.

  Default: auto directory dependencies = auto

`follow`

  Automatically install packages required by installed ones.

  Default: follow = yes

`greedy`

  Greedy upgrades, i.e. upgrade packages which dependencies are broken by being uninstalled ones.

  Default: greedy = yes

`aggressive greedy`

  Be yet more greedy; if successor of orphaned package found, and this successor drags no packages then upgrade the package instead of process its dependencies. Option value is implied by 'greedy' one by defalut.

  Default: aggressive greedy = yes

`mercy`

  Be tolerant for unmatched versioned dependencies which rpm tolerates, e.g. package A requires capability foo >= 1.0 while package B provides "foo" without any version. Use with care, it may cause weird dependency errors.

  Default: mercy = no

`suggests`

  Taking into account package Suggests.

  Default: suggests = yes

`obsoletes`

  Taking into account package Obsoletes.

  Default: obsoletes = yes

`conflicts`

  Taking into account package Conflicts.

  Default: conflicts = yes

### 8.6. Parameters of [source] section

This section contains poldek's repository configuration. Every repository is configured in its own [source] section.

`name`

  Unique name of the repository.

`type`

  Type of repository index. Permitted values are 'pndir', 'pdir', 'apt', 'yum' and 'dir' as listed by `--stl` switch.

`original type`

  This parameter sets index original type i.e type of repository from what this repository is created. Default is 'dir' - means that directory of packages is scanned.

  Default: original type = dir

`path`

  Unique name of the repository. May be either path or URL.

`prefix`

  If package index and packages are stored in different locations then prefix stands for packages path.

`douniq`

  Controls visibility of multiple package instances with different EVR. If on, only one, highest version will be visible.

  Default: douniq = no

`pri`

  Repository priority. If the same packages (equal names and EVR) are available in more than one source then package from highest prioritized source are taken. Priority is numeric value. Lower number means higher priority, and negative priorities are allowed. Priority is numeric value.

  Default: pri = 0

`auto`

  Controling if repository index will be implicit loaded. Set it off if the index should be loaded on demand only, i.e. if specified directly by `--sn` option.

  Default: auto = yes

`autoup`

  Controls if repository index will be implicit updated. Set it off if the index should be updated on demand only, i.e. if specified directly by `--sn` option.

  Default: autoup = yes

`signed`

  Packages PGP/GPG signatures (if any) will be verified before their installation.

  Default: signed = no

`hold`

  Have the same meaning as [global] parameter. Example:

       hold = kernel* dev

  Default: hold =

`ignore`

  Have the same meaning as [global] parameter. Example:

       ignore = kernel*smp* dev

  Default: ignore =

`exclude path`

  Parameter have the same meaning as [global] parameter.

       exclude path = usr/share/doc:usr/share/man:usr/src

  Default: exclude path =

`lang`

  Preferred language of package descriptions. If not set, taken from locale settings. Example:

       lang = pl_PL:lt_LT

`sources`

  Make sense for 'group' source type only. A list of names of sources.

### 8.7. Parameters of [fetcher] section

This section contains external downloaders configuration. Each section describes one fetcher.

`name`

  Unique name of the fetcher. This is an optional parameter, if not set then name is taken from the "cmd" parameter value as "$(basename $cmd)".

`proto`

  Protocol or protocols supported by fetcher. Name of the protocol can be completely arbitrary, i.e. if you can handle protocol "foo" by writing a script which takes URLs in form 'foo://'.

`cmd`

  Parameter specifies an external command and its invoking syntax. The syntax of "cmd" is:

       cmd = COMMAND [ OPTION... ] {%d,%D}  {%p,%P}[n]

  Where COMMAND is the name or full path of command, OPTION is command specific options. Macro '%d' is replaced with cache directory, '%D' is replaced with 'cache directory/file basename', and '%p' with file basename, %P with file full path (URL). Optional suffix 'n' with %p and %P means that command can be invoked with multiple files at once.

## 9. Cookbook

### 9.1. Repository index creation

Create an index of ~/rpm/RPMS, its type is taken from `default index type` configuration option:

    $ poldek -s ~/rpm/RPMS --makeidx

Create an index of configured repository home, its type is defined in configuration:

    $ poldek -n home --makeidx

Indexes may be created for multiple repositories at once:

    $ poldek -n fedora-c2 -n fedora-c2-up --makeidx

Multiple indexes of different types may be created at once using `--mt` switch:

    $ poldek -n home --makeidx --mt=pndir,pdir

### 9.2. Installation system from a scratch

Install from fedora-c3 repository apache and all its dependencies under `/mnt/chroot` as root directory:

    $ poldek -n fedora-c3 --install-dist=/mnt/dest -v apache

As above but packages listed in `minicd.txt` is installed:

    $ poldek -n fedora-c3 --install-dist=/mnt/dest -v --pset=minicd.txt

Do not install, only download packages to `/tmp` directory:

    $ poldek -n fedora-c3 --install-dist=/mnt/dest -v --pset=minicd.txt --fetch=/tmp

### 9.3. Managing packages

Download all packages needs upgrade to `/var/tmp` directory:

    $ poldek -n pld-updates --upgrade-dist -v --fetch=/var/tmp

Dump filenames of packages needs upgrade to `/tmp/uplist.txt` file:

    $ poldek -n pld-updates --upgrade-dist -v --dump=/tmp/uplist.txt

Upgrade all packages needs upgrade with logging details to `/tmp/poldek.log` file:

    $ poldek -n pld-updates --upgrade-dist -v --log=/tmp/uplist.txt

### 9.4. Miscellaneous

Divide repository packages into 650 MB chunks, first chunk will be 100 MB smaller. Files with lists of packages placed in chunks will be named `cd.XX`:

    $ poldek -n pld --split=650:100 --split-out=/tmp/cd
    Loading [pdir]pld...
    11600 packages read
    Writing /tmp/cd.00 ( 876 packages, 547.93M, pri min, max = 0, 0)
    Writing /tmp/cd.01 (1084 packages, 647.46M, pri min, max = 0, 0)
    Writing /tmp/cd.02 ( 979 packages, 649.92M, pri min, max = 0, 0)
    Writing /tmp/cd.03 (1454 packages, 648.44M, pri min, max = 0, 0)
    [cut]

Above with assigned package priorities taken from `poldek-pri-sample.conf`.

    $ poldek -n pld --split=650:100 --split-out=/tmp/cd --priconf=poldek-pri-sample.conf
    Loading [pdir]pld...
    11600 packages read
    Writing /tmp/cd.00 ( 928 packages, 549.12M, pri min, max = -100, 0)
    Writing /tmp/cd.01 (1012 packages, 649.36M, pri min, max = 0, 0)
    Writing /tmp/cd.02 (1283 packages, 646.22M, pri min, max = 0, 0)
    Writing /tmp/cd.03 ( 650 packages, 563.60M, pri min, max = 0, 0)
    [cut]

## A. Package priorities configuration sample

    # $Id$
    # By default all packages have 0 priority value. Packages specified by mask
    # only (e.g. quota below) have -1 priority.
    #
    # MASK [PRI]

    quota
    vim
    postfix
    geninitrd
    kernel
    FHS
    gcc
    xemacs*
    xmms
    rpm
    poldek                  -100
    vim-static              -10

    # low priorities
    XFree86*                10
    lesstif			10
    kde*			100
    gnome*			100
    Atari800*		200
    MHonArc*                100
    Glide*			100
    *-devel*                2
    *-static* 		100

## Index

### Symbols

$HOME/.poldek-cache file, Cache
$HOME/.poldekrc file, Step #1 - Configure repositories
%include, Special directives
%includedir, Special directives
--ask, Miscellaneous options
--cachedir=DIR, Miscellaneous options
--caplookup, Specifying packages, Package related options
--clean, Repository related actions, Cache
--clean-pkg, Repository related actions, Cache
--clean-whole, Repository related actions, Cache
--cmd, Miscellaneous options
--conf=FILE, Miscellaneous options
--dn=SOURCE-NAME, Repository selection
--downgrade, Package installation
--dumpn[=FILE], Installation switches
--dump[=FILE], Installation switches
--erase, Step #3 - Use the program
--fetch[=DIR], Installation switches
--follow[=[yes|no]], Installation switches
--force, Installation switches
--greedy[=[yes|no]], Installation switches, Package deinstallation
--help, Step #3 - Use the program
--hold=PACKAGE[,PACKAGE]..., Installation switches
--ignore=PACKAGE[,PACKAGE]..., Installation switches
--install, Step #3 - Use the program
--install-dist, Installation system from a scratch
--install-dist=DIR, Distribution installation/upgrade
--justdb, Installation switches
--log=FILE, Miscellaneous options
--mkidx, Creating
--mkidx[=PATH], Repository index creation
--mt, Creating, Repository index creation
--mt=TYPE[,TYPE], Repository index creation
--noask, Miscellaneous options
--nocompress, Creating, Repository index creation
--noconf, Miscellaneous options
--nodeps, Installation switches, Package deinstallation
--nodesc, Creating, Repository index creation
--nodiff, Creating, Repository index creation
--nohold, Installation switches
--noignore, Installation switches
--parsable-tr-summary, Installation switches, Managing repository packages
--perlre, Obtaining information about packages
--pm-force, Installation switches
--pm-nodeps, Parameters of [global] section, Installation switches
--pmcmd=FILE, Miscellaneous options
--pmopt=OPTION, Installation switches
--prefix, Selection
--priconf, Preparation of distribution disks
--priconf=FILE, Splitting options
--promoteepoch, Installation switches
--pset, Specifying packages
--pset=FILE, Package related options
--reinstall, Package installation
--reinstall-dist[=DIR], Distribution installation/upgrade
--runas=USER, Miscellaneous options
--shell, Miscellaneous options
--skip-installed, Miscellaneous options
--sl, Listing available repositories
--sn, Parameters of [source] section, Selection
--source, Selection
--split-out=PREFIX, Splitting options
--split=SIZE[:FIRST_FREE_SPACE], Splitting options
--st=SOURCE-TYPE, Repository selection
--stl, Repository related actions, Parameters of [source] section, Listing available repository types
--sudocmd=FILE, Miscellaneous options
--test, Managing repository packages
--up, Updating
--upa, Updating
--upconf, Special directives, Miscellaneous options
--update, Repository related actions, Updating
--update-whole, Repository related actions, Updating
--upgrade, Step #3 - Use the program
--upgrade-dist, Installing packages
--upgrade-dist[=DIR], Distribution installation/upgrade
--verify, Verification of package set quality
--version, Miscellaneous options
-e, Step #3 - Use the program
-e, --erase, Package deinstallation
-F, --fresh, Installation switches
-i, Step #3 - Use the program
-i, --install, Package installation
-l, Listing available repositories
-l, --sl, Repository related actions
-m, --mercy, Installation switches
-n, Step #3 - Use the program, Creating, Cache, Selection
-N, --nofollow, Installation switches, Package deinstallation
-n, --sn=SOURCE-NAME, Repository selection
-O OPTION=VALUE, Miscellaneous options
-P, --prefix=PREFIX, Repository selection
-q, Miscellaneous options
-Q, --uniq, Installation switches
-r, --root=DIR, Installation switches
-s, Creating, Cache, Selection
-s, --source=PATH, Repository selection
-t, --test, Installation switches, Package deinstallation
-U, Step #3 - Use the program
-u, Step #3 - Use the program
-u, --upgrade, Package installation
-V, Verification of package set quality
-v, Miscellaneous options
-V, --verify[=REPORT-TYPE...], Verification options/switches
/etc/apt/sources.list file, Repositories configuration
/etc/poldek/source.conf file, Step #1 - Configure repositories
[fetcher], Section descriptions
[global], Section descriptions
[source], Section descriptions

### A

aggressive greedy, Parameters of [global] section
allow duplicates, Parameters of [global] section
auto, Parameters of [source] section, Selection
auto directory dependencies, Parameters of [global] section
auto zlib in rpm, Parameters of [global] section
autoup, Parameters of [source] section
autoupa, Parameters of [global] section

### C

cachedir, Parameters of [global] section, Cache
choose equivalents manually, Parameters of [global] section
cmd, Parameters of [fetcher] section
confirm installation, Parameters of [global] section
confirm removal, Parameters of [global] section
conflicts, Parameters of [global] section

### D

default fetcher, Parameters of [global] section
default index type, Parameters of [global] section, Repositories configuration, Creating, Repository index creation
douniq, Parameters of [source] section

### E

exclude path, Parameters of [global] section, Parameters of [source] section

### F

follow, Parameters of [global] section

### G

greedy, Parameters of [global] section
greedy = [yes|no], Parameters of [fetcher] section

### H

help, Step #3 - Use the program
hold, Parameters of [global] section, Parameters of [source] section, Parameters of [fetcher] section
hold = PACKAGE[,PACKAGE]..., Parameters of [fetcher] section

### I

ignore, Parameters of [global] section, Parameters of [source] section, Parameters of [fetcher] section
ignore = PACKAGE[,PACKAGE]..., Parameters of [fetcher] section
install, Step #3 - Use the program
install -IN, Step #3 - Use the program

### K

keep downloads, Parameters of [global] section, Cache

### L

lang, Parameters of [source] section
load apt sources list, Parameters of [global] section, Repositories configuration

### M

mercy, Parameters of [global] section
mercy = [yes|no], Parameters of [fetcher] section

### N

name, Parameters of [source] section, Parameters of [fetcher] section
noproxy, Parameters of [global] section

### O

obsoletes, Parameters of [global] section
original type, Parameters of [source] section

### P

particle install, Parameters of [global] section
path, Parameters of [source] section
pm command, Parameters of [global] section
poldekuser-setup.sh file, Automatic switching to an ordinary user
prefix, Parameters of [source] section
pri, Parameters of [source] section
promoteepoch, Parameters of [global] section
promoteepoch = [yes|no], Parameters of [fetcher] section
proto, Parameters of [fetcher] section
proxy, Parameters of [global] section

### R

rpmdef, Parameters of [global] section
runas, Parameters of [global] section, Automatic switching to an ordinary user

### S

signed, Parameters of [source] section
sources, Parameters of [source] section
sudo command, Parameters of [global] section
suggests, Parameters of [global] section

### T

type, Parameters of [source] section, Repositories configuration

### U

uninstall, Step #3 - Use the program
unique package names, Parameters of [global] section
use sudo, Parameters of [global] section, Using sudo

### V

vfile external compress, Parameters of [global] section
vfile ftp sysuser as anon passwd, Parameters of [global] section
vfile retries, Parameters of [global] section