From 608c766dc110493b952a615c3eb82c3cf3ed8b90 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 3 Aug 2007 14:53:51 +0200 Subject: * apt-pkg/init.cc: - init Dir::Log::Terminal * apt-pkg/deb/dpkgpm.cc: - only work with term_out if it is not NULL --- apt-pkg/deb/dpkgpm.cc | 6 ++++-- apt-pkg/init.cc | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index aa840f85e..94215197c 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -843,12 +843,14 @@ bool pkgDPkgPM::Go(int OutStatusFd) if(stopOnError) { - fclose(term_out); + if(term_out) + fclose(term_out); return false; } } } - fclose(term_out); + if(term_out) + fclose(term_out); if (RunScripts("DPkg::Post-Invoke") == false) return false; diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index 2617603ec..cc3c1f01c 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -77,7 +77,7 @@ bool pkgInitConfig(Configuration &Cnf) // State Cnf.Set("Dir::Log","var/log/apt"); - Cnf.Set("Dir::Log::Name","term.log"); + Cnf.Set("Dir::Log::Terminal","term.log"); bool Res = true; -- cgit v1.2.3