Материал из Rosalab Wiki
Версия от 16:31, 27 декабря 2011; Anton.kirilenko (обсуждение | вклад) (Список инструментов)

Это снимок страницы. Он включает старые, но не удалённые версии шаблонов и изображений.
Перейти к: навигация, поиск

Urpm-tools - набор утилит, расширяющих и дополняющих функциональность urpmi, urpmq, urpmf и urpme.

По возможностям urpm-tools схожи с yum-utils (и частично на них основаны). Для большей совместимости инструменты urpm-tools имеют схожие с yum-utils названия и одинаковые опции для одинаковых действий.

Список инструментов

В первую версию пакета вошли следующие инструменты:

Tool Description
urpm-downloader скачивание пакета вместе со всеми зависимостями, source-пакетом (и всеми build-зависимостями), debug-info.
urpm-package-cleanup чистка установленных пакетов
urpm-repoclosure проверка замкнутости репозитория по зависимостям
urpm-repodiff diff двух репозиториев
urpm-repomanage анализ набора RPM-файлов и выделение самых новых и устаревших версий каждого пакета

В дальнейшем планируется добавление еще нескольких полезных утилит:

Tool Description
urpm-build-distrib создание дистрибутива на основе нескольких репозиториев
urpm-debuginfo-install установка пакетов debuginfo, необходимых для отладки программ из заданного пакета (To be integrated into urpm-downloader)
urpm-distrosync синхронизация локального набора пакетов с репозиторием
urpm-repograph построение графа зависимостей пакетов в репозитории

Некторые возможности, предоставляемые утилитами yum и yum-utils, поддерживаются непосредственно urpmi и компанией:

Yum Tool Urpmi analogue Description
yum-builddep urpmi --buildrequires установка зависимостей, необходимых для сборки заданного SRPM (на основе самого пакета или spec-файла)
createrepo genhdlist2 создание репозитория на основе набора RPM-файлов
repoquery urpmq запросы к репозиторию, аналогичные тем, что умеет делать rpm для пакетов

See also: Package Manager Options


A tool to check dependency closure in the repository.


  urpm-repoclosure [-h] [-list=PACKAGES_LIST] [--dir=PACKAGES_DIR] [--hdlist=HDLIST]
                      [--static] [--check-release] [--check-signature] [--media MEDIA]
                      [--noclean] [--root ROOT]


    urpm-repoclosure --hdlist=hdlist.txt --static
    urpm-repoclosure --list=list.txt --media=local
    urpm-repoclosure --dir=rpms/ --static
    urpm-repoclosure --dir=rpms/ --check-release --sign
    urpm-repoclosure --list=list.txt --check-release


      Print help message.

      Print version information.

  -l|-list <path>
      The list of package names to check.

  -d|-dir <path>
      The directory with RPM packages to check.

  -hdlist <path>
      The HDlist to check.

      Check statically if all required dependencies are
      satisfied by provided dependencies in the set of
      RPM packages. Should be used with --dir or --hdlist options.

      Check installation media (DVD).
      You can use this option with --dir or --list options.
      If you are using --list option, then it should point
      to a list of package paths.

      Validate package signatures. Should be used
      with --dir option.

  -media <name|dir>
   [ not implemented yet ]
      Use local repository (or directory) instead of the
      default external repository.

      Do not clean urpmi cache.

  -root <path>
      Where to install packages.


A tool for downloading RPMs from Urpmi repositories


usage: urpm-downloader.py [-h] [-u] [-r] [-a] [-b] [-s] [-d] [--version] [-v]
                          [--include-media INCLUDE_MEDIA [INCLUDE_MEDIA ...]]
                          [--exclude-media EXCLUDE_MEDIA [EXCLUDE_MEDIA ...]]
                          [-x EXCLUDE_PACKAGES [EXCLUDE_PACKAGES ...]] [-i]
                          [-o] [--all-alternatives] [--all-versions]
                          [--dest-dir DEST_DIR]
                          packages [packages ...]

A tool for downloading RPMs and SRPMs from URPM-based linux repositories

positional arguments:
  packages              Package name(s) to download

optional arguments:
  -h, --help            show this help message and exit
  -u, --urls            Instead of downloading RPMs, list the URLs that would
                        be downloaded
  -r, --resolve         When downloading RPMs, resolve dependencies and also
                        download the required packages, if they are not
                        already installed
  -a, --resolve-all     When downloading RPMs, resolve dependencies and also
                        download the required packages, even if they are
                        already installed
  -b, --binary          Download binary RPM. Default: True
  -s, --source          Instead of downloading the binary RPMs, download the
                        source RPMs
  -d, --debug-info      Download debug info
  --version             show program's version number and exit
  -v, --verbose         Verbose (print additional info)
  -q, --quiet           Quiet operation.
                        Use only selected URPM media
  --exclude-media EXCLUDE_MEDIA [EXCLUDE_MEDIA ...]
                        Do not use selected URPM media
                        Exclude package(s) by regex
  -i, --ignore-errors   Try to continue when error occurs
  -o, --overwrite       If the file already exists, download it again and
                        overwrite the old one
  --all-alternatives    If package dependency can be satisfied by several
                        packages, download all of them (by default, only the
                        first one is downloaded)
  --all-versions        If different versions of package present in
                        repository, process them all
  --dest-dir DEST_DIR   Specify a destination directory for the download

If none of the options -b, -s, -d is on, it will be treated as -b


Take 2 or more repositories and return a list of added, removed and changed packages.


urpm-repodiff --old old_repo_baseurl [old_repo_baseurl ...] --new new_repo_baseurl [new_repo_baseurl ...]

optional arguments:
  -h, --help            show this help message and exit
  -o, --old old_repo_baseurl [old_repo_baseurl ...]
                        URLs to old repository
  -n, --new new_repo_baseurl [new_repo_baseurl ...]
                        URLs to new repository
  -s, --size            show differences in package sizes
  --simple              simple output format


Find problems in the rpmdb of system and correct them.

The tool can perform the following actions:

  1. Look for situation when multiple versions of the same package are installed; the tool can automatically uninstall all versions except the latest one.
    • There is a separate check for kernel packages; it takes into account running kernel and never tries to uninstall it, and in addition allows to specify number of kernels that should be left in the system.
  2. Look for installed packages that are not available in any configured repository (this is just a wrapper for `urpmq --not-available`).
  3. Look for installed packages that have unmet dependencies.
  4. List "leaf" nodes in the local RPM database. Leaf nodes are RPMs that are not relied upon by any other RPM.


urpm-package-cleanup [-h] [--qf QF] [--orphans] [--auto] [--version]
                        [--problems] [--suggests] [--dupes]
                        [--cleandupes] [--noscripts] [--leaves] [--all]
                        [--leaf-regex LEAF_REGEX] [--exclude-devel]
                        [--exclude-bin] [--oldkernels]
                        [--count KERNELCOUNT] [--keepdevel]

optional arguments:
  -h, --help            show this help message and exit
  --qf QF, --queryformat QF
                        Query format to use for output.
  --auto                Use non-interactive mode
  --version             show program's version number and exit

Orphans Options:
  --orphans             List installed packages which are not available from
                        currently configured repositories
  --update              Use only update media. This means that urpmq will
                        search and resolve dependencies only in media marked
                        as containing updates (e.g. which have been created
                        with "urpmi.addmedia --update").
  --media media [media ...]
                        Select specific media to be used, instead of
                        defaulting to all available media (or all update media
                        if --update is used). No rpm will be found in other
  --excludemedia media [media ...]
                        Do not use the specified media.

Dependency Problems Options:
  --problems            List dependency problems in the local RPM database
  --suggests            List missing suggestions of installed packages

Duplicate Package Options:
  --dupes               Scan for duplicates in your rpmdb
  --cleandupes          Scan for duplicates in your rpmdb and remove older
  --noscripts           disable rpm scriptlets from running when cleaning

Leaf Node Options:
  --leaves              List leaf nodes in the local RPM database
  --all                 list all packages leaf nodes that do not match leaf-
  --leaf-regex LEAF_REGEX
                        A package name that matches this regular expression
                        (case insensitively) is a leaf
  --exclude-devel       do not list development packages as leaf nodes
  --exclude-bin         do not list packages with files in a bin dirs as leaf

Old Kernel Options:
  --oldkernels          Remove old kernel and kernel-devel packages
  --count KERNELCOUNT   Number of kernel packages to keep on the system
                        (default 2)
  --keepdevel           Do not remove kernel-devel packages when removing


Manage a directory of rpm packages and report newest or oldest packages


urpm-repomanage [-h] [-o] [-n] [-s] [-k KEEP] [-c] path

positional arguments:
  path                  path to directory with rpm packages

optional arguments:
  -h, --help            show this help message and exit
  -o, --old             print the older packages
  -n, --new             print the newest packages (this is the default
  -s, --space           space separated output, not newline
  -k KEEP, --keep KEEP  number of newest packages to keep - defaults to 1
  -c, --nocheck         do not check package payload signatures/digests
  -V, --verbose         be verbose - say which packages are decided to be old
                        and why (this info is dumped to STDERR)