summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-config.cc5
-rw-r--r--cmdline/apt-get.cc6
2 files changed, 11 insertions, 0 deletions
diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc
index 30c2a22d5..9f20b3c1b 100644
--- a/cmdline/apt-config.cc
+++ b/cmdline/apt-config.cc
@@ -155,6 +155,11 @@ int main(int argc,const char *argv[]) /*{{{*/
_config->Set(comp + "UncompressArg::", *a);
}
+ std::vector<std::string> const profiles = APT::Configuration::getBuildProfiles();
+ _config->Clear("APT::Build-Profiles");
+ for (std::vector<std::string>::const_iterator p = profiles.begin(); p != profiles.end(); ++p)
+ _config->Set("APT::Build-Profiles::", *p);
+
// Match the operation
CmdL.DispatchArg(Cmds);
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 12e385b69..f8de80a91 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -970,6 +970,12 @@ bool DoSource(CommandLine &CmdL)
string buildopts = _config->Find("APT::Get::Host-Architecture");
if (buildopts.empty() == false)
buildopts = "-a" + buildopts + " ";
+
+ // get all active build profiles
+ std::string const profiles = APT::Configuration::getBuildProfilesString();
+ if (profiles.empty() == false)
+ buildopts.append(" -P").append(profiles).append(" ");
+
buildopts.append(_config->Find("DPkg::Build-Options","-b -uc"));
// Call dpkg-buildpackage