[issue383] A utility to check the consistency of repository metadata

Rehan Khan at Labix Tracker tracker at labix.org
Wed Jun 25 19:46:37 PDT 2008


New submission from Rehan Khan <rehan.khan at dsl.pipex.com>:

This script uses various simple manipulations of Smart Package Manager to check
the validity/consistency of repositories. As it uses standard smart commands I
guess it should work on any Smart supported repositories although it has only
been tested on Fedora 8. It produces a list of packages that have dependancy
errors/missing dependancies.

The functionality is very similar to repoclosure which is a yum utility but it
performs *significantly* faster (on my machine - <1-2 mins depending mainly on
whether it has to download changed metadata files).

A trivial improvement, to make it more useful in scripts (e.g to mail the
package maintainer), would be to add an option of what the output should display:
 -standard : Normal 'smart check' output
 -missingdeps : list just the missing dependancies
 -brokenpackages : list just the packages that can't meet their dependancy
requirements. 

This would just be a manipulation of the awk statement in the line:

smart check --all 2>&1 | grep "Unsatisfied dependency:" | awk '{print $3}'

A requirement is that the repositories you want to check are already setup in
smart. The script should be distro independant to a degree, for example if the
fedora 9 repos are setup in smart (in a disabled state) running on fedora 8 you
can run repoverify.sh on them just by referencing those repos alias'. The local
RPM database is explicitly excluded to reduce the chance of false positives, so
it needs to be part of the arguments if you need that data included (I can't
guarantee this as smart may automatically enable this at each invokation).

Usage examples would be:

./repoverify.sh "core" "updates"

which would produce an output of the broken packages:

[root at localhost Desktop]# ./repoverify.sh "core" "updates"
Setting up. Please wait....
Processing....

bmpx-extension-0.40.13-8.fc8 at i386
kmod-sysprof-1.0.8-1.2.6.23_0.142.rc3.git10.fc8 at i686
kmod-sysprof-1.0.9-1.2.6.24.7_92.fc8 at i686
kmod-sysprof-PAE-1.0.8-1.2.6.23_0.142.rc3.git10.fc8 at i686
kmod-sysprof-PAE-1.0.9-1.2.6.24.7_92.fc8 at i686
ocaml-json-static-0.9.6-4.fc8 at i386
ocaml-json-static-0.9.6-4.fc8 at i386
ocaml-json-static-0.9.6-4.fc8 at i386
ocaml-openin-20070524-3.fc8 at i386
ocaml-openin-20070524-3.fc8 at i386
ocaml-pa-monad-1.2.0-4.fc8 at i386
ocaml-pa-monad-1.2.0-4.fc8 at i386
ocaml-pgocaml-1.1-2.fc8 at i386
yum-tmprepo-1.1.14-4.fc8 at noarch
yum-verify-1.1.14-4.fc8 at noarch

Any (sensible?) combination of repositories can be tested.
e.g (on fedora):
./repoverify.sh "core" "updates" "livna - base"
./repoverify.sh "livna - base"
./repoverify.sh "atrpms"

(note: in fedora older kernels are removed from the repositories over time but
kernel drivers (kmod packages) are not removed. Seeing kmod-<package-name>
entries is thus expected but ambigous - ignore them unless you have a particular
interest. The same happens for kmdls)

----------
files: repoverify.sh
messages: 1340
nosy: rasker
priority: feature
project: smart
status: chatting
title: A utility to check the consistency of repository metadata
topic: smart based utility

_______________________________________
Labix issue tracker <tracker at labix.org>
<http://tracker.labix.org/issue383>
_______________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: repoverify.sh
Type: application/x-shellscript
Size: 2189 bytes
Desc: not available
URL: <http://lists.labix.org/pipermail/smart-labix.org/attachments/20080626/8b5c6662/attachment-0002.bin>


More information about the Smart mailing list