/urpm-utils

A collection of tools for dealing with urpm repositories

Primary LanguagePythonGNU General Public License v2.0GPL-2.0

A collection of tools for dealing with urpm repositories

urpm-build

Description

This tool is used when you need to build a source package and possibly all its missing build requirements.

This typically happens when bootstrapping a distribution to a new architecture or when a distribution has already been bootstrapped but there’re still a lot of missing packages.

Before building a given package, the tool checks that all build requirements are available and installed. If not then it looks for the source package that provides the missing dependence by using a “reference” repository (more below). Once the source package is found, it’s fetched on a server (through ssh) at a specific place (configured by ‘remote_repo’ variable) and it’s built by the tool in its turn.

This process is executed until no build requirements are found. After that, packages that couldn’t be built due to missing build requirements are processed.

Reference medias are used to resolve build require names. Indeed those names are given by the outpout of:

rpm --requires

or

urpm --requires

and some of them are obfuscated enough that we can’t simply use them to retrieve the associated source package name. “perl(Font::AFM)” is an example.

Usage

You can use the script by passing it a source package file as argument.

It’s also possible to pass a symbolic name, such as “perl(Mongo)”. The script will resolve the name by using reference medias and will fetch the corresponding source package for you.

Note

The tool is more a hackish script than anything else. It’s in an early stage therefore expect some instant minutes of hacking in your turn.

This probably could be done differently, by using (perl) URPM librairies (if they exist and are usable) for example, but that was the fastest path for me.

So use it at your own risk ;)

urpm-rsync

Descritption

This tool is used for downloading a subset of a repositories managed by urpmi(1).

It preserves the repository layout, and make the repositories consistent by downloading any dependencies of wanted packages.

Since the tool relies on rsync(1), the only protocols supported to access the repositories are: ssh and rsync.

Usage

urpm-rsync --list=packages.lst rsync://mirrorsync@mirror.mandriva.com/factory/x86_64

urpm-repo

Description

This tool is used for querying a repository or configuring a local repository.

Actually, it’s a simple script that can parse repository configuration file (media.cfg) and can write it back if the repository is local.

Usage

To list medias included in a repository:

urpm-repo --url=rsync://mirrorsync@mirror.mandriva.com/factory/x86_64 list

To list all medias (including ignored ones):

urpm-repo --url=rsync://mirrorsync@mirror.mandriva.com/factory/x86_64 list --all

To enable one specific media in a local repository:

urpm-repo --url=/home/repos/factory/x86_64 set "Core Release" noauto 0

To remove all unused/ignored medias:

urpm-repo --url=/home/repos/factory/x86_64 strip

urpm-tree

Description

This tool is used to visualize package dependencies.

For now, two viewers are available.

One viewer, invoked by the tree command, is a simple package dependecy tree viewer: a tree-like output is generated.

The other viewer is actually not a viewer but it generates textual dependency graph description in dot format for further processing with the GraphViz dot(1) tool.

By default, package dependencies are read from the rpm’s local database. If –urpmi-db option is passed, then urpmi’s database is used instead.

Usage

urpm-deps dot --reverse alsaplayer | dot -Tsvg > alsaplayer-rdeps.svg
urpm-deps tree alsaplayer