Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manpages: portfile: document keyword use_dmg #295

Merged
merged 1 commit into from
Mar 3, 2024

Conversation

mascguy
Copy link
Member

@mascguy mascguy commented Aug 20, 2023

Add info for keyword use_dmg, which is presently undocumented:

     use_dmg
         Use a disk image (dmg).
         Sets extract.suffix to ``.dmg''.
         Sets extract.cmd to ``hdiutil''.
         Sets extract.pre_args to ``attach''.
         Sets extract.post_args to ``-private -readonly -nobrowse -mountpoint ...etc...''.
         Type: optional
         Example:
               use_dmg yes

There's just one caveat, for extract.post_args: The number of arguments is significant, and things vary slightly due to necessary logic behind it:

set dmg_tmp_dir [exec mktemp -d -q "/tmp/mports.XXXXXXXX"]
set dmg_mount ${dmg_tmp_dir}/${worksrcdir}
file mkdir ${dmg_mount}
option extract.cmd [binaryInPath "hdiutil"]
option extract.pre_args attach
option extract.post_args "-private -readonly -nobrowse -mountpoint  ${dmg_mount} && [binaryInPath "cp"] -Rp ${dmg_mount}  ${extract.dir} && ${extract.cmd} detach ${dmg_mount} &&  [binaryInPath "rmdir"] ${dmg_mount} ${dmg_tmp_dir}"

As a result, I truncated the details for extract.post_args. But thoughts welcome as to what we should include for that.

Corresponding PR, for MacPorts Guide:

PR 61 - guide: phase: document use_dmg

doc/portfile.7 Show resolved Hide resolved
@mascguy
Copy link
Member Author

mascguy commented Aug 25, 2023

Added @jmroot, @ryandesign, and @neverpanic for thoughts/feedback. (Particularly related to what details we include - or don't include - for extract.post_args.)

@mascguy mascguy requested a review from raimue September 12, 2023 16:36
@neverpanic
Copy link
Member

I think we should include a paragraph describing what the extract.post_args line does, rather than the full invocation, which is indeed quite complicated.

@mascguy
Copy link
Member Author

mascguy commented Oct 1, 2023

I think we should include a paragraph describing what the extract.post_args line does, rather than the full invocation, which is indeed quite complicated.

Sounds good, I'll try to get this updated shortly. Thanks for the feedback Clemens!

@mascguy
Copy link
Member Author

mascguy commented Mar 3, 2024

I think we should include a paragraph describing what the extract.post_args line does, rather than the full invocation, which is indeed quite complicated.

Sounds good, I'll try to get this updated shortly. Thanks for the feedback Clemens!

Done

@mascguy
Copy link
Member Author

mascguy commented Mar 3, 2024

Merging these changes in their current state. We'll have time to refine before the next release, if anyone would like to see further changes/additions.

Feedback welcome and appreciated, as always.

@mascguy mascguy merged commit 91fb998 into macports:master Mar 3, 2024
3 of 6 checks passed
@mascguy mascguy deleted the mascguy-doc-updates2 branch March 3, 2024 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants