summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xurpmi26
-rw-r--r--urpmi.spec5
2 files changed, 26 insertions, 5 deletions
diff --git a/urpmi b/urpmi
index 43633bb6..643a4c7d 100755
--- a/urpmi
+++ b/urpmi
@@ -100,10 +100,28 @@ for (@ARGV) {
#- log only at this point in case of query usage.
log_it(scalar localtime, " urpmi called with @ARGV\n");
-open SAVEOUT, ">&STDOUT";
-open SAVEERR, ">&STDERR";
-open STDOUT, "|-", "tee >&SAVEOUT -a /var/log/urpmi.log" or die;
-open STDERR, "|-", "tee >&SAVEERR -a /var/log/urpmi.log" or die;
+my ($pid_out, $pid_err);
+
+open SAVEOUT, ">&STDOUT"; select SAVEOUT; $| = 1;
+open SAVEERR, ">&STDERR"; select SAVEERR; $| = 1;
+unless ($pid_out = open STDOUT, "|-") {
+ open F, ">>/var/log/urpmi.log"; select F; $| = 1;
+ while (<STDIN>) {
+ print SAVEOUT $_;
+ print F $_;
+ }
+ close F;
+ exit 0;
+}
+unless ($pid_err = open STDERR, "|-") {
+ open F, ">>/var/log/urpmi.log"; select F; $| = 1;
+ while (<STDIN>) {
+ print SAVEERR $_;
+ print F $_;
+ }
+ close F;
+ exit 0;
+}
select STDERR; $| = 1; # make unbuffered
select STDOUT; $| = 1; # make unbuffered
diff --git a/urpmi.spec b/urpmi.spec
index 25ac7a66..68c8b93c 100644
--- a/urpmi.spec
+++ b/urpmi.spec
@@ -2,7 +2,7 @@
Name: urpmi
Version: 1.5
-Release: 11mdk
+Release: 12mdk
License: GPL
Source0: %{name}.tar.bz2
Summary: User mode rpm install
@@ -113,6 +113,9 @@ autoirpm.uninstall
%changelog
+* Tue Feb 27 2001 François Pons <fpons@mandrakesoft.com> 1.5-12mdk
+- removed use of tee, now forked.
+
* Tue Feb 27 2001 François Pons <fpons@mandrakesoft.com> 1.5-11mdk
- fixed cohabitation of --auto-select and skip list.
- added -m mode for urpmq.