https://bugs.documentfoundation.org/show_bug.cgi?id=151341

--- Comment #8 from Mingye Wang <[email protected]> ---
That series of posts is not particularly helpful. Specifically, you just don't
"decompress" a dmg; you mount it, you see a big new volume pop up, and you copy
the file from it. There is no single command to do that, and the post of course
doesn't have it. (Some of the commands it used have more concise alternatives
under bsdtar, but I digress.)

If y'all read Comment 5, I think the problem should already be considered
solved -- just replace `-format UDBZ` with `-format ULFO` in that
`simplepackage.pm` thing. But for posterity and for better measurements, let's
actually measure the time taken to copy files from a whole disk image. Why not
-- it's easier than hand-typing a patch.

```bash
unpack() {
    # Unpacks a DMG file
    local dir=$(hdiutil attach -mountrandom /tmp "$@" | tail -n 1 | cut -f 3)
    cp -a "$dir"/* .
    hdiutil detach "$dir"
}
```

Under `bash`, we run:

```bash-session
$ time unpack lzf.dmg 
"disk2" ejected.

real    0m30.034s
user    0m0.818s
sys     0m12.396s
$ rm -r LibreOffice.app/
$ time unpack LibreOffice_7.4.1_MacOS_x86-64.dmg
"disk2" ejected.

real    3m24.980s
user    0m1.084s
sys     0m14.461s
```

7x better. How's that for an improvement?

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to