]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/aptconfiguration.cc
* apt-pkg/cdrom.{cc,h}:
[apt.git] / apt-pkg / aptconfiguration.cc
index 14ee09e0d2ea7c5c34e6d5b6af02f5465a011edc..9ccbeecf1c0f299f8d6f93f0bdb4953df2358a78 100644 (file)
@@ -224,7 +224,7 @@ std::vector<std::string> const Configuration::getLanguages(bool const &All,
                environment.push_back("en");
        }
 
-       // Support settings like Acquire::Translation=none on the command line to
+       // Support settings like Acquire::Languages=none on the command line to
        // override the configuration settings vector of languages.
        string const forceLang = _config->Find("Acquire::Languages","");
        if (forceLang.empty() == false) {
@@ -337,7 +337,7 @@ std::vector<std::string> const Configuration::getArchitectures(bool const &Cache
                                char* arch = strtok(buf, " ");
                                while (arch != NULL) {
                                        for (; isspace(*arch) != 0; ++arch);
-                                       if (arch != '\0') {
+                                       if (arch[0] != '\0') {
                                                char const* archend = arch;
                                                for (; isspace(*archend) == 0 && *archend != '\0'; ++archend);
                                                archs.push_back(string(arch, (archend - arch)));
@@ -352,7 +352,7 @@ std::vector<std::string> const Configuration::getArchitectures(bool const &Cache
 
        if (archs.empty() == true ||
            std::find(archs.begin(), archs.end(), arch) == archs.end())
-               archs.push_back(arch);
+               archs.insert(archs.begin(), arch);
 
        // erase duplicates and empty strings
        for (std::vector<string>::reverse_iterator a = archs.rbegin();