Difference between revisions of "Urpm-tools"

From Rosalab Wiki
Jump to: navigation, search
m (added link to Russian page)
m (reword intro)
Line 1: Line 1:
 
{{Introduction|Urpm-tools is a set of utilities for manipulating urpmi repositories.}}
 
{{Introduction|Urpm-tools is a set of utilities for manipulating urpmi repositories.}}
  
Functionality of urpm-tools is similar to the one of yum-utils. Some of the tools are based on their analogues from yum-utils, some are created from scratch. For convenience, utilities from urpm-tools have similar names as their analogues from yum-utils and the same options for the same actions.
+
Urpm-tools are partially based on yum-utils but significantly extends their functionality. For convenience, utilities from urpm-tools have similar names as their analogues from yum-utils and the same options for the same actions.
  
 
== List of Tools ==
 
== List of Tools ==

Revision as of 10:25, 1 March 2012

Urpm-tools is a set of utilities for manipulating urpmi repositories.

Urpm-tools are partially based on yum-utils but significantly extends their functionality. For convenience, utilities from urpm-tools have similar names as their analogues from yum-utils and the same options for the same actions.

List of Tools

Tool Description
urpm-distrosync synchronize with remote repository
urpm-downloader download binary, source or debuginfo packages with all dependencies (this tool combines functionality of yum-downloader and debuginfo-install from yum-utils)
urpm-package-cleanup manage package cleanup - look for duplicates and outstanding dependency problems
urpm-repoclosure detect unresolved dependencies in repository
urpm-repodiff compare two or more repositories, returns a list of added, removed or changed packages
urpm-repograph generate a full package dependency graph for repository in dot format
urpm-repomanage analyze a directory of rpm packages, return a list of newest or oldest packages

In future we are planning to add the following tools:

Tool Description
urpm-build-distrib create 'distribution' by joining several repositories

For completeness, one should note that some possibilities provided by yum-utils and other auxiliary yum tools are already supported by urpmi & co.:

Yum Tool Urpmi analogue Description
yum-builddep urpmi --buildrequires install packages required to build given SRPM (using the package itself or its spec file)
createrepo genhdlist2 create repository from a set of packages
repoquery urpmq queyr repository for package information (in the similar way like rpm queries local rpmdb)


urpm-repoclosure

A tool to check dependency closure in the repository.

Usage:

  urpm-repoclosure [-h] [--hdlist=PACKAGES_HDLIST] [--dir=PACKAGES_DIR] [-list=PACKAGES_LIST]
                      [--static] [--dynamic] [--check-release] [--check-signature] [--noclean]
                      [--root ROOT] [--file-deps=FILE]

  examples:

    urpm-repoclosure --hdlist=hdlist.txt
    urpm-repoclosure --hdlist=http://mirror.yandex.ru/mandriva/.../synthesis.hdlist.cz
    urpm-repoclosure --dir=rpms/ --static --file-deps=file-deps.txt
    urpm-repoclosure --list=list.txt --dynamic

  arguments:

  -h|-help
      Print help message.

  -v|-version
      Print version information.

  -hdlist <path>
      Path or URL of HDlist (synthesis) to check.

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

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

  -file-deps <path>
      Read file-deps to ignore some unresolved
      dependencies.

  -s|-static
      Check statically if all required dependencies are
      satisfied by provided dependencies in the set of
      RPM packages.

  -dynamic
      Install a set of RPM packages to the local chroot
      and check if extra packages were installed.

  -r|-check-release
      Check installation media (DVD).

  -sign|-check-signature
      Validate package signatures.

  -noclean
      Do not clean urpmi cache.

  -root <path>
      Where to install packages.
      Default:
          /tmp/...

urpm-downloader

A tool for downloading RPMs from Urpmi repositories

Usage:

urpm-downloader [-h] [--urls] [-r] [-s] [--version] [-v] [-q]
                   [--include-media INCLUDE_MEDIA [INCLUDE_MEDIA ...]]
                   [--exclude-media EXCLUDE_MEDIA [EXCLUDE_MEDIA ...]]
                   [--exclude-packages EXCLUDE_PACKAGES [EXCLUDE_PACKAGES ...]]
                   [--fail-broken] [--overwrite] [--all-alternatives]
                   packages [packages ...]

positional arguments:
  packages              Package name(s) to download

optional arguments:
  -h, --help            show this help message and exit
  --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
  -s, --source          Instead of downloading the binary RPMs, download the
                        source RPMs
  --version             show program's version number and exit
  -v, --verbose         verbose (print additional info)
  -q, --quiet           Quiet operation
  --include-media INCLUDE_MEDIA [INCLUDE_MEDIA ...], --media INCLUDE_MEDIA [INCLUDE_MEDIA ...]
                        use only selected media
  --exclude-media EXCLUDE_MEDIA [EXCLUDE_MEDIA ...]
                        do not use selected media
  --exclude-packages EXCLUDE_PACKAGES [EXCLUDE_PACKAGES ...]
                        Exclude package(s) by name or glob
  --fail-broken         When the package with depsolving problems found, do
                        not skip it, but exit.
  --overwrite           If the file already exists, download it again and
                        overwrite the old one.
  --all-alternatives    While resolving dependencies, if alternative packages
                        present, download all of them.

urpm-repodiff

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

Usage:

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

urpm-package-cleanup

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.

Usage:

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
                        media.
  --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
                        duplicates

Leaf Node Options:
  --leaves              List leaf nodes in the local RPM database
  --all                 list all packages leaf nodes that do not match leaf-
                        regex
  --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
                        nodes

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
                        kernels

urpm-repomanage

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

Usage:

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
                        behavior)
  -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)