summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-dev/attachments/20120524/bf498b23/attachment-0001.obj
blob: 6a031fafb266addf1a493312cea81f0776c3066b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/perl -w

# This script takes a root SRPMS directory as argument, and print the
# list of package names on stdout

use strict;
use URPM;

my $srpmsdir = $ARGV[0] or exit 1;

my $urpm = URPM->new;

foreach (glob("$srpmsdir/*/*/media_info/synthesis.hdlist.cz")) {
    $urpm->parse_synthesis($_);
}

my %res;
$urpm->traverse(sub { $res{$_[0]->name} = 1 });

print join("\n", sort(keys %res), '')