summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2012-05-16 16:44:15 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2012-05-16 16:44:15 +0200
commit65f9983436be310c768c4c42531ceea1e3a6d4ac (patch)
treef48e49fc1a34e0a19f77e5b59c3662df1fcc2be8 /cmdline
parent500400fedd6e57eb0162a0e41fdd9ba05a2cae3d (diff)
* cmdline/apt-get.cc:
- use the host architecture, not the build architecture for matching of [architecture restrictions] in Build-Depends (Closes: #672927) *
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-get.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index dd9313bff..c996017b8 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -2789,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");