#66987 closed defect (fixed)

kubectl_select @0.0.0 runtime failure

Reported by: tsabirgaliev (Tair Sabirgaliev) Owned by: herbygillot (Herby Gillot)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc: patarra@…, pedrohdz (Pedro)
Port: kubectl_select kubectl-1.26

Description

Selecting kubectl fails with this message:

❯ sudo port select --set kubectl kubectl1.26
Selecting 'kubectl1.26' for 'kubectl' failed: could not create new link "/opt/local/share/bash-completion/completions/kubectl": no such file or directory

This line https://github.com/macports/macports-ports/blob/master/sysutils/kubectl/Portfile#L211 in Portfile doesn't have any effect, probably because destroot is skipped at install.

Invoking destroot explicitly doesn't help, because bash-completion/completions directory is empty and is not added to destroot.keepdirs.

Workarounds:

Install bash-completion prior to select kubectl

Change History (5)

comment:1 Changed 14 months ago by jmroot (Joshua Root)

Cc: patarra@… pedrohdz added
Keywords: kubectl select removed
Owner: set to herbygillot
Port: kubectl-1.26 added
Status: newassigned

The xinstall -d does have an effect, but it creates an empty directory which is then deleted because it's not listed in destroot.keepdirs.

comment:2 Changed 14 months ago by tsabirgaliev (Tair Sabirgaliev)

@jmroot adding it in destroot.keepdirs doesn't help, because destroot phase is skipped.

comment:3 Changed 14 months ago by jmroot (Joshua Root)

If you mean when installing from an archive, then yes, but that just means that the revision has to be increased when this is fixed so a new archive is built.

Last edited 14 months ago by jmroot (Joshua Root) (previous) (diff)

comment:4 Changed 14 months ago by tsabirgaliev (Tair Sabirgaliev)

ok, increased revision and now it works, thank you

comment:5 Changed 14 months ago by tsabirgaliev (Tair Sabirgaliev)

Resolution: fixed
Status: assignedclosed

In 833fff47f1156ca6baf9229a06cce3d85beec6ea/macports-ports (master):

kubectl_select: keep completions directory

Closes: #66987

Note: See TracTickets for help on using tickets.