@@ -257,6 +257,10 @@ sub setup ($) {
CHECK => $validate_program,
DEFAULT => 'xapt'
},
+ 'EMBUILDDEPS' => {
+ CHECK => $validate_program,
+ DEFAULT => 'embuilddeps'
+ },
'DPKG_BUILDPACKAGE_USER_OPTIONS' => {
TYPE => 'ARRAY:STRING',
GROUP => '__INTERNAL',
@@ -448,10 +448,12 @@ sub run_xapt {
# dpkg since 1.4.1.18 issues an error on the conffile question if
# it reads EOF -- hardwire the new --force-confold option to avoid
# the questions.
- my @xapt_command = ($self->get_conf('XAPT'),
- '-a', $self->get_conf('HOST_ARCH'));
- # FIXME?:push @xapt_command, "$mode", $action, @packages;
- push @xapt_command, @packages;
+ use Data::Dumper;
+ debug("Source Dir = " . $self->get('Source Dir') . "\n");
+ print "Dump Source Dir\n";
+ print Dumper ($self->get('Source Dir'));
+ # chdir ($dir);
+ my @xapt_command = ($self->get_conf('EMBUILDDEPS'));
my $pipe =
$self->pipe_xapt_command(
{ COMMAND => \@xapt_command,
@@ -1056,6 +1058,23 @@ sub pipe_apt_command {
}
}
+sub pipe_xapt_command {
+ my $self = shift;
+ my $options = shift;
+
+ my $session = $self->get('Session');
+ my $host = $self->get('Host');
+
+ # Set modfied command
+ $self->get_apt_command_internal($options);
+
+ if ($self->get('Split')) {
+ return $host->pipe_command_internal($options);
+ } else {
+ return $session->pipe_command_internal($options);
+ }
+}
+
sub get_aptitude_command_internal {
my $self = shift;
my $options = shift;
@@ -56,11 +56,11 @@ sub install_deps {
my $status = 0;
my $session = $self->get('Session');
- my $dummy_pkg_name = 'sbuild-build-depends-' . $name. '-dummy';
+# my $dummy_pkg_name = 'sbuild-build-depends-' . $name. '-dummy';
# Call functions to setup an archive to install dummy package.
- return 0 unless ($self->setup_apt_archive($dummy_pkg_name, @pkgs));
- return 0 unless (!$self->update_archive());
+# return 0 unless ($self->setup_apt_archive($dummy_pkg_name, @pkgs));
+# return 0 unless (!$self->update_archive());
$self->log_subsection("Install $name cross-build dependencies (xapt-based resolver)");
@@ -68,7 +68,10 @@ sub install_deps {
# Install the dummy package
my (@instd, @rmvd);
$self->log("Installing cross-build dependencies\n");
- if (!$self->run_apt("-yf", \@instd, \@rmvd, 'install', $dummy_pkg_name)) {
+# if (!$self->run_apt("-yf", \@instd, \@rmvd, 'install', $dummy_pkg_name)) {
+ print "checking pwd\n";
+ system("pwd");
+ if (!$self->run_xapt("-a", $self->get_conf('HOST_ARCH'))) {
$self->log("Package installation failed\n");
if (defined ($self->get('Session')->get('Session Purged')) &&
$self->get('Session')->get('Session Purged') == 1) {