Репозитории ALT
S: | 0.5.15lorg2-alt86 |
5.1: | 0.5.15lorg2-alt33.M50P.1 |
4.1: | 0.5.15lorg2-alt20.M41.1 |
4.0: | 0.5.15lorg2-alt18.M40.1 |
+updates: | 0.5.15lorg2-alt18 |
3.0: | 0.5.15cnc6-alt16 |
Группа :: Система/Настройка/Пакеты
Пакет: apt
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: apt-0.5.15lorg2-alt-pkgInitConfig-cpu.patch
Скачать
Скачать
--- 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 <apti18n.h>
#include <config.h>
#include <sys/stat.h>
+#include <sys/utsname.h>
// CNC:2003-03-17
#include <apt-pkg/luaiface.h>
@@ -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);