summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgurpmi2
-rwxr-xr-xgurpmi22
-rw-r--r--rurpme2
-rw-r--r--rurpmi2
-rw-r--r--urpm/download.pm6
-rwxr-xr-xurpme2
-rwxr-xr-xurpmi6
-rwxr-xr-xurpmi.addmedia2
-rw-r--r--urpmi.recover2
-rwxr-xr-xurpmi.removemedia2
-rwxr-xr-xurpmi.update2
11 files changed, 17 insertions, 13 deletions
diff --git a/gurpmi b/gurpmi
index a98438d7..fe05f549 100755
--- a/gurpmi
+++ b/gurpmi
@@ -6,7 +6,7 @@
use strict;
BEGIN { #- set up a safe path and environment
- $ENV{PATH} = "/bin:/usr/bin:/usr/X11R6/bin";
+ $ENV{PATH} = "/bin:/usr/bin";
delete @ENV{qw(ENV BASH_ENV IFS CDPATH)};
}
diff --git a/gurpmi2 b/gurpmi2
index 57687d18..da395ef0 100755
--- a/gurpmi2
+++ b/gurpmi2
@@ -6,7 +6,7 @@
use strict;
BEGIN { #- set up a safe path and environment
- $ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin";
+ $ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin";
delete @ENV{qw(ENV BASH_ENV IFS CDPATH)};
}
diff --git a/rurpme b/rurpme
index d2d4a6b7..4f9814d0 100644
--- a/rurpme
+++ b/rurpme
@@ -11,7 +11,7 @@ if ($< != 0) {
exit 1;
}
-$ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin";
+$ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin";
delete @ENV{qw(ENV BASH_ENV HOME IFS CDPATH PERLLIB PERL5LIB PERL5OPT PERLIO PERLIO_DEBUG PERL5DB PERL_ENCODING PERL_HASH_SEED PERL_SIGNALS PERL_UNICODE RPM_CONFIGDIR)};
print STDERR N("Running urpme in restricted mode..."), "\n";
diff --git a/rurpmi b/rurpmi
index 70c8d974..204423ed 100644
--- a/rurpmi
+++ b/rurpmi
@@ -12,7 +12,7 @@ if ($< != 0) {
exit 1;
}
-$ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin";
+$ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin";
delete @ENV{qw(ENV BASH_ENV HOME IFS CDPATH PERLLIB PERL5LIB PERL5OPT PERLIO PERLIO_DEBUG PERL5DB PERL_ENCODING PERL_HASH_SEED PERL_SIGNALS PERL_UNICODE RPM_CONFIGDIR)};
print STDERR N("Running urpmi in restricted mode..."), "\n";
diff --git a/urpm/download.pm b/urpm/download.pm
index 18c63f42..97187270 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -886,7 +886,11 @@ sub sync_rel {
my @result_files = map { $all_options->{dir} . '/' . basename($_) } @$rel_files;
unlink @result_files if $all_options->{preclean};
- if (eval { _sync_webfetch_raw($urpm, $medium, $rel_files, \@files, $all_options); 1 }) {
+ (my $cwd) = getcwd() =~ /(.*)/;
+ eval { _sync_webfetch_raw($urpm, $medium, $rel_files, \@files, $all_options) };
+ my $err = $@;
+ chdir $cwd;
+ if (!$err) {
$urpm->{log}(N("retrieved %s", $files_text));
\@result_files;
} else {
diff --git a/urpme b/urpme
index e7f4bb9e..324329e7 100755
--- a/urpme
+++ b/urpme
@@ -29,7 +29,7 @@ use urpm::select;
use urpm::orphans;
-$ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin";
+$ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin";
delete @ENV{qw(ENV BASH_ENV IFS CDPATH)};
our ($test, $parallel, $force, $env);
diff --git a/urpmi b/urpmi
index e7a5ef89..d8f99de8 100755
--- a/urpmi
+++ b/urpmi
@@ -57,7 +57,7 @@ my @src_files;
my @names;
my @src_names;
-$ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin";
+$ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin";
delete @ENV{qw(ENV BASH_ENV IFS CDPATH)};
$ENV{HOME} ||= "/root";
$ENV{USER} ||= "root";
@@ -637,8 +637,8 @@ my $exit_code = urpm::main_loop::run($urpm, $state,
my $msg = N("Please insert the medium named \"%s\"", $_[0]);
if ($ENV{DISPLAY} && $::gui) {
#- probably run from a drak tool
- (my $gmessage) = find { -x $_ } '/usr/X11R6/bin/gmessage', '/usr/bin/gmessage';
- if ($gmessage) {
+ my $gmessage = '/usr/bin/gmessage';
+ if (-x $gmessage) {
return system($gmessage, '-buttons', N("Ok") . ':1,' . N("Cancel") . ':0', "\n$msg\n");
}
}
diff --git a/urpmi.addmedia b/urpmi.addmedia
index 1529b5d4..1982d62d 100755
--- a/urpmi.addmedia
+++ b/urpmi.addmedia
@@ -86,7 +86,7 @@ and [options] are from
exit 1;
}
-$ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin";
+$ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin";
delete @ENV{qw(ENV BASH_ENV IFS CDPATH)};
$options{force} = 0;
diff --git a/urpmi.recover b/urpmi.recover
index 1e4f73bb..8f806838 100644
--- a/urpmi.recover
+++ b/urpmi.recover
@@ -8,7 +8,7 @@ use strict;
BEGIN {
#- clean environment
- $ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin";
+ $ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin";
delete @ENV{qw(ENV BASH_ENV IFS CDPATH)};
}
diff --git a/urpmi.removemedia b/urpmi.removemedia
index 8c7375fd..b5696474 100755
--- a/urpmi.removemedia
+++ b/urpmi.removemedia
@@ -28,7 +28,7 @@ use urpm::download;
use urpm::media;
use urpm::args;
-$ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin";
+$ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin";
delete @ENV{qw(ENV BASH_ENV IFS CDPATH)};
my @toremove;
diff --git a/urpmi.update b/urpmi.update
index dba14159..6eaa45b3 100755
--- a/urpmi.update
+++ b/urpmi.update
@@ -56,7 +56,7 @@ where <name> is a medium name to update.
exit 1;
}
-$ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin";
+$ENV{PATH} = "/sbin:/usr/sbin:/bin:/usr/bin";
delete @ENV{qw(ENV BASH_ENV IFS CDPATH)};
our @cmdline; #- set by urpm::args