DISTRHO-Ports icon indicating copy to clipboard operation
DISTRHO-Ports copied to clipboard

Uninstall does not remove LV2 folders

Open tank-trax opened this issue 3 years ago • 27 comments

running sudo ninja -C build uninstall

does not delete the following folders:

image

also, I was wondering could there be a switch or is there one to install/uninstall locally into ~./lv2

tank-trax avatar Mar 16 '21 19:03 tank-trax

I am not used to uninstall steps in meson. Contributions welcome.

falkTX avatar Mar 16 '21 19:03 falkTX

I could certainly try to find a solution.

Could you give me a hint where in the code would I look? I am completely unfamiliar with meson.

tank-trax avatar Mar 16 '21 20:03 tank-trax

@alex-tee any hints? I guess you are the most familiar with meson.

falkTX avatar Mar 16 '21 20:03 falkTX

perhaps this?

tank-trax avatar Mar 16 '21 22:03 tank-trax

meson only deletes files it knows about (like custom_target(), executable() etc.) so my guess is that it doesnt know that it created those directories, but I need to look at the build configs again to check what this does

alex-tee avatar Mar 16 '21 22:03 alex-tee

Can you post the contents of meson-logs/install-log.txt, and the output of running sudo ninja -C build/ uninstall

eli-schwartz avatar Mar 16 '21 23:03 eli-schwartz

oddly enough it does remove the folders from /usr/local/lib/vst3/

tank-trax avatar Mar 16 '21 23:03 tank-trax

install-log.txt

tank-trax avatar Mar 16 '21 23:03 tank-trax

According to the install log, meson never created any directories. Are you absolutely positive that they did not exist when you ran meson install?

eli-schwartz avatar Mar 16 '21 23:03 eli-schwartz

100% certain, and I tested to make sure I used chown to give my user write permissions on the folder and removed them all tried again same thing happened after uninstall the contents are removed but not the folders with the .lv2 in the name as stated earlier, it does remove the contents and folders from /usr/local/lib/vst3/

tank-trax avatar Mar 16 '21 23:03 tank-trax

@eli-schwartz my apologies....

this is the correct output of sudo ninja -C build/ uninstall

ninja-uninstall.txt

perhaps this will help

output from sudo ninja -C build/ install

ninja-install.txt

tank-trax avatar Mar 17 '21 00:03 tank-trax

in the example for the installation/removal of vitalium.vst3

Installing /home/studio/dev/git/DISTRHO-Ports/build/ports/vitalium.vst3/Contents/x86_64-linux/vitalium.so to /usr/local/lib/vst3/vitalium.vst3/Contents/x86_64-linux

Deleted: /usr/local/lib/vst3/vitalium.vst3/Contents/x86_64-linux/vitalium.so

Deleted: /usr/local/lib/vst3/vitalium.vst3/Contents/x86_64-linux
Deleted: /usr/local/lib/vst3/vitalium.vst3/Contents
Deleted: /usr/local/lib/vst3/vitalium.vst3

and vitalium.lv2

Installing /home/studio/dev/git/DISTRHO-Ports/build/ports/vitalium.lv2/vitalium.ttl to /usr/local/lib/lv2/vitalium.lv2
Installing /home/studio/dev/git/DISTRHO-Ports/build/ports/vitalium.lv2/manifest.ttl to /usr/local/lib/lv2/vitalium.lv2
Installing /home/studio/dev/git/DISTRHO-Ports/build/ports/vitalium.lv2/vitalium.so to /usr/local/lib/lv2/vitalium.lv2

Deleted: /usr/local/lib/lv2/vitalium.lv2/vitalium.ttl
Deleted: /usr/local/lib/lv2/vitalium.lv2/manifest.ttl
Deleted: /usr/local/lib/lv2/vitalium.lv2/vitalium.so

uninstall for the VST3 removes the one file and at the end after all the LV2 files have been removed proceeds to one by one remove the folders for VST3, for LV2 removes the files but after all is said and done does not consider the LV2 folder for removal

perhaps it is because there are more than one file being written to the LV2 folders that the uninstall is missing them?

tank-trax avatar Mar 17 '21 00:03 tank-trax

It's not clear to me... Is the original install-log.txt the same one that corresponds to the latest ninja-install.txt and ninja-uninstall.txt ?

eli-schwartz avatar Mar 17 '21 01:03 eli-schwartz

initially I uploaded the wrong file for uninstall, I replaced it with a good one, the install file was OK

tank-trax avatar Mar 17 '21 02:03 tank-trax

install-log.txt

Again, this does not list /usr/local/lib/vst3 or /usr/local/lib/lv2

So, those directories do not get deleted.

However, it does list

/usr/local/lib/vst3/vitalium.vst3/Contents/x86_64-linux/vitalium.so
[...]
/usr/local/lib/vst3/vitalium.vst3/Contents/x86_64-linux
/usr/local/lib/vst3/vitalium.vst3/Contents
/usr/local/lib/vst3/vitalium.vst3

As you can see, the uninstall log lists:

Deleted: /usr/local/lib/vst3/vitalium.vst3/Contents/x86_64-linux/vitalium.so
[...]
Deleted: /usr/local/lib/vst3/vitalium.vst3/Contents/x86_64-linux
Deleted: /usr/local/lib/vst3/vitalium.vst3/Contents
Deleted: /usr/local/lib/vst3/vitalium.vst3

So, meson is uninstalling the folders it creates. However, there are one or two folders that meson believes it did not create (either because you ran ninja install twice in a row, and the second run which did not create any directories overwrote the first log, or, because you have other pre-existing software there), therefore it is not trying to uninstall them.

eli-schwartz avatar Mar 17 '21 02:03 eli-schwartz

I tried a fresh clone and same result

here are the steps

git clone https://github.com/DISTRHO/DISTRHO-Ports.git
meson build --buildtype release
ninja -C build

usr/local/lib/lv2/ has no folders in it with anything from DISTRHO-Ports

image

ninja -C build install

image

now the DISTRHO-Ports are installed

after running ninja -C build uninstall

image

folders remain

tank-trax avatar Mar 17 '21 05:03 tank-trax

for reference, the *.lv2 dirs are generated and installed using this custom_target():

https://github.com/DISTRHO/DISTRHO-Ports/blob/52efe75c693ee567142212c505dd19568f01c458/ports/meson.build#L220

On 17.03.2021 06:03, tank-trax wrote:

I tried a fresh clone and same result

here are the steps

git clone https://github.com/DISTRHO/DISTRHO-Ports.git meson build --buildtype release ninja -C build

usr/local/lib/lv2/ has no folders in it with anything from DISTRHO-Ports

[1]

ninja -C build install

[2]

now the DISTRHO-Ports are installed

after running ninja -C build uninstall

[3]

folders remain

-- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [4], or unsubscribe [5].

Links:

[1] https://user-images.githubusercontent.com/41337033/111416886-2902fc80-86bb-11eb-8a7b-a98f478f3c31.png [2] https://user-images.githubusercontent.com/41337033/111417389-25bc4080-86bc-11eb-92a0-70623ebe1d47.png [3] https://user-images.githubusercontent.com/41337033/111417301-f574a200-86bb-11eb-9117-c87540f7f19b.png [4] https://github.com/DISTRHO/DISTRHO-Ports/issues/83#issuecomment-800796327 [5] https://github.com/notifications/unsubscribe-auth/AAZ76JYLHOIFOL3CHTDOQ5TTEAZ3TANCNFSM4ZJHCLUQ

alex-tee avatar Mar 17 '21 05:03 alex-tee

meson setup builddir/ --prefix=$PWD/builddir/pkg -Dbuild-lv2=false -Dbuild-vst2=false -Dbuild-vst3=true
ninja -C builddir
ninja -C builddir install

My install log:

# List of files installed by Meson
# Does not contain files installed by custom scripts.
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/vitalium.vst3/Contents/x86_64-linux/vitalium.so
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/SwankyAmp.vst3/Contents/x86_64-linux/SwankyAmp.so
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/TAL-NoiseMaker-Noise4U.lv2/manifest.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/TAL-NoiseMaker-Noise4U.lv2/presets.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/manifest.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Analog_Brass.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Combat.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Dark_Ambient.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Dark_Bouncy_Groove.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Hardcore_Kick.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Kickbass.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Koto.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Nasty_Growl.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Pianium.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Power_Lead.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Retro_Ambient_Pluck.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Sci_Fi_Computer.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Sci_Fi_Piano.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Sparkly_Dreamy_Pad.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Supersaw.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Trance_Pluck.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Vitalium_Groove.ttl
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/TAL-NoiseMaker-Noise4U.lv2
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/SwankyAmp.vst3/Contents/x86_64-linux
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/SwankyAmp.vst3/Contents
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/SwankyAmp.vst3
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/vitalium.vst3/Contents/x86_64-linux
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/vitalium.vst3/Contents
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/vitalium.vst3
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3
/home/eschwartz/DISTRHO-Ports/builddir/pkg/lib
/home/eschwartz/DISTRHO-Ports/builddir/pkg

Uninstall:

$ ninja uninstall
[0/1] /usr/bin/meson --internal uninstall
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/vitalium.vst3/Contents/x86_64-linux/vitalium.so
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/SwankyAmp.vst3/Contents/x86_64-linux/SwankyAmp.so
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/TAL-NoiseMaker-Noise4U.lv2/manifest.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/TAL-NoiseMaker-Noise4U.lv2/presets.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/manifest.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Analog_Brass.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Combat.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Dark_Ambient.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Dark_Bouncy_Groove.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Hardcore_Kick.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Kickbass.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Koto.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Nasty_Growl.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Pianium.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Power_Lead.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Retro_Ambient_Pluck.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Sci_Fi_Computer.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Sci_Fi_Piano.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Sparkly_Dreamy_Pad.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Supersaw.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Trance_Pluck.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2/Vitalium_Groove.ttl
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/Vitalium-unfa.lv2
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2/TAL-NoiseMaker-Noise4U.lv2
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/lv2
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/SwankyAmp.vst3/Contents/x86_64-linux
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/SwankyAmp.vst3/Contents
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/SwankyAmp.vst3
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/vitalium.vst3/Contents/x86_64-linux
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/vitalium.vst3/Contents
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3/vitalium.vst3
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib/vst3
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg/lib
Deleted: /home/eschwartz/DISTRHO-Ports/builddir/pkg

Uninstall finished.

Deleted: 34
Failed: 0

Remember that files created by custom scripts have not been removed.

eli-schwartz avatar Mar 18 '21 11:03 eli-schwartz

FWIW, while I still cannot reproduce your issue you did lead me to discover another one -- I have a case where install: true on a custom target installs a directory without subdirectories, and this did not get tracked.

eli-schwartz avatar Mar 19 '21 00:03 eli-schwartz

try -Dbuild-lv2=true

meson setup builddir/ --prefix=$PWD/builddir/pkg -Dbuild-lv2=true -Dbuild-vst2=true -Dbuild-vst3=true

for an LV2 there are 3 or 4 files written per folder

my guess is that whenever meson is writing to the target folder and creates the plugin.lv2 folders, when each folder is created on the 1st file write, it is then then written to a 2nd, 3rd or 4th time... and meson assumes that each of those plugin.lv2 folders already existed and does not remove them when uninstall is invoked

tank-trax avatar Mar 19 '21 02:03 tank-trax

My goal in only enabling part of the build was to create a reasonably reproducible test case demonstrating a subset of this repo, which doesn't go even further past 600MB as that was quite bloated on its own.

I don't have endless time and compute to spend on this. And I'm fairly sure none of this should matter. I found and fixed one case where meson neglected to do its usual tracking of installed directories, but in general the principle is sound and should work. (And no, creating the same directory multiple times won't mess up install tracking... mainly because mesonbuild.minstall.DirMaker only makes directories that don't exist yet.)

Side note: you're welcome to try meson from https://github.com/eli-schwartz/meson/commit/f7b0238ed67fc0c9e3cef38090983e33b40fa205 (now merged to meson git master) and see if that somehow fixes the problem for you. I don't think it is your exact issue, but you never know.

eli-schwartz avatar Mar 19 '21 03:03 eli-schwartz

You can build only specific plugins, so that it takes less time. For one of the smallest builds out of this repo, try:

meson build --buildtype release -Dbuild-lv2=true -Dbuild-vst2=false -Dbuild-vst3=false -Dbuild-legacy-only=true -Dplugins=vex

falkTX avatar Mar 19 '21 08:03 falkTX

My goal in only enabling part of the build was to create a reasonably reproducible test case demonstrating a subset of this repo, which doesn't go even further past 600MB as that was quite bloated on its own.

By not building the LV2 you are not reproducing the issue

tank-trax avatar Mar 19 '21 17:03 tank-trax

I'm not playing this game. If you'd like me to go out of my way to try to reproduce your bug, give me a minimal test case that you have verified causes a problem on your end. I'm not building this multiple GB kitchen sink repo with all the everything enabled because you're not sure whether it matters.

I tried to make a point. The point has not been accepted. If you want a better point out of me (or to convince me that meson has another edge case) you'll need to work with me here.

eli-schwartz avatar Mar 19 '21 17:03 eli-schwartz

I've will repeat again...

when installing without any switches following the instructions.... when the uninstall is invoked folders will remain in /usr/local/lib/lv2 and this is when those folders were not there initially

I am having a hard time understanding why you cannot grasp this

on a personal level it doesn't affect me because I have a workaround solution plus the '--prefix=' provides a good place to deposit the builds ...

but not everybody is able to figure out workarounds

this no longer affects me... as you don't want to test it properly I will close this ticket

tank-trax avatar Mar 19 '21 17:03 tank-trax

issue is still present, so please leave the ticket open.

is this issue reproducible with a smaller build? we can check for that first. again, we can use this to build only 1 plugin:

meson build --buildtype release -Dbuild-lv2=true -Dbuild-vst2=false -Dbuild-vst3=false -Dbuild-legacy-only=true -Dplugins=vex

falkTX avatar Mar 19 '21 17:03 falkTX

when installing without any switches following the instructions.

This is too big of a test case for me and I'm personally not interested in helping to debug meson issues for builds of that size. If the minimal build which @falkTX has mentioned twice now, can reproduce your issue -- or if you can distill a small test case in a similar manner -- then that would help greatly.

It's not fun to try to reproduce a bug when the reproducible test case is gigabytes large and has well over 500 translation units.

I don't even use this software... I'm interested in this from the meson side of things.

eli-schwartz avatar Mar 19 '21 18:03 eli-schwartz