Apply apt-0.5.15lorg2-alt-pkgInitConfig-cpu.patch
Added in commit e97a90d
:
0.5.15lorg2-alt3
- Resolved a few issues introduced after cnc6.
This commit is contained in:
parent
761d0a0c73
commit
204050e6d5
@ -1,29 +0,0 @@
|
||||
--- 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);
|
@ -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,10 +38,17 @@ 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);
|
||||
// CNC:2002-09-10
|
||||
|
Loading…
Reference in New Issue
Block a user