The following commit has been merged in the master branch:
commit 1201dc561bcd1605b88ceec6a7fc7d7a77a09080
Author: Guillem Jover <[email protected]>
Date:   Mon Jan 31 11:07:54 2011 +0100

    dpkg: Use dpkg_arch_get_native() instead of native_arch

diff --git a/src/enquiry.c b/src/enquiry.c
index a237817..5a8efbf 100644
--- a/src/enquiry.c
+++ b/src/enquiry.c
@@ -459,7 +459,7 @@ printarch(const char *const *argv)
   if (*argv)
     badusage(_("--%s takes no arguments"), cipaction->olong);
 
-  printf("%s\n", native_arch);
+  printf("%s\n", dpkg_arch_get_native()->name);
 
   m_output(stdout, _("<standard output>"));
 
diff --git a/src/main.c b/src/main.c
index 22bf819..e81d7ef 100644
--- a/src/main.c
+++ b/src/main.c
@@ -165,7 +165,6 @@ usage(const struct cmdinfo *ci, const char *value)
   exit(0);
 }
 
-const char native_arch[] = ARCHITECTURE;
 static const char printforhelp[] = N_(
 "Type dpkg --help for help about installing and deinstalling packages [*];\n"
 "Use `dselect' or `aptitude' for user-friendly package management;\n"
diff --git a/src/main.h b/src/main.h
index 0abada1..917c2a1 100644
--- a/src/main.h
+++ b/src/main.h
@@ -139,7 +139,6 @@ extern bool abort_processing;
 extern int errabort;
 extern const char *instdir;
 extern struct pkg_list *ignoredependss;
-extern const char native_arch[];
 
 struct invoke_hook {
        struct invoke_hook *next;
diff --git a/src/processarc.c b/src/processarc.c
index 1651608..c24064a 100644
--- a/src/processarc.c
+++ b/src/processarc.c
@@ -500,7 +500,7 @@ void process_archive(const char *filename) {
       pkg->available.arch->type != arch_native)
     forcibleerr(fc_architecture,
                 _("package architecture (%s) does not match system (%s)"),
-                pkg->available.arch->name, native_arch);
+                pkg->available.arch->name, dpkg_arch_get_native()->name);
 
   for (deconpil= deconfigure;
        deconpil;

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to