The following commit has been merged in the master branch:
commit df219a607282614168b6d19423d57bb902021f34
Author: Guillem Jover <[email protected]>
Date:   Sat Jan 29 05:59:09 2011 +0100

    Rename architecture variables to arch
    
    The “arch” name is unambiguous in this context, and as we are going to
    be using it more often, let's avoid unnecessary typing.

diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
index da12d97..dcf86c4 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
@@ -371,7 +371,7 @@ pkg_get_pathname(const char *dir, struct pkginfo *pkg)
   const char *versionstring, *arch;
 
   versionstring = versiondescribe(&pkg->available.version, vdew_never);
-  arch = pkg->available.architecture;
+  arch = pkg->available.arch;
   m_asprintf(&path, "%s/%s_%s%s%s%s", dir, pkg->name, versionstring,
              arch ? "_" : "", arch ? arch : "", DEBEXT);
 
diff --git a/lib/dpkg/database.c b/lib/dpkg/database.c
index e276c30..dc6fd87 100644
--- a/lib/dpkg/database.c
+++ b/lib/dpkg/database.c
@@ -88,7 +88,7 @@ pkgbin_blank(struct pkgbin *pifp)
   pifp->depends= NULL;
   pifp->depended= NULL;
   pifp->description= pifp->maintainer= pifp->source= pifp->installedsize= 
pifp->bugs= pifp->origin= NULL;
-  pifp->architecture= NULL;
+  pifp->arch = NULL;
   blankversion(&pifp->version);
   pifp->conffiles= NULL;
   pifp->arbs= NULL;
diff --git a/lib/dpkg/dpkg-db.h b/lib/dpkg/dpkg-db.h
index 59466d9..a05534f 100644
--- a/lib/dpkg/dpkg-db.h
+++ b/lib/dpkg/dpkg-db.h
@@ -116,7 +116,7 @@ struct pkgbin {
   const char *description;
   const char *maintainer;
   const char *source;
-  const char *architecture;
+  const char *arch;
   const char *installedsize;
   const char *origin;
   const char *bugs;
diff --git a/lib/dpkg/parse.c b/lib/dpkg/parse.c
index 039f00b..b2bc6ca 100644
--- a/lib/dpkg/parse.c
+++ b/lib/dpkg/parse.c
@@ -57,7 +57,7 @@ const struct fieldinfo fieldinfos[]= {
   { "Origin",           f_charfield,       w_charfield,      PKGIFPOFF(origin) 
       },
   { "Maintainer",       f_charfield,       w_charfield,      
PKGIFPOFF(maintainer)    },
   { "Bugs",             f_charfield,       w_charfield,      PKGIFPOFF(bugs)   
       },
-  { "Architecture",     f_charfield,       w_charfield,      
PKGIFPOFF(architecture)  },
+  { "Architecture",     f_charfield,       w_charfield,      PKGIFPOFF(arch)   
       },
   { "Source",           f_charfield,       w_charfield,      PKGIFPOFF(source) 
       },
   { "Version",          f_version,         w_version,        
PKGIFPOFF(version)       },
   { "Revision",         f_revision,        w_null                              
       },
@@ -169,7 +169,7 @@ pkg_parse_verify(struct parsedb_state *ps,
     parse_must_have_field(ps, pkg, pkgbin->version.version, "version");
   }
   if (ps->flags & pdb_recordavailable)
-    parse_ensure_have_field(ps, pkg, &pkgbin->architecture, "architecture");
+    parse_ensure_have_field(ps, pkg, &pkgbin->arch, "architecture");
 
   /* Check the Config-Version information:
    * If there is a Config-Version it is definitely to be used, but
diff --git a/src/enquiry.c b/src/enquiry.c
index 1594f54..3ea523d 100644
--- a/src/enquiry.c
+++ b/src/enquiry.c
@@ -431,7 +431,7 @@ void printarch(const char *const *argv) {
   if (*argv)
     badusage(_("--%s takes no arguments"), cipaction->olong);
 
-  printf("%s\n", architecture);
+  printf("%s\n", arch);
 
   m_output(stdout, _("<standard output>"));
 }
diff --git a/src/help.c b/src/help.c
index 6d8f7b9..63e0031 100644
--- a/src/help.c
+++ b/src/help.c
@@ -265,7 +265,7 @@ do_script(struct pkginfo *pkg, struct pkgbin *pif,
   pid = subproc_fork();
   if (pid == 0) {
     if (setenv("DPKG_MAINTSCRIPT_PACKAGE", pkg->name, 1) ||
-        setenv("DPKG_MAINTSCRIPT_ARCH", pif->architecture, 1) ||
+        setenv("DPKG_MAINTSCRIPT_ARCH", pif->arch, 1) ||
         setenv("DPKG_MAINTSCRIPT_NAME", cmd->argv[0], 1) ||
         setenv("DPKG_RUNNING_VERSION", PACKAGE_VERSION, 1))
       ohshite(_("unable to setenv for maintainer script"));
diff --git a/src/main.c b/src/main.c
index 22e8ed3..cfefa3b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -166,7 +166,7 @@ usage(const struct cmdinfo *ci, const char *value)
 }
 
 const char thisname[]= "dpkg";
-const char architecture[]= ARCHITECTURE;
+const char arch[] = ARCHITECTURE;
 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 185a797..89244b2 100644
--- a/src/main.h
+++ b/src/main.h
@@ -139,7 +139,7 @@ extern int errabort;
 extern const char *admindir;
 extern const char *instdir;
 extern struct pkg_list *ignoredependss;
-extern const char architecture[];
+extern const char arch[];
 
 struct invoke_hook {
        struct invoke_hook *next;
diff --git a/src/processarc.c b/src/processarc.c
index b686bc0..8dbd497 100644
--- a/src/processarc.c
+++ b/src/processarc.c
@@ -282,12 +282,12 @@ void process_archive(const char *filename) {
     return;
   }
 
-  if (pkg->available.architecture && *pkg->available.architecture &&
-      strcmp(pkg->available.architecture,"all") &&
-      strcmp(pkg->available.architecture,architecture))
+  if (pkg->available.arch && *pkg->available.arch &&
+      strcmp(pkg->available.arch, "all") &&
+      strcmp(pkg->available.arch, arch))
     forcibleerr(fc_architecture,
                 _("package architecture (%s) does not match system (%s)"),
-                pkg->available.architecture,architecture);
+                pkg->available.arch, arch);
 
   for (deconpil= deconfigure;
        deconpil;
@@ -1026,7 +1026,7 @@ void process_archive(const char *filename) {
   pkg->installed.description= pkg->available.description;
   pkg->installed.maintainer= pkg->available.maintainer;
   pkg->installed.source= pkg->available.source;
-  pkg->installed.architecture= pkg->available.architecture;
+  pkg->installed.arch = pkg->available.arch;
   pkg->installed.installedsize= pkg->available.installedsize;
   pkg->installed.version= pkg->available.version;
   pkg->installed.origin = pkg->available.origin;

-- 
dpkg's main repository


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

Reply via email to