]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-get.cc
French updated by Christian Perrier
[apt.git] / cmdline / apt-get.cc
index 4e6cc32de9d6d11773dbeeaa9fbee47122ebbfce..c996017b8906bb4af1679f7e3fd181680f8176c3 100644 (file)
@@ -1679,10 +1679,13 @@ bool DoUpdate(CommandLine &CmdL)
        ListUpdate(Stat, *List);
 
    // Rebuild the cache.
-   pkgCacheFile::RemoveCaches();
-   if (Cache.BuildCaches() == false)
-      return false;
-   
+   if (_config->FindB("pkgCacheFile::Generate", true) == true)
+   {
+      pkgCacheFile::RemoveCaches();
+      if (Cache.BuildCaches() == false)
+        return false;
+   }
+
    return true;
 }
                                                                        /*}}}*/
@@ -2786,8 +2789,18 @@ bool DoBuildDep(CommandLine &CmdL)
             
       // Process the build-dependencies
       vector<pkgSrcRecords::Parser::BuildDepRec> BuildDeps;
-      if (Last->BuildDepends(BuildDeps, _config->FindB("APT::Get::Arch-Only", false), StripMultiArch) == false)
-       return _error->Error(_("Unable to get build-dependency information for %s"),Src.c_str());
+      // FIXME: Can't specify architecture to use for [wildcard] matching, so switch default arch temporary
+      if (hostArch.empty() == false)
+      {
+        std::string nativeArch = _config->Find("APT::Architecture");
+        _config->Set("APT::Architecture", hostArch);
+        bool Success = Last->BuildDepends(BuildDeps, _config->FindB("APT::Get::Arch-Only", false), StripMultiArch);
+        _config->Set("APT::Architecture", nativeArch);
+        if (Success == false)
+           return _error->Error(_("Unable to get build-dependency information for %s"),Src.c_str());
+      }
+      else if (Last->BuildDepends(BuildDeps, _config->FindB("APT::Get::Arch-Only", false), StripMultiArch) == false)
+           return _error->Error(_("Unable to get build-dependency information for %s"),Src.c_str());
    
       // Also ensure that build-essential packages are present
       Configuration::Item const *Opts = _config->Tree("APT::Build-Essential");