summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-02-27 14:27:24 +0000
committerFrancois Pons <fpons@mandriva.com>2001-02-27 14:27:24 +0000
commit2930876e55207dd1cdf8f3511825f4bbf90e2585 (patch)
treea851bde8c6b14308fd37374b1b342abcac9257ce
parentad313cad5995b640509ae48123c3e2c0f24ea38c (diff)
downloadurpmi-2930876e55207dd1cdf8f3511825f4bbf90e2585.tar
urpmi-2930876e55207dd1cdf8f3511825f4bbf90e2585.tar.gz
urpmi-2930876e55207dd1cdf8f3511825f4bbf90e2585.tar.bz2
urpmi-2930876e55207dd1cdf8f3511825f4bbf90e2585.tar.xz
urpmi-2930876e55207dd1cdf8f3511825f4bbf90e2585.zip
*** empty log message ***
-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.