@@ -108,6 +108,7 @@ pub(crate) struct Tarball<'a> {
108108 include_target_in_component_name : bool ,
109109 is_preview : bool ,
110110 permit_symlinks : bool ,
111+ is_prepare_only : bool ,
111112}
112113
113114impl < ' a > Tarball < ' a > {
@@ -148,6 +149,7 @@ impl<'a> Tarball<'a> {
148149 include_target_in_component_name : false ,
149150 is_preview : false ,
150151 permit_symlinks : false ,
152+ is_prepare_only : false ,
151153 }
152154 }
153155
@@ -167,6 +169,10 @@ impl<'a> Tarball<'a> {
167169 self . is_preview = is;
168170 }
169171
172+ pub ( crate ) fn is_prepare_only ( & mut self , is : bool ) {
173+ self . is_prepare_only = is;
174+ }
175+
170176 pub ( crate ) fn permit_symlinks ( & mut self , flag : bool ) {
171177 self . permit_symlinks = flag;
172178 }
@@ -301,6 +307,10 @@ impl<'a> Tarball<'a> {
301307 . arg ( & self . overlay_dir )
302308 . arg ( "--output-dir" )
303309 . arg ( distdir ( self . builder ) ) ;
310+
311+ if self . is_prepare_only {
312+ cmd. arg ( "--prepare-only" ) ;
313+ }
304314 }
305315
306316 fn run ( self , build_cli : impl FnOnce ( & Tarball < ' a > , & mut Command ) ) -> GeneratedTarball {
@@ -355,6 +365,7 @@ impl<'a> Tarball<'a> {
355365 path : distdir ( self . builder ) . join ( format ! ( "{package_name}.tar.{ext}" ) ) ,
356366 decompressed_output,
357367 work : self . temp_dir ,
368+ component : self . component ,
358369 }
359370 }
360371}
0 commit comments