]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/init.cc
merged from lp:~donkult/apt/experimental
[apt.git] / apt-pkg / init.cc
index 8f20c31df172b28e69ae89ec4139228453fe991f..a1c47c030ae2ff41eb3c79b5855d5bae52e2b646 100644 (file)
@@ -8,14 +8,18 @@
    ##################################################################### */
                                                                        /*}}}*/
 // Include files                                                       /*{{{*/
+#include<config.h>
+
 #include <apt-pkg/init.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/error.h>
+#include <apt-pkg/pkgsystem.h>
+#include <apt-pkg/configuration.h>
 
-#include <apti18n.h>
-#include <config.h>
 #include <cstdlib>
 #include <sys/stat.h>
+
+#include <apti18n.h>
                                                                        /*}}}*/
 
 #define Stringfy_(x) # x
@@ -82,13 +86,12 @@ bool pkgInitConfig(Configuration &Cnf)
    Cnf.CndSet("Dir::Log::Terminal","term.log");
    Cnf.CndSet("Dir::Log::History","history.log");
 
-   if (Cnf.Exists("Dir::Ignore-Files-Silently") == false)
-   {
-      Cnf.Set("Dir::Ignore-Files-Silently::", "~$");
-      Cnf.Set("Dir::Ignore-Files-Silently::", "\\.disabled$");
-      Cnf.Set("Dir::Ignore-Files-Silently::", "\\.bak$");
-      Cnf.Set("Dir::Ignore-Files-Silently::", "\\.dpkg-[a-z]+$");
-   }
+   Cnf.Set("Dir::Ignore-Files-Silently::", "~$");
+   Cnf.Set("Dir::Ignore-Files-Silently::", "\\.disabled$");
+   Cnf.Set("Dir::Ignore-Files-Silently::", "\\.bak$");
+   Cnf.Set("Dir::Ignore-Files-Silently::", "\\.dpkg-[a-z]+$");
+   Cnf.Set("Dir::Ignore-Files-Silently::", "\\.save$");
+   Cnf.Set("Dir::Ignore-Files-Silently::", "\\.orig$");
 
    // Default cdrom mount point
    Cnf.CndSet("Acquire::cdrom::mount", "/media/cdrom/");
@@ -106,14 +109,14 @@ bool pkgInitConfig(Configuration &Cnf)
    }
 
    // Read the configuration parts dir
-   string Parts = Cnf.FindDir("Dir::Etc::parts");
+   std::string Parts = Cnf.FindDir("Dir::Etc::parts");
    if (DirectoryExists(Parts) == true)
       Res &= ReadConfigDir(Cnf,Parts);
    else
       _error->WarningE("DirectoryExists",_("Unable to read %s"),Parts.c_str());
 
    // Read the main config file
-   string FName = Cnf.FindFile("Dir::Etc::main");
+   std::string FName = Cnf.FindFile("Dir::Etc::main");
    if (RealFileExists(FName) == true)
       Res &= ReadConfigFile(Cnf,FName);
 
@@ -140,7 +143,7 @@ bool pkgInitConfig(Configuration &Cnf)
 bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys)
 {
    Sys = 0;
-   string Label = Cnf.Find("Apt::System","");
+   std::string Label = Cnf.Find("Apt::System","");
    if (Label.empty() == false)
    {
       Sys = pkgSystem::GetSystem(Label.c_str());