--- apt-0.5.15lorg2/apt-pkg/init.cc.orig 2006-04-02 12:00:56 +0000 +++ apt-0.5.15lorg2/apt-pkg/init.cc 2006-04-02 12:01:38 +0000 @@ -15,6 +15,7 @@ #include #include #include +#include // CNC:2003-03-17 #include @@ -37,9 +38,16 @@ const char *pkgOS = COMMON_OS; is prepended, this allows a fair degree of flexability. */ bool pkgInitConfig(Configuration &Cnf) { + const char *cpu = NULL; + struct utsname name; + if (uname(&name) == 0) + cpu = strdup(name.machine); + if (cpu == NULL) + cpu = COMMON_CPU; + // General APT things if (strcmp(COMMON_OS,"linux") == 0 || strcmp(COMMON_OS,"unknown") == 0) - Cnf.CndSet("APT::Architecture",COMMON_CPU); + Cnf.CndSet("APT::Architecture",cpu); else Cnf.CndSet("APT::Architecture",COMMON_OS "-" COMMON_CPU); Cnf.CndSet("APT::Architecture",COMMON_OS "-" cpu);