]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/init.cc
* apt-pkg/init.cc:
[apt.git] / apt-pkg / init.cc
index 01b9d8665fdbdc9d1ba899c6dfafa657bbcea5a9..cc3c1f01c94dc7405c091153e69e90f4e87491c0 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: init.cc,v 1.15 2001/02/20 07:03:17 jgg Exp $
+// $Id: init.cc,v 1.20 2003/02/09 20:31:05 doogie Exp $
 /* ######################################################################
 
    Init - Initialize the package library
@@ -14,6 +14,7 @@
 
 #include <apti18n.h>
 #include <config.h>
+#include <cstdlib>
 #include <sys/stat.h>
                                                                        /*}}}*/
 
@@ -39,6 +40,9 @@ bool pkgInitConfig(Configuration &Cnf)
       Cnf.Set("APT::Architecture",COMMON_CPU);
    else
       Cnf.Set("APT::Architecture",COMMON_OS "-" COMMON_CPU);
+   Cnf.Set("APT::Build-Essential::", "build-essential");
+   Cnf.Set("APT::Install-Recommends", false);
+   Cnf.Set("APT::Install-Suggests", false);
    Cnf.Set("Dir","/");
    
    // State   
@@ -63,11 +67,18 @@ bool pkgInitConfig(Configuration &Cnf)
    // Configuration
    Cnf.Set("Dir::Etc","etc/apt/");
    Cnf.Set("Dir::Etc::sourcelist","sources.list");
+   Cnf.Set("Dir::Etc::sourceparts","sources.list.d");
+   Cnf.Set("Dir::Etc::vendorlist","vendors.list");
+   Cnf.Set("Dir::Etc::vendorparts","vendors.list.d");
    Cnf.Set("Dir::Etc::main","apt.conf");
    Cnf.Set("Dir::Etc::parts","apt.conf.d");
    Cnf.Set("Dir::Etc::preferences","preferences");
    Cnf.Set("Dir::Bin::methods","/usr/lib/apt/methods");
 
+   // State   
+   Cnf.Set("Dir::Log","var/log/apt");
+   Cnf.Set("Dir::Log::Terminal","term.log");
+   
    bool Res = true;
    
    // Read an alternate config file
@@ -90,7 +101,18 @@ bool pkgInitConfig(Configuration &Cnf)
    
    if (Cnf.FindB("Debug::pkgInitConfig",false) == true)
       Cnf.Dump();
-      
+   
+#ifdef APT_DOMAIN
+   if (Cnf.Exists("Dir::Locale"))
+   {  
+      bindtextdomain(APT_DOMAIN,Cnf.FindDir("Dir::Locale").c_str());
+      bindtextdomain(textdomain(0),Cnf.FindDir("Dir::Locale").c_str());
+   }
+#endif
+
+   // Translation
+   Cnf.Set("APT::Acquire::Translation", "environment");
+   
    return true;
 }
                                                                        /*}}}*/
@@ -121,7 +143,7 @@ bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys)
       }
       
       if (Sys == 0)
-        return _error->Error(_("Unable to determine a suitable system type"));
+        return _error->Error(_("Unable to determine a suitable packaging system type"));
    }
    
    return Sys->Initialize(Cnf);