summaryrefslogtreecommitdiff
path: root/apt-private/private-source.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-12-29 12:12:01 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2016-12-31 02:29:20 +0100
commit0c646119dea438abb3ee8797994d016ba6834cd2 (patch)
treeb511c1be09ce7984c06f524b0bebf91d49f0d552 /apt-private/private-source.cc
parent0161280405fe5aa256dc9df6a56106dd3a1a6f38 (diff)
add --indep-only for build-dep command
The implementation is quite different compared to --arch-only due to ABI reasons but functionality wise they are similar and usually both available for symmetry at least. Closes: #845775
Diffstat (limited to 'apt-private/private-source.cc')
-rw-r--r--apt-private/private-source.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/apt-private/private-source.cc b/apt-private/private-source.cc
index 68935d97d..5cd0a6628 100644
--- a/apt-private/private-source.cc
+++ b/apt-private/private-source.cc
@@ -608,9 +608,14 @@ static void WriteBuildDependencyPackage(std::ostringstream &buildDepsPkgFile,
<< "Architecture: " << Arch << "\n"
<< "Version: 1\n";
+ bool const IndepOnly = _config->FindB("APT::Get::Indep-Only", false);
std::string depends, conflicts;
for (auto const &dep: Dependencies)
{
+ // ArchOnly is handled while parsing the dependencies on input
+ if (IndepOnly && (dep.Type == pkgSrcRecords::Parser::BuildDependArch ||
+ dep.Type == pkgSrcRecords::Parser::BuildConflictArch))
+ continue;
std::string * type;
if (dep.Type == pkgSrcRecords::Parser::BuildConflict ||
dep.Type == pkgSrcRecords::Parser::BuildConflictIndep ||