From 7167321c7f27347ae58dfca9421104c0416ee041 Mon Sep 17 00:00:00 2001 From: Anne Nicolas Date: Wed, 6 Jun 2012 10:34:29 +0000 Subject: remove unneeded Mandriva tests --- BCD/Media.pm | 37 +++---------------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) diff --git a/BCD/Media.pm b/BCD/Media.pm index faa921f..499efc1 100644 --- a/BCD/Media.pm +++ b/BCD/Media.pm @@ -95,23 +95,6 @@ sub use_gendistrib { print_color("$LOG gendistrib --mediacfg $builddir/$isoconf->{iso}{mediacfg} $builddir", $color); my $cmd = "gendistrib --mediacfg $builddir/$isoconf->{iso}{mediacfg} $builddir"; system($cmd) == 0 or die "$LOG system $cmd failed: $?\n"; - if ($isoconf->{based_on} lt "2009.1" || $isoconf->{based_on} eq "mes5") { - foreach my $media (@{$isoconf->{media}{list}}) { - $media->{name} or next; - if ($destmedia eq $media->{destmedia}) { next } - $destmedia = $media->{destmedia}; - print_color("$LOG < 2009.1 or mes5 detected", $color); - print_color("$LOG move hdlists and synthesys from $builddir/media/$destmedia/media_info to $builddir/media/media_info/", $color); - system("rm -vf $builddir/media/media_info/*_$media->{name}.cz"); -# system("rm -vf $builddir/media/media_info/*_main.cz"); - system("rm -vf $builddir/media/media_info/pubkey_$media->{name}"); - system("cp -avf $builddir/media/$destmedia/media_info/hdlist.cz $builddir/media/media_info/hdlist_$media->{name}.cz"); - system("cp -avf $builddir/media/$destmedia/media_info/pubkey $builddir/media/media_info/pubkey_$media->{name}"); - system("cp -avf $builddir/media/$destmedia/media_info/synthesis.hdlist.cz $builddir/media/media_info/synthesis.hdlist_$media->{name}.cz"); - system("rm -vf $builddir/media/$destmedia/media_info/*.cz"); - system("rm -vf $builddir/media/$destmedia/media_info/MD5SUM"); - } - } } sub copy_rpm { @@ -128,10 +111,7 @@ sub create_mediacfg { print $MEDIACFG "\n"; print $MEDIACFG "[media_info]\n"; print $MEDIACFG "version=$version\n"; - if ($isoconf->{based_on} gt "2009.1" && $isoconf->{based_on} ne "mes5") { - print_color("$LOG > 2009.1 or not a mes5 product", $color); - print $MEDIACFG "mediacfg_version=2\n"; - } + print $MEDIACFG "mediacfg_version=2\n"; print $MEDIACFG "branch=$isoconf->{iso}{branch}\n"; print $MEDIACFG "arch=$arch\n"; print $MEDIACFG "minor=$isoconf->{iso}{minor}\n"; @@ -150,17 +130,7 @@ sub create_mediacfg { $media->{name} or next; if ($destmedia eq $media->{destmedia}) { next } $destmedia = $media->{destmedia}; - if ($isoconf->{based_on} =~ "mes5" || $isoconf->{based_on} lt "2009.1") { - print_color("$LOG < 2009.1 or mes5 detected", $color); - print $MEDIACFG " -[$media->{destmedia}] -hdlist=hdlist_$media->{name}.cz -pubkey=pubkey_$media->{name} -name=$isoconf->{iso}{header}{volumesetid} -desc=$isoconf->{iso}{header}{volumesetid} -\n"; -} else { print $MEDIACFG " [$media->{destmedia}] synthesis=$media->{destmedia}/media_info/synthesis.hdlist.cz @@ -168,7 +138,7 @@ hdlist=$media->{destmedia}/media_info/hdlist.cz pubkey=$media->{destmedia}/media_info/pubkey name=$media->{desc} \n"; - } + } close $MEDIACFG; } @@ -251,6 +221,7 @@ sub mini_chroot { system("LC_ALL=C $cmd --prefer $DISTRIB,$THEME urpmi rootfiles rpm-helper mageia-release-common"); system("sudo chroot $chroot_path mkdir -p $distrib_path"); system("sudo mount -o bind $repo/$based_on/$arch $chroot_path/$distrib_path"); + print $chroot_path; system("sudo mount -o remount,ro $chroot_path/$distrib_path"); push @to_umount, $distrib_path; print_color("$LOG Add a profile info", $color); @@ -839,7 +810,6 @@ sub use_genhdlist2 { sub remove_hdlist { my $destmedia; - if ($isoconf->{based_on} gt "2009.1" or $isoconf->{based_on} != "mes5") { print_color("$LOG remove hdlists*.cz from $builddir/media/media_info", $color); system("rm -vf $builddir/media/media_info/hdlist*.cz"); foreach my $media (@{$isoconf->{media}{list}}) { @@ -850,7 +820,6 @@ sub remove_hdlist { system("rm -vf $builddir/media/$destmedia/media_info/hdlist.cz"); system("cd $builddir/media/$destmedia/media_info ; md5sum *.cz > MD5SUM"); } - } } sub copy_all_pubkey { -- cgit v1.2.1