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

editors/vscode: autoremove does not work #2368

Closed
bileslav opened this issue Nov 30, 2024 · 7 comments
Closed

editors/vscode: autoremove does not work #2368

bileslav opened this issue Nov 30, 2024 · 7 comments

Comments

@bileslav
Copy link

root@theos ~# pkg check --dependencies --all
Checking all packages: 100%
root@theos ~# pkg set --automatic=1 vscode
Mark vscode-1.95.3 as automatically installed? [y/N]: y
root@theos ~# pkg query '%a %V %k' vscode # automatic vital locked
1 0 0
root@theos ~# pkg info --required-by vscode
vscode-1.95.3:
root@theos ~# pkg autoremove
Checking integrity... done (0 conflicting)
Nothing to do.

It can be removed manually just fine:

root@theos ~# pkg remove vscode
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
	vscode: 1.95.3

Number of packages to be removed: 1

The operation will free 333 MiB.

Proceed with deinstalling packages? [y/N]:
@arrowd
Copy link
Contributor

arrowd commented Nov 30, 2024

pkg -ddd autoremove

@bileslav
Copy link
Author

bileslav commented Nov 30, 2024

@arrowd, the output.

@arrowd
Copy link
Contributor

arrowd commented Nov 30, 2024

This is why:

DBG(3)[54322]> (package) added shlib provide libvulkan.so.1 for vscode
DBG(3)[54322]> (package) added shlib provide libvk_swiftshader.so for vscode
DBG(3)[54322]> (package) added shlib provide libffmpeg.so for vscode
DBG(3)[54322]> (package) added shlib provide libGLESv2.so for vscode
DBG(3)[54322]> (package) added shlib provide libEGL.so for vscode

and then

DBG(3)[54322]> (package) added shlib deps for libplacebo on libvulkan.so.1
DBG(2)[54322]> (solver) rule: require rule: package libplacebo(l) depends on a requirement provided by: vulkan-loader(l)vscode(l)

So, libvulkan.so.1 is normally provided by the vulkan-loader package but is also provided by vscode. It makes pkg believe the package is required and to be not autoremovable.

I think there are several separate problems:

  • vscode installs the file into share/code-oss/libvulkan.so. Why does pkg pick it up as "provides"? The logseq package is quite similar and installs share/logseq/libvulkan.so but it isn't shown in the "provides" section.
  • The library installed by vscode does not end with .1, but pkg somehow appends it, which results in a confusion later.
  • Even if pkg thinks that both packages provide a library, why not allow removing one of them?

@bapt
Copy link
Member

bapt commented Nov 30, 2024

this is a bug in the ports tree vscode should add a BUNDLE_LIBS thingy

@bileslav
Copy link
Author

I will notify the maintainer about this problem. The issue can be closed now, I suppose. Thank you.

@bapt bapt closed this as completed Dec 4, 2024
@arrowd
Copy link
Contributor

arrowd commented Dec 4, 2024

I wonder if pkg should only add a library into provides if it is located in ldconfigs paths? If a package installs a .so file into some arbitrary directory, then other packages wouldn't be able to pick it up.

Or is this done to handle dynamically loaded stuff like plugins?

@ifreund
Copy link
Contributor

ifreund commented Dec 4, 2024

I wonder if pkg should only add a library into provides if it is located in ldconfigs paths? If a package installs a .so file into some arbitrary directory, then other packages wouldn't be able to pick it up.

This is likely to change soon, see #2331

tagattie added a commit to tagattie/FreeBSD-Electron that referenced this issue Dec 4, 2024
Shared libraries installed along with electron binary are for internal
use and not intended for public consumption.

Remove USE_LDCONFIG so as not to add the shared library directory to
search paths. Add BUNDLE_LIBS so that pkg(8) does not pick the
libraries up for packaging.

Related GitHub Issue: freebsd/pkg#2368
tagattie added a commit to tagattie/FreeBSD-VSCode that referenced this issue Dec 4, 2024
Shared libraries installed along with vscode are for internal use and
not intended for public consumption.

Remove USE_LDCONFIG so as not to add the shared library directory to
search paths. Add BUNDLE_LIBS so that pkg(8) does not pick the
libraries up for packaging.

Related GitHub Issue: freebsd/pkg#2368
freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this issue Dec 4, 2024
Shared libraries installed along with electron binary are for internal
use and not intended for public consumption.

Remove USE_LDCONFIG so as not to add the shared library directory to
search paths. Add BUNDLE_LIBS so that pkg(8) does not pick the shared
libraries up for packaging.

Bump port revisions for package change.

Related GitHub Issue: freebsd/pkg#2368

Reported by:	Vlad Biley <[email protected]>
freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this issue Dec 4, 2024
Shared libraries installed along with vscode are for internal use and
not intended for public consumption.

Remove USE_LDCONFIG so as not to add the shared library directory to
search paths. Add BUNDLE_LIBS so that pkg(8) does not pick the shared
libraries up for packaging.

Bump port revision for package change.

Related GitHub Issue: freebsd/pkg#2368

Reported by	Vlad Biley <[email protected]>
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

No branches or pull requests

4 participants