diff options
author | Francois Pons <fpons@mandriva.com> | 2000-04-14 10:02:53 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-04-14 10:02:53 +0000 |
commit | 8959b15ce2aa5e2adbad091a1b0814e170e863cc (patch) | |
tree | ae6b762937caeda412c27b0d5610925fe3c73bfa | |
parent | f5555f119ebbdcc438480d4ef5b2af1a20038594 (diff) | |
download | rpmtools-8959b15ce2aa5e2adbad091a1b0814e170e863cc.tar rpmtools-8959b15ce2aa5e2adbad091a1b0814e170e863cc.tar.gz rpmtools-8959b15ce2aa5e2adbad091a1b0814e170e863cc.tar.bz2 rpmtools-8959b15ce2aa5e2adbad091a1b0814e170e863cc.tar.xz rpmtools-8959b15ce2aa5e2adbad091a1b0814e170e863cc.zip |
*** empty log message ***
-rw-r--r-- | genhdlists | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -8,20 +8,22 @@ $root && @ARGV == 0 or die "; $depslist = "$root/Mandrake/base/depslist.ordered"; -$hdlist = "$root/Mandrake/base/hdlist"; -@dirs = glob("$root/Mandrake/RPMS*"); +$hdlists = "$root/Mandrake/base/hdlists"; -open F, ">${hdlist}s" or die "unable to open ${hdlist}s"; -foreach my $dir (@dirs) { - my $ext = $dir =~ /RPMS(.*)$/ && "$1.cz2"; +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); my $command = "genhdlist_cz2"; $noclean and $command .= " --noclean"; -e $depslist and $command .= " --ordered-depslist $depslist"; - $command .= " -o $hdlist$ext $dir"; + $command .= " -o $hdlist $root/$dir"; system($command); - - print F `basename $hdlist$ext`; + system("touch $root/Mandrake/base/$hdlist"); } close F; |