summaryrefslogtreecommitdiff
path: root/apt-pkg/aptconfiguration.cc
diff options
context:
space:
mode:
authorMichael Vogt <egon@debian-devbox>2012-01-18 10:24:43 +0100
committerMichael Vogt <egon@debian-devbox>2012-01-18 10:24:43 +0100
commit5abee4863220c2d9b135dc832b33c8680e5ba12e (patch)
treec8c60d8d64ac697d23309d4ee5c185e63301295d /apt-pkg/aptconfiguration.cc
parenta97c2991ab68ef77abdd5a13a1f49f08fa2755ff (diff)
parent6dcf25e754baca025ff3694b063f778c8c8948af (diff)
* apt-pkg/aptconfiguration.cc:
- parse dpkg --print-foreign-architectures correctly in case archs are separated by newline instead of space, too. (Closes: #655590) * Slovak (Ivan Masar). Closes: #652985 * Russian (Yuri Kozlov). Closes: #654844 * Hungarian (Gabor Kelemen). Closes: #655238
Diffstat (limited to 'apt-pkg/aptconfiguration.cc')
-rw-r--r--apt-pkg/aptconfiguration.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc
index 7441b452c..c7da4cf35 100644
--- a/apt-pkg/aptconfiguration.cc
+++ b/apt-pkg/aptconfiguration.cc
@@ -337,7 +337,7 @@ std::vector<std::string> const Configuration::getArchitectures(bool const &Cache
FILE *dpkg = popen(dpkgcall.c_str(), "r");
char buf[1024];
if(dpkg != NULL) {
- if (fgets(buf, sizeof(buf), dpkg) != NULL) {
+ while (fgets(buf, sizeof(buf), dpkg) != NULL) {
char* arch = strtok(buf, " ");
while (arch != NULL) {
for (; isspace(*arch) != 0; ++arch);