The following commit has been merged in the master branch:
commit dac802bce2e7fa909dac09d87f6fadb6074b9097
Author: Guillem Jover <guil...@debian.org>
Date:   Thu Jul 7 19:08:18 2011 +0200

    dpkg-deb: Use CONTROLFILE instead of a literal string

diff --git a/dpkg-deb/info.c b/dpkg-deb/info.c
index cd67d78..c7ab5e6 100644
--- a/dpkg-deb/info.c
+++ b/dpkg-deb/info.c
@@ -184,12 +184,12 @@ info_list(const char *debar, const char *dir)
   free(cdlist);
 
   varbuf_trunc(&controlfile, dirlen);
-  varbuf_add_str(&controlfile, "control");
+  varbuf_add_str(&controlfile, CONTROLFILE);
   varbuf_end_str(&controlfile);
   cc = fopen(controlfile.buf, "r");
   if (!cc) {
     if (errno != ENOENT)
-      ohshite(_("failed to read `%.255s' (in `%.255s')"), "control", dir);
+      ohshite(_("failed to read `%.255s' (in `%.255s')"), CONTROLFILE, dir);
     fputs(_("(no `control' file in control archive!)\n"), stdout);
   } else {
     lines= 1;
@@ -203,7 +203,7 @@ info_list(const char *debar, const char *dir)
       putc('\n', stdout);
 
     if (ferror(cc))
-      ohshite(_("failed to read `%.255s' (in `%.255s')"), "control", dir);
+      ohshite(_("failed to read `%.255s' (in `%.255s')"), CONTROLFILE, dir);
     fclose(cc);
   }
 
@@ -270,7 +270,7 @@ info_field(const char *debar, const char *dir, const char 
*const *fields,
   }
   if (ferror(cc)) ohshite(_("failed during read of `control' component"));
   if (fclose(cc))
-    ohshite(_("error closing the '%s' component"), "control");
+    ohshite(_("error closing the '%s' component"), CONTROLFILE);
   if (doing) putc('\n',stdout);
   m_output(stdout, _("<standard output>"));
   varbuf_destroy(&controlfile);
@@ -326,7 +326,7 @@ do_field(const char *const *argv)
   if (*argv) {
     info_field(debar, dir, argv, argv[1] != NULL);
   } else {
-    static const char *const controlonly[] = { "control", NULL };
+    static const char *const controlonly[] = { CONTROLFILE, NULL };
     info_spew(debar, dir, controlonly);
   }
 

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to