@@ -108,6 +108,7 @@ pub(crate) struct Tarball<'a> {
108
108
include_target_in_component_name : bool ,
109
109
is_preview : bool ,
110
110
permit_symlinks : bool ,
111
+ is_prepare_only : bool ,
111
112
}
112
113
113
114
impl < ' a > Tarball < ' a > {
@@ -148,6 +149,7 @@ impl<'a> Tarball<'a> {
148
149
include_target_in_component_name : false ,
149
150
is_preview : false ,
150
151
permit_symlinks : false ,
152
+ is_prepare_only : false ,
151
153
}
152
154
}
153
155
@@ -167,6 +169,10 @@ impl<'a> Tarball<'a> {
167
169
self . is_preview = is;
168
170
}
169
171
172
+ pub ( crate ) fn is_prepare_only ( & mut self , is : bool ) {
173
+ self . is_prepare_only = is;
174
+ }
175
+
170
176
pub ( crate ) fn permit_symlinks ( & mut self , flag : bool ) {
171
177
self . permit_symlinks = flag;
172
178
}
@@ -301,6 +307,10 @@ impl<'a> Tarball<'a> {
301
307
. arg ( & self . overlay_dir )
302
308
. arg ( "--output-dir" )
303
309
. arg ( distdir ( self . builder ) ) ;
310
+
311
+ if self . is_prepare_only {
312
+ cmd. arg ( "--prepare-only" ) ;
313
+ }
304
314
}
305
315
306
316
fn run ( self , build_cli : impl FnOnce ( & Tarball < ' a > , & mut Command ) ) -> GeneratedTarball {
@@ -355,6 +365,7 @@ impl<'a> Tarball<'a> {
355
365
path : distdir ( self . builder ) . join ( format ! ( "{package_name}.tar.{ext}" ) ) ,
356
366
decompressed_output,
357
367
work : self . temp_dir ,
368
+ component : self . component ,
358
369
}
359
370
}
360
371
}
0 commit comments