diff --git a/repos/gems/run/sculpt.run b/repos/gems/run/sculpt.run index 8c70b93d89..f73c3bd108 100644 --- a/repos/gems/run/sculpt.run +++ b/repos/gems/run/sculpt.run @@ -853,8 +853,36 @@ exec sed -i "/config/s/arch=\"\"/arch=\"[depot_spec]\"/" [initial_config_file de ## Depot content integrated in the Sculpt image ## -create_tar_from_depot_binaries [run_dir]/genode/depot.tar \ +## +# Return which kind of depot archive is wanted 'tar' or 'omit' +# +proc depot_archive { } { + + global ::env + + set archive "tar" + if {[info exists ::env(DEPOT)]} { + set archive "$::env(DEPOT)" } + + if {$archive != "omit" && $archive != "tar"} { + puts stderr "Error: invalid value of DEPOT=$archive variable!" } + + return $archive +} + +proc create_depot_archive { } { + global ::env + + if {[depot_archive] == "tar"} { + create_tar_from_depot_binaries [run_dir]/genode/depot.tar \ {*}[pkg_archive_paths [referenced_pkg_values]] + } else { + puts "Do not forget to publish:" + puts [pkg_archive_paths [referenced_pkg_values]] + } +} + +create_depot_archive #