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

1password: Update to provide completions on install #27438

Merged

Conversation

halostatue
Copy link
Contributor

@halostatue halostatue commented Jan 21, 2025

Description

1password: Update to provide completions on install

Type(s)
  • enhancement
Tested on

macOS 14.7.2 23H311
arm64 Xcode 16.2 16C5032a

Verification

Have you

@macportsbot
Copy link

Notifying maintainers:
@herbygillot for port 1password-cli.
@newtonne for port 1password-cli.

@halostatue

This comment was marked as outdated.

@herbygillot
Copy link
Member

@herbygillot I am unable to complete the testing on this one because for some reason the expand phase is hanging on me (I have to background and kill -9 to stop it). I may just need to reboot, but this shouldn't be hanging, because it isn't even hitting the new code yet:

:notice:extract --->  Extracting 1password-cli
:debug:extract Extracting to subdirectory worksrcdir
:debug:extract Executing org.macports.extract (1password-cli)
:info:extract --->  Extracting op_apple_universal_v2.30.3.pkg
:debug:extract setting option extract.args to '/opt/local/var/macports/distfiles/1password-cli/op_apple_universal_v2.30.3.pkg'
:debug:extract get_source_date_epoch: uncommitted changes to /…/macports-ports/security/1password-cli
:debug:extract Environment:
:debug:extract CC_PRINT_OPTIONS='YES'
:debug:extract CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_…_macports-ports_security_1password-cli/1password-cli/wor⏎

When I run the steps manually in my own directory, everything works just fine, but that doesn't help with macports.

Hey @halostatue, so I took a look and I'm seeing similar.

I think it's the completion generation that's hanging. We should move it out of post-extract, by the way. Perhaps have that happen in post-build?

post-build {
    foreach shell {bash fish zsh} {
        system -W ${pkg_workpath} \
          "./${bin_name} completion ${shell} > ${name}.${shell}"
    }
}

@halostatue halostatue force-pushed the 1password-completions-on-install branch from 9660ea0 to c63ed3f Compare February 4, 2025 03:41
@halostatue
Copy link
Contributor Author

I made a few more changes that I think make sense (to generate the completion scripts into a subdirectory of $worksrcpath instead of $pkg_workpath), but the solution appears to have been adding -nodup to the system command.

@halostatue halostatue marked this pull request as ready for review February 4, 2025 03:43
@herbygillot herbygillot merged commit 77ca679 into macports:master Feb 4, 2025
3 checks passed
@herbygillot
Copy link
Member

Good catch. Thank you @halostatue.

@halostatue halostatue deleted the 1password-completions-on-install branch February 4, 2025 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants