All pastes #136744 Raw Edit

Untitled

public text v1 · immutable
#136744 ·published 2006-08-17 21:37 UTC
rendered paste body
=head1 NAME

trash_orphan

=head1 SYNOPSIS

trash_orphan path/to/distrib

=head1 OPTIONS

=over 4

=item mediacfg <file>

Use this media.cfg instead default into distrib

=item ophanfile <file>

Use this file as trace of orphan file

=head1 DESCRIPTION

This script is a try for orphan deletion into the distrib. It parse
rpms found into binary media and check is source are there. If source rpm
is missing and other rpms in the same media come from another src rpm, then
the rpms if marked for deletion.

As a first step, found orphan rpms are taged into a ini file with the current
date, If the is already taged for more than 8 days, then it is unlink

=head1 PRO AND CONS

+ safe
+ binary can unsync with src, the script check coherency
+ no need configuration, use media.cfg

- have to parse rpms, very slow (using hdlist ?)
- need a external ini file
- delay currently hardcoded
- yet another f**** scripts to run (youri integration ?)

=head1 AUTHOR

Olivier Thauvin <nanardon@mandriva.org>

=cut