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

Linux uninstall script does not remove Headless/VST3 #1140

Closed
tank-trax opened this issue Sep 9, 2019 · 10 comments · Fixed by #1154
Closed

Linux uninstall script does not remove Headless/VST3 #1140

tank-trax opened this issue Sep 9, 2019 · 10 comments · Fixed by #1154
Milestone

Comments

@tank-trax
Copy link
Collaborator

building from source and installing locally using
./build-linux.sh -l install

places the contents in the following folders

VST2 = ~/.vst/
VST3 = ~/.vst3/Surge.vst3/Contents/x86_64-linux/
LV2 = ~/.lv2/Surge.lv2/
Headless = ~/bin/Surge-Headless/Surge/
Data = ~/.local/share/Surge/

running

./build-linux.sh -l uninstall

removes everything except the Headless returning this error

rm: cannot remove '/home/studio/bin/Surge-Headless': Is a directory

@baconpaul
Copy link
Collaborator

Line 252 of build-linux.sh

I must be missing something. I can't spot the bug. Can you?

@tank-trax
Copy link
Collaborator Author

it's not removing VST3 either

it removes the LV2 folder and contents

the LV2 has this line rmdir $lv2_dest_path/$lv2_bundle_name

@baconpaul
Copy link
Collaborator

Oh it’s doing rm -vf not rm -rvf in the uninstall routine it looks like

@tank-trax
Copy link
Collaborator Author

tank-trax commented Sep 9, 2019

for headless there is the extra Surge folder between the Surge-Headless folder and the executable Surge-Headless

~/bin/Surge-Headless/Surge/Surge-Headless where Surge-Headless is the executable

@jpcima
Copy link
Contributor

jpcima commented Sep 9, 2019

Note: I didn't remove recursively when I wrote LV2.
It's because I fear about variables not being quoted appropriately for whitespace. In this regard, rmdir will be safer.

For example a rm -rf $foo, which is unquoted with "foo=/home/Toto Tata/lv2"; the variable will be interpreted in two parts, and there exists a risk of deleting "/home/Toto" when this exists.
So, it's a safety measure, but for actual fixing, strings should be properly quoted.

@tank-trax
Copy link
Collaborator Author

bear in mind that if the install is not local it requires sudo and in this case I would have to agree with @jpcima

@baconpaul
Copy link
Collaborator

OK! I’m happy for you guys to change it to what you think is safest to be honest! No strong opinions here but agree with the quoting point. (Although I think the script quotes the names but I’m not sure (since I really only use build-OS X with any regularity :) ) )

@tank-trax
Copy link
Collaborator Author

tank-trax commented Sep 10, 2019

this modification for line 242 to remove the VST3

rm -vf $vst3_dest_path/Surge.vst3/Contents/x86_64-linux/$dest_plugin_name && rmdir -v $vst3_dest_path/Surge.vst3/Contents/x86_64-linux $vst3_dest_path/Surge.vst3/Contents $vst3_dest_path/Surge.vst3

and line 252 to remove headless

rm -vf $headless_dest_path/$dest_headless_name/Surge/$dest_headless_name && rmdir -v $headless_dest_path/$dest_headless_name/Surge $headless_dest_path/$dest_headless_name

sudo ./build-linux.sh  uninstall
removed '/usr/lib/vst/Surge.so'
removed '/usr/lib/vst3/Surge.vst3/Contents/x86_64-linux/Surge.so'
rmdir: removing directory, '/usr/lib/vst3/Surge.vst3/Contents/x86_64-linux'
rmdir: removing directory, '/usr/lib/vst3/Surge.vst3/Contents'
rmdir: removing directory, '/usr/lib/vst3/Surge.vst3'
removed '/usr/lib/lv2/Surge.lv2/Surge.so'
removed '/usr/lib/lv2/Surge.lv2/manifest.ttl'
removed '/usr/lib/lv2/Surge.lv2/Surge_dsp.ttl'
removed '/usr/lib/lv2/Surge.lv2/Surge_ui.ttl'
rmdir: removing directory, '/usr/lib/lv2/Surge.lv2'
removed '/usr/bin/Surge-Headless/Surge/Surge-Headless'
rmdir: removing directory, '/usr/bin/Surge-Headless/Surge'
rmdir: removing directory, '/usr/bin/Surge-Headless'

verified it also works for the local installation

@tank-trax tank-trax changed the title Linux local uninstall does not remove Headless Linux local uninstall does not remove Headless/VST3 Sep 10, 2019
@tank-trax tank-trax changed the title Linux local uninstall does not remove Headless/VST3 Linux uninstall script does not remove Headless/VST3 Sep 10, 2019
@baconpaul baconpaul added this to the 1.6.2 milestone Sep 10, 2019
@baconpaul
Copy link
Collaborator

OK we can get this pushed into 1.6.2. One of us will be making another change in the next few days I’m sure and we can just sweep this into our PRs. Thanks!

@baconpaul
Copy link
Collaborator

Applying this quickly now. Will close issue once it's in.

baconpaul added a commit to baconpaul/surge that referenced this issue Sep 10, 2019
Cleanup to the uninstall branch to remove the Headless and VST3 correctly
now they are in subdirs and are bundles and stuff. Thanks to @tank-trax for
the diffs

Closes surge-synthesizer#1140
baconpaul added a commit that referenced this issue Sep 10, 2019
Cleanup to the uninstall branch to remove the Headless and VST3 correctly
now they are in subdirs and are bundles and stuff. Thanks to @tank-trax for
the diffs

Closes #1140
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 a pull request may close this issue.

3 participants