blob: a34af885c92c6015134a13d316beea55c7f77b01 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/usr/bin/perl
use rpmtools;
$params = new rpmtools;
($params->{options}{noclean}, @ARGV) = @ARGV if $ARGV[0] eq "--noclean";
(undef, $root, @ARGV) = @ARGV if $ARGV[0] eq "--distrib";
$root && @ARGV == 0 or die
"usage: genhdlists [--noclean] --distrib <root distrib>
";
$depslist = "$root/Mandrake/base/depslist.ordered";
$hdlists = "$root/Mandrake/base/hdlists";
open F, $depslist;
$params->read_depslist(\*F);
close F;
open F, $hdlists or die "unable to open $hdlists";
foreach (<F>) {
chomp;
s/\s*#.*$//;
/^\s*$/ and next;
m/^\s*(hdlist\S*\.cz2?)\s+(\S+)\s*(.*)$/ or die "invalid hdlist description \"$_\" in hdlists file";
my ($hdlist, $dir, $descr) = ($1, $2, $3);
$params->build_hdlist("$root/Mandrake/base/$hdlist", glob("$root/$dir/*.rpm"));
}
close F;
|