Borsenkow Andrej <[EMAIL PROTECTED]> writes:
> > 2) Listing all available uninstalled packages
>
> simple scripting
Yes, and here follows the script (francois, maybe this could go
into a special mode of urpmq, if it doesn't already exist?).
-=-=---=-=---=-=---=-=---=-=---=-=--
use urpm;
use URPM;
$urpm = new urpm;
$urpm->configure();
$db = URPM::DB::open;
#- sets up installed flag, according to existing package
$db->traverse(sub {
my ($p) = @_;
foreach (keys %{$urpm->{provides}{$p->name} || {}}) {
my $pkg = $urpm->{depslist}[$_];
$pkg->name eq $p->name or next;
$pkg->set_flag_installed($pkg->compare_pkg($p) <= 0);
}
});
#- now scan whole depslist
foreach (@{$urpm->{depslist}}) {
$_->flag_installed and next;
my ($name, $version, $release, $arch) = $_->fullname;
print "$name $version $release $arch\n";
}
-=-=---=-=---=-=---=-=---=-=---=-=--
--
Guillaume Cottenceau - http://people.mandrakesoft.com/~gc/