summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakhelp
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2005-03-01 12:41:55 +0000
committerDaouda Lo <daouda@mandriva.com>2005-03-01 12:41:55 +0000
commitc2a709ca28f5d3bb13b60e3bc0c070ef43750a03 (patch)
tree6a5534a80ab7e524fe3cdff107f1d166cc74cc4b /perl-install/standalone/drakhelp
parent882223c3a6a276071b5ce727146716bf6075e649 (diff)
downloaddrakx-c2a709ca28f5d3bb13b60e3bc0c070ef43750a03.tar
drakx-c2a709ca28f5d3bb13b60e3bc0c070ef43750a03.tar.gz
drakx-c2a709ca28f5d3bb13b60e3bc0c070ef43750a03.tar.bz2
drakx-c2a709ca28f5d3bb13b60e3bc0c070ef43750a03.tar.xz
drakx-c2a709ca28f5d3bb13b60e3bc0c070ef43750a03.zip
- use any::launch_browser_with_wm
Diffstat (limited to 'perl-install/standalone/drakhelp')
-rw-r--r--perl-install/standalone/drakhelp12
1 files changed, 1 insertions, 11 deletions
diff --git a/perl-install/standalone/drakhelp b/perl-install/standalone/drakhelp
index d76ce8939..97291dde2 100644
--- a/perl-install/standalone/drakhelp
+++ b/perl-install/standalone/drakhelp
@@ -35,14 +35,4 @@ my ($instpath, $ancpath, $package) = ctxhelp::path2help($opt, $idlabel);
-e $instpath or system("/usr/sbin/drakhelp_inst $package");
-e $instpath or $in->ask_warn(N("Mandrakelinux Help Center"), N("%s cannot be displayed \n. No Help entry of this type\n", $instpath));
-my $wm = any::running_window_manager();
-my %launchhelp = (
- 'kwin' => sub { system("webclient-kde " . $ancpath . "&") },
- 'gnome-session' => sub { system("yelp ghelp://" . $ancpath . "&") },
- 'other' => sub { my $browser = $ENV{BROWSER} || find { -x "/usr/bin/$_" } qw(mozilla konqueror epiphany galeon) or $in->ask_warn('drakhelp', N("No browser is installed on your system, Please install one if you want to browse the help system"));
- log::explanations("Loading help system : $ancpath");
- system("$browser " . $ancpath . "&")
- }
- );
-member($wm, 'kwin', 'gnome-session') or $wm = 'other';
--e $instpath and eval { $launchhelp{$wm}->() };
+-e $instpath and any::launch_browser_with_wm($ancpath);
kg) . "\n";
- system "cp", "-a", $file, "/hd/$rpmsdir";
+ system "cp", "-a", $infile, $outfile;
if (rpm_fullname($pkg) =~ /mandrake-release/) {
- system "rpm", "-Uvh", "--root", "/mnt", "--nodeps", "--force", "/hd/" . $files{rpm_fullname($pkg)};
+ system "rpm", "-Uvh", "--root", "/mnt", "--nodeps", "--force", $outfile;
}
+ #- clean to say everything is done.
+ delete $files{rpm_fullname($pkg)};
+ delete $rpms{rpm_fullname($pkg)};
}
}
}
diff --git a/rescue/tree/etc/oem-all b/rescue/tree/etc/oem-all
index 8bbbc5663..eb865e342 100755
--- a/rescue/tree/etc/oem-all
+++ b/rescue/tree/etc/oem-all
@@ -552,10 +552,11 @@ foreach my $medium (@media) {
foreach (@{$packer->{files}}) {
$packer->{data}{$_}[0] eq 'f' or next;
my ($fullname, $file) = /([^:]*):(.*)/ ? ($1, "$2.rpm") : ($_, "$_.rpm");
- $files{$fullname} = "$medium->{rpmsdir}/$file";
+ $files{$fullname} = $file;
+ $rpms{$fullname} = $medium->{rpmsdir};
#- convert %{ARCH} to effective arch of the given package.
my ($arch) = $fullname =~ /\.([^\.\-]*)$/;
- $files{$fullname} =~ s|%{ARCH}|$arch|g;
+ $rpms{$fullname} =~ s|%{ARCH}|$arch|g;
}
}
@@ -577,17 +578,18 @@ foreach my $medium (@media) {
print "Copying packages from medium labeled \"$medium->{descr}\" to hard disk\n";
foreach my $pkg (@{$packages->{depslist}}) {
$files{rpm_fullname($pkg)} or next;
- my ($arch) = rpm_fullname($pkg) =~ /\.([^\.\-]*)$/;
- $rpmsdir = $medium->{rpmsdir};
- $rpmsdir =~ s|%{ARCH}|$arch|g;
- system "mkdir", "-p", "/hd/$rpmsdir";
- my $file = "/cdrom/" . $files{rpm_fullname($pkg)};
- if (-e $file) {
+ my $infile = "/cdrom/" . $rpms{rpm_fullname($pkg)} . "/" . $files{rpm_fullname($pkg)};
+ my $outfile = "/hd/" . $rpms{rpm_fullname($pkg)} . "/" . $files{rpm_fullname($pkg)};
+ if (-r $infile && -s $infile != -s $outfile) {
+ -d "/hd" . $rpms{rpm_fullname($pkg)} or system "mkdir", "-p", "/hd" . $rpms{rpm_fullname($pkg)};
print " copying " . rpm_fullname($pkg) . "\n";
- system "cp", "-a", $file, "/hd/$rpmsdir";
+ system "cp", "-a", $infile, $outfile;
if (rpm_fullname($pkg) =~ /mandrake-release/) {
- system "rpm", "-Uvh", "--root", "/mnt", "--nodeps", "--force", "/hd/" . $files{rpm_fullname($pkg)};
+ system "rpm", "-Uvh", "--root", "/mnt", "--nodeps", "--force", $outfile;
}
+ #- clean to say everything is done.
+ delete $files{rpm_fullname($pkg)};
+ delete $rpms{rpm_fullname($pkg)};
}
}
}