# Call gbs export
#---------------------------------------------------------------------
sub gbs_export {
- my ($base, $spec, $packaging_dir, $upstream_branch, $upstream_tag) = @_;
+ my ($base, $spec, $packaging_dir, $upstream_branch, $upstream_tag, $out_dir) = @_;
my @args = ();
my $cmd;
push @args, "gbs";
push @args, "--debug" if ($debug);
push @args, "export";
push @args, "$base";
- push @args, "-o $pkg_path";
+ push @args, "-o $out_dir";
+ push @args, "--outdir-directly";
push @args, "--spec $spec";
if ($includeall == 1) {
push @args, "--include-all";
my ($cache_key, $cache_val, $base, $spec, $packaging_dir, $upstream_branch, $upstream_tag) = @_;
my $cache_fname = "$cache_path/$cache_key";
my @export_out;
+ my $out_dir = "$pkg_path/$cache_key";
- @export_out = gbs_export($base, $spec, $packaging_dir, $upstream_branch, $upstream_tag);
+ @export_out = gbs_export($base, $spec, $packaging_dir, $upstream_branch, $upstream_tag, $out_dir);
if (shift @export_out) {
# if export failed, collect export error to report
push(@export_errors, {package_name => $cache_key,