diff options
Diffstat (limited to 'BCD/Media.pm')
-rw-r--r-- | BCD/Media.pm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/BCD/Media.pm b/BCD/Media.pm index ab9d309..9f9189c 100644 --- a/BCD/Media.pm +++ b/BCD/Media.pm @@ -197,7 +197,6 @@ sub parse_synthesis { # based on a similar functions in pkgs.pm sub get_list_from_CAT { - #4 META_CLASS"desktop" mandriva-xfce-config-One my ($file, $cat, $poids) = @_; my (%rates, @need_to_copy); my (@l); @@ -294,13 +293,15 @@ sub add_media { system("sudo chroot $chroot_path mkdir -p /tmp/$name"); system("sudo mount -o bind $path $chroot_path/tmp/$name -o ro"); # check if path contain sub direcroty or not (media/release media/updates etc...) - if (-d "$path/release" and -d "$path/updates") { - print_color("$LOG This supp media contains release and updates sub-directory", $color); + if (-d "$path/release") { + print_color("$LOG This supp media contains a release sub-directory", $color); system("LC_ALL=C sudo chroot $chroot_path urpmi.addmedia $name-release /tmp/$name/release"); - if ($update =~ /yes/) { + if (-d "$path/updates" and $update =~ /yes/) { + print_color("$LOG This supp media contains an updates sub-directory and update is set to yes", $color); system("LC_ALL=C sudo chroot $chroot_path urpmi.addmedia --update '$name $isoconf->{media}{update_prefix}' /tmp/$name/updates"); } } else { + print_color("$LOG There is no subdirectory (updates/release)for this supp media", $color); system("LC_ALL=C sudo chroot $chroot_path urpmi.addmedia $name /tmp/$name"); } push @to_umount, "/tmp/$name"; @@ -476,7 +477,7 @@ sub create_list { $_ or next; $tested_exclude = $tested_exclude . " --skip $_" }; - print_color("$LOG remove unwanted mandriva-release, use $DISTRIB", $color); + print_color("$LOG remove unwanted mageia-release, use $DISTRIB", $color); # urpmq options (with option in the xml file) my $urpmq_options = "--requires-recursive -c --sources $isoconf->{mediainfo}{urpmi_option}"; my $urpmq_extra_opt = "$opt_sug $opt_srpm $extra_media"; |