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

Use expand-full switch with pkgutil #904

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

marczak
Copy link

@marczak marczak commented Oct 5, 2023

The (undocumented) expand-full switch will expand all components and better drill down into distribution-style packages.

@marczak
Copy link
Author

marczak commented Oct 5, 2023

Addendum: I don't recall where this switch appeared, so, this could break the processor on much older OS Versions (10.11-era and earlier).

@nmcspadden
Copy link
Contributor

  1. Please swap this to the dev branch.
  2. What is this actually doing? What's different about the expanded output compared to before? Showing the results of an actual recipe run could help. I don't really have any context on what this is actually solving or accomplishing.

@marczak
Copy link
Author

marczak commented Oct 6, 2023

Ah, sure. --expand-full will also expand a package's payload. Here's an example from distribution-style package:

with --expand:

% ls -la                                                                                   
total 43096
drwx------  6 marg  staff       192 Oct  6 17:25 .
drwxr-xr-x  5 marg  staff       160 Oct  6 17:25 ..
-rw-r--r--  1 marg  staff     38866 Sep 28 19:08 Bom
-rw-r--r--  1 marg  staff       933 Oct  6 17:25 PackageInfo
-rw-r--r--  1 marg  staff  21641179 Sep 28 19:08 Payload
drwxr-xr-x  7 marg  staff       224 Oct  6 17:25 Scripts

same package with --expand-full:

% ls -la                                                                                   
total 88
drwxr-xr-x  6 marg  staff    192 Oct  6 17:26 .
drwxr-xr-x  5 marg  staff    160 Oct  6 17:26 ..
-rw-r--r--  1 marg  staff  38866 Sep 28 19:08 Bom
-rw-r--r--  1 marg  staff    933 Oct  6 17:26 PackageInfo
drwxr-xr-x  4 marg  staff    128 Oct  6 17:26 Payload
drwxr-xr-x  7 marg  staff    224 Oct  6 17:26 Scripts

Notice that in the second example, Payload is now a directory, requiring no further expansion. In the case of this package:

% ls -la Payload/                                                                          
total 0
drwxr-xr-x  4 marg  staff  128 Oct  6 17:26 .
drwxr-xr-x  6 marg  staff  192 Oct  6 17:26 ..
drwxr-xr-x  3 marg  staff   96 Sep 28 19:08 Applications
drwxr-xr-x  5 marg  staff  160 Sep 28 19:08 Library

In an AutoPkg recipe, one can now immediately use the results for repackaging.

@marczak marczak changed the base branch from master to dev October 6, 2023 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants