From ad679dace15f4c0e2ea2b17af53ed53bc22fe885 Mon Sep 17 00:00:00 2001 From: "y0169.zhang" Date: Wed, 6 Dec 2017 19:31:51 +0800 Subject: [PATCH] Pass the export directory to gbs export which could get the correct macros used in spec Change-Id: I5c7bdc7c82228e4beeb8216b3a13fa214b442809 Signed-off-by: Jun Wang --- depanneur | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/depanneur b/depanneur index 7a1923e..df6037b 100755 --- a/depanneur +++ b/depanneur @@ -711,14 +711,15 @@ sub fill_packs_from_git { # 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"; @@ -783,8 +784,9 @@ sub write_cache { 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, -- 2.7.4