- Cnf.Set("APT::Architecture","i386");
-
- // State
- Cnf.Set("Dir::State","/var/state/apt/");
+ if (strcmp(COMMON_OS,"linux") == 0 ||
+ strcmp(COMMON_OS,"unknown") == 0)
+ 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
+ Cnf.Set("Dir::State","var/lib/apt/");
+
+ /* Just in case something goes horribly wrong, we can fall back to the
+ old /var/state paths.. */
+ struct stat St;
+ if (stat("/var/lib/apt/.",&St) != 0 &&
+ stat("/var/state/apt/.",&St) == 0)
+ Cnf.Set("Dir::State","var/state/apt/");
+