[Dctrl-tools-devel] [SCM] Debian control file query tools branch, master, updated. 2.18-8-g4e1f1ef

Antti-Juhani Kaijanaho ajk at debian.org
Sat Jul 23 13:37:04 UTC 2011


The following commit has been merged in the master branch:
commit 225f7827155d61c26d29365f887588f3b2b3dc9a
Author: Antti-Juhani Kaijanaho <ajk at debian.org>
Date:   Sat Jul 23 16:35:25 2011 +0300

    Importing 2.18ubuntu1

diff --git a/debian/changelog b/debian/changelog
index a8169be..fcf3e7f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+dctrl-tools (2.18ubuntu1) oneiric; urgency=low
+
+  * lib/msg.h, grep-dctrl/rc.c, join-dctrl/join-dctrl.c: Pass the arguments to
+    message() in the right order (fixes FTBFS; lp: #774391, Closes: #624707)
+
+ -- Michael Bienia <geser at ubuntu.com>  Mon, 02 May 2011 08:25:34 +0100
+
 dctrl-tools (2.18) unstable; urgency=low
 
   * debian/rules: Override prefix and sysconfdir even for building
diff --git a/grep-dctrl/rc.c b/grep-dctrl/rc.c
index a575135..5cc5cf1 100644
--- a/grep-dctrl/rc.c
+++ b/grep-dctrl/rc.c
@@ -64,14 +64,14 @@ static bool perms_ok(char const * fname, int fd)
 		return false;
 	}
 	if (stat.st_uid != 0 && stat.st_uid != getuid()) {
-		message(L_IMPORTANT, _("not owned by you or root, ignoring"),
-			fname);
+		message(L_IMPORTANT, fname,
+			_("not owned by you or root, ignoring"));
 		return false;
 	}
 	if ((stat.st_mode & (S_IWGRP | S_IWOTH)) != 0) {
-		message(L_IMPORTANT, _("write permissions for "
-				       "group or others, ignoring"),
-			fname);
+		message(L_IMPORTANT, fname,
+			_("write permissions for "
+			  "group or others, ignoring"));
 		return false;
 	}
 	return true;
@@ -109,11 +109,11 @@ struct ifile find_ifile_by_exename(const char * exename, const char * rcfname)
 		return (struct ifile){ .mode = m_error, .s = 0 };
 	}
 
-	message(L_INFORMATIONAL, _("reading config file"), fname);
+	message(L_INFORMATIONAL, fname, _("reading config file"));
 
 	f = fopen(fname, "r");
 	if (f == 0) {
-		message(L_INFORMATIONAL, strerror(errno), fname);
+		message(L_INFORMATIONAL, fname, "%s", strerror(errno));
 		return (struct ifile){ .mode = m_error, .s = 0 };
 	}
 
@@ -136,8 +136,8 @@ struct ifile find_ifile_by_exename(const char * exename, const char * rcfname)
 
 		line = getaline (f);
 		if (line == 0) {
-			message(L_FATAL, _("read failure or out of memory"),
-				fname);
+			message(L_FATAL, fname,
+				_("read failure or out of memory"));
 			fail();
 		}
 
diff --git a/join-dctrl/join-dctrl.c b/join-dctrl/join-dctrl.c
index 426ef9a..1830b41 100644
--- a/join-dctrl/join-dctrl.c
+++ b/join-dctrl/join-dctrl.c
@@ -91,7 +91,7 @@ static error_t parse_opt (int key, char * arg, struct argp_state * state)
                 for (size_t i = 0; i < 2; i++) {
                         if (key == the_other_key[i]) continue;
                         if (args->join_field[0] != NULL) {
-                                message(L_FATAL, 0, gettext(errmsg[i]));
+                                message(L_FATAL, 0, "%s", gettext(errmsg[i]));
                                 fail();
                         }
                 }
diff --git a/lib/msg.h b/lib/msg.h
index 23cf1ce..e61b3a4 100644
--- a/lib/msg.h
+++ b/lib/msg.h
@@ -112,7 +112,7 @@ inline static void
 debug_message (const char * s, const char * fname)
 {
 #ifdef INCLUDE_DEBUG_MSGS
-  message (L_DEBUG, s, fname);
+  message (L_DEBUG, fname, "%s", s);
 #endif
 }
 
@@ -137,7 +137,7 @@ debug(const char * s, ...)
 inline static void
 errno_msg(int severity, char const * fname)
 {
-	message(severity, strerror(errno), fname);
+	message(severity, fname, "%s", strerror(errno));
 }
 
 #define enomem_msg _("cannot find enough memory")
@@ -145,13 +145,13 @@ errno_msg(int severity, char const * fname)
 inline static void
 enomem (const char * fname)
 {
-  message (L_IMPORTANT, enomem_msg, fname);
+  message (L_IMPORTANT, fname, enomem_msg);
 }
 
 inline static void
 fatal_enomem (const char * fname)
 {
-  message(L_FATAL, enomem_msg, fname);
+  message(L_FATAL, fname, enomem_msg);
   fail();
 }
 

-- 
Debian control file query tools



More information about the Dctrl-tools-devel mailing list