The following commit has been merged in the master branch:
commit e5dbbbb6770c7b432bcfd35dae8d2ff86bd03ed6
Author: Guillem Jover <[email protected]>
Date: Sun Nov 27 23:53:15 2011 +0100
dpkg: Change --print-foreign-architectures to print an entry per line
Printing just a line with space separated entries makes both the code
to print and to parse slightly more complicated. The worst part comes
from parsing as the standard stream input operations require delimited
buffers, and as such if those buffers would not be enough truncation
would happen.
diff --git a/man/dpkg.1 b/man/dpkg.1
index 9f11a6e..a01ae42 100644
--- a/man/dpkg.1
+++ b/man/dpkg.1
@@ -1,4 +1,4 @@
-.TH dpkg 1 "2011-08-14" "Debian Project" "dpkg suite"
+.TH dpkg 1 "2011-11-27" "Debian Project" "dpkg suite"
.SH NAME
dpkg \- package manager for Debian
.
@@ -236,7 +236,7 @@ reason still haven't been installed.
Print architecture of packages \fBdpkg\fP installs (for example, "i386").
.TP
.B \-\-print\-foreign\-architectures
-Print a space-separated list of the extra architectures \fBdpkg\fP is
+Print a newline-separated list of the extra architectures \fBdpkg\fP is
configured to allow packages to be installed for.
.TP
.B \-\-compare\-versions \fIver1 op ver2\fP
diff --git a/src/enquiry.c b/src/enquiry.c
index 2b45db3..1d7326f 100644
--- a/src/enquiry.c
+++ b/src/enquiry.c
@@ -480,7 +480,6 @@ int
print_foreign_arches(const char *const *argv)
{
struct dpkg_arch *arch;
- const char *sep = "";
if (*argv)
badusage(_("--%s takes no arguments"), cipaction->olong);
@@ -488,10 +487,9 @@ print_foreign_arches(const char *const *argv)
for (arch = dpkg_arch_get_list(); arch; arch = arch->next) {
if (arch->type != arch_foreign)
continue;
- printf("%s%s", sep, arch->name);
- sep = " ";
+
+ printf("%s\n", arch->name);
}
- printf("\n");
m_output(stdout, _("<standard output>"));
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]