* apt-pkg/init.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Fri, 3 Aug 2007 12:53:51 +0000 (14:53 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Fri, 3 Aug 2007 12:53:51 +0000 (14:53 +0200)
  - init Dir::Log::Terminal
* apt-pkg/deb/dpkgpm.cc:
  - only work with term_out if it is not NULL

apt-pkg/deb/dpkgpm.cc
apt-pkg/init.cc

index aa840f8..9421519 100644 (file)
@@ -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;
index 2617603..cc3c1f0 100644 (file)
@@ -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;