aboutsummaryrefslogtreecommitdiffstats
path: root/BCD/Genisoimage.pm
diff options
context:
space:
mode:
Diffstat (limited to 'BCD/Genisoimage.pm')
-rw-r--r--BCD/Genisoimage.pm15
1 files changed, 13 insertions, 2 deletions
diff --git a/BCD/Genisoimage.pm b/BCD/Genisoimage.pm
index 7dba9b1..96d5b6e 100644
--- a/BCD/Genisoimage.pm
+++ b/BCD/Genisoimage.pm
@@ -3,6 +3,7 @@ package BCD::Genisoimage;
use strict;
use XML::Simple;
use BCD::Common qw(:DEFAULT $isoconf $wd $name $arch $version $builddir $isodir $error_color $repo $based_on);
+use BCD::Media qw(:DEFAULT parse_synthesis);
our @ISA = qw(Exporter);
our @EXPORT = qw(main_iso);
@@ -48,11 +49,21 @@ sub create_productid {
}
sub create_idx {
- print_color("$LOG create the IDX file from $builddir/pkg-$version-$isoconf->{iso}{tag}.idx", $color);
+ print_color("$LOG create the IDX file from $builddir/pkg-$version-$isoconf->{iso}{tag}.idx", $color);
# pkg-2009.1-pauillac.idx
- system("find $builddir -name \*.rpm | awk -F 'media/' {'print \"$isoconf->{iso}{header}{volumeid} \" \$2'} | sed -e 's/\.rpm\$//g' | sort > $builddir/pkg-$version-$isoconf->{iso}{tag}.idx");
+ my $idx = "$builddir/pkg-$version-$isoconf->{iso}{tag}.idx";
+ my %hrpms = parse_synthesis("$builddir/$isoconf->{mediainfo}{mediainfo_dir}/");
+ open my $idx_file, ">$idx";
+ foreach (keys %hrpms) {
+ $_ or next;
+ my @table = @{ $hrpms{$_} };
+# print "$isoconf->{iso}{header}{volumeid} $_-$table[0]-$table[1]\n";
+ print $idx_file "$isoconf->{iso}{header}{volumeid} $_-$table[0]-$table[1]\n";
+ }
+ close $idx;
system("cp -v $builddir/pkg-$version-$isoconf->{iso}{tag}.idx $isodir/$isoname.idx");
}
+
sub create_iso {
# build the ISO with all args