]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/init.cc
generalize Acquire::GzipIndex
[apt.git] / apt-pkg / init.cc
index 81b601a7fa7ff45222743e4c04e14e515b4bee8b..241628632ccdc24d958dc105ad04ac56b11039cf 100644 (file)
 #include <apt-pkg/error.h>
 #include <apt-pkg/pkgsystem.h>
 #include <apt-pkg/configuration.h>
+#include <apt-pkg/macros.h>
 
+#include <string.h>
+#include <string>
 #include <cstdlib>
-#include <sys/stat.h>
 
 #include <apti18n.h>
                                                                        /*}}}*/
@@ -84,6 +86,7 @@ bool pkgInitConfig(Configuration &Cnf)
    Cnf.Set("Dir::Ignore-Files-Silently::", "\\.dpkg-[a-z]+$");
    Cnf.Set("Dir::Ignore-Files-Silently::", "\\.save$");
    Cnf.Set("Dir::Ignore-Files-Silently::", "\\.orig$");
+   Cnf.Set("Dir::Ignore-Files-Silently::", "\\.distUpgrade$");
 
    // Default cdrom mount point
    Cnf.CndSet("Acquire::cdrom::mount", "/media/cdrom/");
@@ -92,7 +95,7 @@ bool pkgInitConfig(Configuration &Cnf)
    
    // Read an alternate config file
    const char *Cfg = getenv("APT_CONFIG");
-   if (Cfg != 0)
+   if (Cfg != 0 && strlen(Cfg) != 0)
    {
       if (RealFileExists(Cfg) == true)
         Res &= ReadConfigFile(Cnf,Cfg);