From 6f6997b6934e26b63b9635a1c24e9cad9fbdd6cc Mon Sep 17 00:00:00 2001 From: Antoine Ginies Date: Thu, 10 Feb 2011 10:50:48 +0000 Subject: add first_media and update_prefix parameter --- BCD/Media.pm | 16 ++++++++-------- doc/conf.xml.pod | 8 +++++--- doc/conf.xml.tex | 6 +++--- dual.xml | 8 ++++---- dual64.xml | 6 +++--- dvd_free32.xml | 6 +++--- dvd_free64.xml | 6 +++--- dvd_pwp32.xml | 6 +++--- dvd_pwp64.xml | 6 +++--- 9 files changed, 35 insertions(+), 33 deletions(-) diff --git a/BCD/Media.pm b/BCD/Media.pm index 86d38ec..3a00699 100644 --- a/BCD/Media.pm +++ b/BCD/Media.pm @@ -263,7 +263,7 @@ sub mini_chroot { chomp($media->{name}); system("LC_ALL=C sudo chroot $chroot_path urpmi.addmedia --probe-synthesis '$media->{name}' $distrib_path/media/$media->{mediadir}/release"); if ($media->{updates} eq "yes") { - system("LC_ALL=C sudo chroot $chroot_path urpmi.addmedia --update --probe-synthesis \"$media->{name} Updates\" $distrib_path/media/$media->{mediadir}/updates"); + system("LC_ALL=C sudo chroot $chroot_path urpmi.addmedia --update --probe-synthesis \"$media->{name} $isoconf->{media}{update_prefix}\" $distrib_path/media/$media->{mediadir}/updates"); } if ($media->{backports} eq "yes") { system("sudo chroot $chroot_path urpmi.addmedia --probe-synthesis '$media->{name} Backports' $distrib_path/media/$media->{mediadir}/backport"); @@ -287,7 +287,7 @@ sub add_media { print_color("$LOG This supp media contains release and updates sub-directory", $color); system("LC_ALL=C sudo chroot $chroot_path urpmi.addmedia $name-release /tmp/$name/release"); if ($update =~ /yes/) { - system("LC_ALL=C sudo chroot $chroot_path urpmi.addmedia --update '$name Updates' /tmp/$name/updates"); + system("LC_ALL=C sudo chroot $chroot_path urpmi.addmedia --update '$name $isoconf->{media}{update_prefix}' /tmp/$name/updates"); } } else { system("LC_ALL=C sudo chroot $chroot_path urpmi.addmedia $name /tmp/$name"); @@ -404,21 +404,21 @@ sub create_list { my $extra_media; # Main media is mandatory for all other media ! # we will use only Main + updates and this media + updates to calculte the list of wanted pkg - if ($media->{name} eq "Main") { + if ($media->{name} eq $isoconf->{media}{first_media}) { if ($media->{updates} eq "yes") { #$extra_media = "--media \"Main,Main Updates,$extra,$media_supp\" --sortmedia \"Main Updates,Main\""; - $extra_media = "--media \"Main,Main Updates,$extra,$media_supp\""; + $extra_media = "--media \"$isoconf->{media}{first_media},$isoconf->{media}{first_media} $isoconf->{media}{update_prefix},$extra,$media_supp\""; } else { - $extra_media = "--media \"Main,$extra,$media_supp\""; + $extra_media = "--media \"$isoconf->{media}{first_media},$extra,$media_supp\""; } } else { my $extra2; foreach (@add_media) { chomp($_); $_ and $extra2 = $_ . ',' . $extra2; }; #$extra_media = "--media \"Main,Main Updates,$extra2,$media_supp,$media->{name},$media->{name} Updates\" --sortmedia \"Main Updates,Main,$media->{name} Updates,$media->{name}\""; if ($media->{updates} eq "yes") { - $extra_media = "--media \"Main,Main Updates,$extra2,$media_supp,$media->{name},$media->{name} Updates\""; + $extra_media = "--media \"$isoconf->{media}{first_media} $isoconf->{media}{update_prefix},$extra2,$media_supp,$media->{name},$media->{name} $isoconf->{media}{update_prefix}\""; } else { - $extra_media = "--media \"Main,$extra2,$media_supp,$media->{name}\""; + $extra_media = "--media \"$isoconf->{media}{first_media},$extra2,$media_supp,$media->{name}\""; } } @@ -972,7 +972,7 @@ sub get_srpms_list { #print "$repo/$based_on/SRPMS/$media->{mediadir}/$_/$srpm"; if (-f "$repo/$based_on/SRPMS/$media->{mediadir}/$_/$srpm") { $SRPMS_PATH="$repo/$based_on/SRPMS/$media->{mediadir}/$_/"; - my $media="--sortmedia \"Main Updates,Main,Contrib Updates,Contrib\""; + my $media="--sortmedia \"$isoconf->{media}{first_media},$isoconf->{media}{first_media} $isoconf->{media}{update_prefix}\""; system("LC_ALL=C urpmq --use-distrib $repo/$based_on/$arch $media --sources --requires-recursive --prefer $DISTRIB,$THEME,kernel-source-dekstop --no-suggests $SRPMS_PATH/$srpm > $list_buildreq-$srpm"); last; } else { diff --git a/doc/conf.xml.pod b/doc/conf.xml.pod index 7fa3575..43c6576 100644 --- a/doc/conf.xml.pod +++ b/doc/conf.xml.pod @@ -127,9 +127,11 @@ problem of mixing theme on a same product media section will defined wich media you want to use and you want to create on the DVD - - - + + Main + Updates + + diff --git a/doc/conf.xml.tex b/doc/conf.xml.tex index 7a1b52e..b16f3d4 100644 --- a/doc/conf.xml.tex +++ b/doc/conf.xml.tex @@ -183,9 +183,9 @@ to be sure that you will provide all needed deps. For each list bcd will add a m will not add a new media with a name wich already exist. \begin{verbatim} - - - + + Main + Updates @@ -54,9 +54,9 @@ - - - + + Main + Updates diff --git a/dual64.xml b/dual64.xml index 5619359..54e54c8 100644 --- a/dual64.xml +++ b/dual64.xml @@ -54,9 +54,9 @@ - - - + + Main + Updates diff --git a/dvd_free32.xml b/dvd_free32.xml index bbbe88f..aecfeda 100644 --- a/dvd_free32.xml +++ b/dvd_free32.xml @@ -54,9 +54,9 @@ - - - + + Main + Updates diff --git a/dvd_free64.xml b/dvd_free64.xml index 962eb95..648ad35 100644 --- a/dvd_free64.xml +++ b/dvd_free64.xml @@ -54,9 +54,9 @@ - - - + + Main + Updates diff --git a/dvd_pwp32.xml b/dvd_pwp32.xml index 2e61af7..d902bb2 100644 --- a/dvd_pwp32.xml +++ b/dvd_pwp32.xml @@ -55,9 +55,9 @@ - - - + + Main + Updates diff --git a/dvd_pwp64.xml b/dvd_pwp64.xml index 9f99eb7..abe7fa2 100644 --- a/dvd_pwp64.xml +++ b/dvd_pwp64.xml @@ -55,9 +55,9 @@ - - - + + Main + Updates -- cgit v1.2.1