+ Cnf.Set("Dir::Etc::parts","apt.conf.d");
+ Cnf.Set("Dir::Etc::preferences","preferences");
+ Cnf.Set("Dir::Bin::methods","/usr/lib/apt/methods");
+
+ bool Res = true;
+
+ // Read an alternate config file
+ const char *Cfg = getenv("APT_CONFIG");
+ if (Cfg != 0 && FileExists(Cfg) == true)
+ Res &= ReadConfigFile(Cnf,Cfg);
+
+ // Read the configuration parts dir
+ string Parts = Cnf.FindDir("Dir::Etc::parts");
+ if (FileExists(Parts) == true)
+ Res &= ReadConfigDir(Cnf,Parts);
+
+ // Read the main config file
+ string FName = Cnf.FindFile("Dir::Etc::main");
+ if (FileExists(FName) == true)
+ Res &= ReadConfigFile(Cnf,FName);
+
+ if (Res == false)
+ return false;
+
+ 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");