netclient icon indicating copy to clipboard operation
netclient copied to clipboard

brew can't uninstall 0.17.1 missing blank.sh

Open zyxep opened this issue 3 years ago • 11 comments

hey,

when i try to upgrade my packages with homebrew it can't uninstall version 0.17.1.

$ brew uninstall netclient
==> Uninstalling Cask netclient
==> Running uninstall script /opt/homebrew/Caskroom/netclient/0.17.1/blank.sh
Error: uninstall script /opt/homebrew/Caskroom/netclient/0.17.1/blank.sh does not exist.

zyxep avatar Apr 02 '23 11:04 zyxep

I was able to upgrade to 18.5 by running ...

brew update
brew cleanup
sudo rm -rf /opt/homebrew-cask/Caskroom/netclient
sudo rm /Applications/netclient

UPDATE:

Error this exists in 18.5

brew remove netclient
==> Uninstalling Cask netclient
==> Running uninstall script /opt/homebrew/Caskroom/netclient/0.18.5/blank.sh
Error: uninstall script /opt/homebrew/Caskroom/netclient/0.18.5/blank.sh does not exist.

jakoberpf avatar Apr 02 '23 11:04 jakoberpf

hmm your steps didn't work for me:

$ brew update; brew upgrade $(brew outdated); brew upgrade --cask $(brew outdated --cask)
Already up-to-date.
==> Upgrading 1 outdated package:
gravitl/netclient/netclient 0.17.1 -> 0.18.5
==> Upgrading netclient
==> Downloading https://fileserver.netmaker.org/v0.18.5/darwin/netclient-arm64.tgz
Already downloaded: /Users/simon/Library/Caches/Homebrew/downloads/585370da98be39b68e147c56e26daaa223311455f9e891924c76e0f80f326be4--netclient-arm64.tgz
All formula dependencies satisfied.
==> Running uninstall script /opt/homebrew/Caskroom/netclient/0.17.1/blank.sh
==> Purging files for version 0.18.5 of Cask netclient
Error: gravitl/netclient/netclient: uninstall script /opt/homebrew/Caskroom/netclient/0.17.1/blank.sh does not exist.
==> Upgrading 1 outdated package:
gravitl/netclient/netclient 0.17.1 -> 0.18.5
==> Upgrading netclient
==> Downloading https://fileserver.netmaker.org/v0.18.5/darwin/netclient-arm64.tgz
Already downloaded: /Users/simon/Library/Caches/Homebrew/downloads/585370da98be39b68e147c56e26daaa223311455f9e891924c76e0f80f326be4--netclient-arm64.tgz
All formula dependencies satisfied.
==> Running uninstall script /opt/homebrew/Caskroom/netclient/0.17.1/blank.sh
==> Purging files for version 0.18.5 of Cask netclient
Error: gravitl/netclient/netclient: uninstall script /opt/homebrew/Caskroom/netclient/0.17.1/blank.sh does not exist.

zyxep avatar Apr 02 '23 13:04 zyxep

Hello. working on a fix for that. For now just run "touch /opt/homebrew/Caskroom/netclient/0.17.1/blank.sh" and try again.

theguy951357 avatar Apr 02 '23 13:04 theguy951357

After i touched that file, i get this now.

$ brew update; brew upgrade $(brew outdated); brew upgrade --cask $(brew outdated --cask) 
Already up-to-date.
==> Upgrading 1 outdated package:
gravitl/netclient/netclient 0.17.1 -> 0.18.5
==> Upgrading netclient
==> Downloading https://fileserver.netmaker.org/v0.18.5/darwin/netclient-arm64.tgz
Already downloaded: /Users/simon/Library/Caches/Homebrew/downloads/585370da98be39b68e147c56e26daaa223311455f9e891924c76e0f80f326be4--netclient-arm64.tgz
All formula dependencies satisfied.
==> Running uninstall script /opt/homebrew/Caskroom/netclient/0.17.1/blank.sh
==> Running uninstall script
==> Purging files for version 0.18.5 of Cask netclient
Error: Cask 'netclient' definition is invalid: uninstall :script without :executable.
==> Upgrading 1 outdated package:
gravitl/netclient/netclient 0.17.1 -> 0.18.5
==> Upgrading netclient
==> Downloading https://fileserver.netmaker.org/v0.18.5/darwin/netclient-arm64.tgz
Already downloaded: /Users/simon/Library/Caches/Homebrew/downloads/585370da98be39b68e147c56e26daaa223311455f9e891924c76e0f80f326be4--netclient-arm64.tgz
All formula dependencies satisfied.
==> Running uninstall script /opt/homebrew/Caskroom/netclient/0.17.1/blank.sh
==> Running uninstall script
==> Purging files for version 0.18.5 of Cask netclient
Error: Cask 'netclient' definition is invalid: uninstall :script without :executable.

zyxep avatar Apr 02 '23 14:04 zyxep

cd home if you aren't there already. run "brew edit netclient" in the uninstall block near the bottom of the file put the following: executable: "#{staged_path}/blank.sh",

theguy951357 avatar Apr 02 '23 14:04 theguy951357

actually, in brew edit netclient, are there two uninstall blocks?

theguy951357 avatar Apr 02 '23 14:04 theguy951357

there are yes, i did see that.

zyxep avatar Apr 02 '23 14:04 zyxep

delete the empty one. that shouldn't be there.

theguy951357 avatar Apr 02 '23 14:04 theguy951357

okay, just did that.. it's still not quite happy.

zyxep avatar Apr 02 '23 14:04 zyxep

I think is the origin of the problem, that the brew configuration is invalid.

https://github.com/gravitl/homebrew-netclient/issues/23#issuecomment-1353408364

jakoberpf avatar Apr 03 '23 17:04 jakoberpf

@zyxep after you upgraded to 18.1, do you also see this issues?

https://github.com/gravitl/netclient/issues/325 https://github.com/gravitl/netclient/issues/326

jakoberpf avatar Apr 03 '23 17:04 jakoberpf

use the netclient uninstall command to remove netclient from your system

abhishek9686 avatar Jun 04 '24 12:06 abhishek9686