Kapowee
About
·
·
Customers
Donate
Services
                                          
Printer Friendly Version
The rpm dependency check project

A Project of Necessity


Objective

RPM is the Redhat Package Manager. Its very prevalent and is a common form of distribution for both x86 and the PowerPC. However, anyone who's used debian's packages with the lovely apt-get tool and others realizes that RPMs have their problems. Namely, dependencies are often represented by files instead of packages, and some dependencies are not strictly required. Unfortunately RPM offers no "suggests" style dependencies. This often causes users to force installs with the --nodeps option, because they either don't know where to get the files that are dependencies, or know that they aren't needed.

Worst of all is the fact that the installer often installs all selected packages by forcing it. Hence sometimes a clean and minimal system will be missing a few dependencies for the programs you just installed. This requires that you check every installed package for its dependencies to see if they are satisfied, and then set about finding out how to satisfy them.

Therefore, what we want is a program which:

  1. Finds out what is required by all installed packages.

  2. Finds out if these requirements are satisfied.

  3. Tries to find out how to satisfy these requirements if they are not.

  4. Presents the results to the user in a readable and speedy manner.


The Deliverables:

Version 0.0* are rapid prototypes. They will acquire usability and feature suggestions, and then become 1.0>ver>0.0.max. 1.0 Intends to be a fully finished version requiring only bug fixes. A 2.0 would need to include major feature additions or changes, or changes in the implementation (e.g. not the same language).
Version 0.0.1 Should fix the "=" file problem and is available now. You require a system that uses RPM, and has Perl.


Usage:

To run this make rpmdepend.pl executable. Run it at the prompt. You may find it more useful to type something like:
      rpmdepend.pl >rpmcheck
Reading through the file rpmcheck will reveal the following format:

  • a package name,
  • what libraries it provides,
  • what it requires preceded by:
    • a '-' meaning satisfied
    • a '!' meaning not satisfied
    • a '?' meaning possibly satisfied if the right version is used
    • a '#parse!#' meaning the requirement doesn't parse to a file, library, or package name.

Basically search the file for any '!' or '?' marks and decide whether you need it. For example, many packages require: /bin/csh but they lie really.


The "To Do" section

Version 1 is a quick hack. Hence, it doesn't do everything quite right. Here's what it should be doing in addition:

  • It should try and figure out what packages will satisfy broken dependencies.

  • It should build its own list of "provided" files and libraries so that it can quickly check a dependency (like glibc) without referring to RPM.

  • If there's an RPM library that we an use to directly and quickly access the RPM DB on the system we should use it to avoid the nasty RPM overhead.

  • Allow filtering of which RPMs to check dependencies for so that not all of them are checked; (this is trivial, but lets implement it with good UI).
    Done as of 2000-05-18 with '--grep' and '--package' command-line options.

  • Maybe want to partially automate fixing dependencies.

  • We might want to offer a small variety of output modes. i.e. troff, LaTeX, or HTML.


Problems and/or Difficulties

We get a really bad overhead problem by using the RPM program directly so often. Hard drive speeds dictate that this program takes many minutes to run. We are working on fixing this.


Progress Report

Here's what the progress has looked like:

Date Action People
2000-05-18 Fixed the "=" file error
Library version number chopping
Added command line options --help --grep --package
Now in Version 0.0.1 see version
Daniel
2000-05-05 Attempted a fix of the "=" file error. Testing it now. Daniel
2000-05-01 Took a few hours to write vers 0.0 for a MkLinux system using the LinuxPPC RPMs. It works. Daniel

by: Daniel P. Lamblin
Last Modified: December 22, 2003 10:12 PM
© 2003 Kapowee.
All rights reserved.

Current Theme: 

Kapow Generated in 0.007 second | XHTML | CSS