in lib/omnibus/compressors/dmg.rb [252:276]
def compress_dmg
log.info(log_key) { "Compressing dmg" }
Dir.chdir(staging_dir) do
shellout! <<-EOH.gsub(/^ {10}/, "")
chmod -Rf go-w "/Volumes/#{volume_name}"
sync
hdiutil unmount "#{@device}"
ATTEMPTS=1
until [ $ATTEMPTS -eq 6 ] || hdiutil detach "#{@device}"; do
sleep 10
echo Attempt number $(( ATTEMPTS++ ))
done
hdiutil convert \\
"#{writable_dmg}" \\
-format UDZO \\
-imagekey \\
zlib-level=9 \\
-o "#{package_path}" \\
-puppetstrings
EOH
end
end