FS#45577 - [eclipse-java] Incorrect conflicts?
Attached to Project:
Arch Linux
Opened by Steven Fosdick (Amphitryon) - Tuesday, 07 July 2015, 09:34 GMT
Last edited by Antonio Rojas (arojas) - Friday, 01 May 2020, 18:42 GMT
Opened by Steven Fosdick (Amphitryon) - Tuesday, 07 July 2015, 09:34 GMT
Last edited by Antonio Rojas (arojas) - Friday, 01 May 2020, 18:42 GMT
|
Details
Description:
The packages eclipse-java and eclipse-cpp conflict. I am not sure this is the intention both because of the existence of a separate eclipse-common package and because programmers may well work in more than one language. Might this be because each package says it provides "eclipse" and also conflicts with "eclipse", the latter to presumably say the 4.5 packages conflict with the 4.4 packages? Additional info: * package version(s) * config and/or log files etc. Steps to reproduce: From an installation that has eclipse (4.4) and (eclipse-cdt) installed attempt to upgrade to testing/eclipse-java and testing/eclipse-cpp by running pacman -Syu. |
This task depends upon
Closed by Antonio Rojas (arojas)
Friday, 01 May 2020, 18:42 GMT
Reason for closing: Won't fix
Additional comments about closing: eclipse has been dropped to AUR due to lack of maintainer
Friday, 01 May 2020, 18:42 GMT
Reason for closing: Won't fix
Additional comments about closing: eclipse has been dropped to AUR due to lack of maintainer
The packages eclipse-java, eclipse-cpp, eclipse-php each now stand for a self-contained Eclipse *product*, not just one or more Eclipse *features* to be added to an existing product (like the old eclipse-cdt package). This is why all of these packages provide and conflict with the eclipse (virtual) package.
The eclipse-common package merely contains files common to all of these product packages, to save disk space on the mirrors. It is _not_ a skeleton Eclipse product meant for adding features onto.
If one wanted to apply that philosophy to Java and C++ developments, i.e. define each as a product then the common package approach and conflicts is not consistent with that philosophy. What would need to happen instead is that each product package would need to be self-contained and not use any filesystem paths included in the other package even if that meant duplicating 99% of the files. Despite not being very efficient on storage most people installing would probably prefer that approach to a complete inability to install both at once.
A better approach, in my view, would be retain the "core" or "common" package and go back to having packages for the relevant plugins for various languages and development tasks. The core package could contain some scripting such that as the optional packages are installed/uninstalled files that enumerate what is installed, and would therefore conflict if simply included in the option packages, would be generated automatically from what is actually installed.
Eclipse is not a simple application but an entire ecosystem, with its own package manager, plugin system and dependency hell sploshed into a fishbowl. We may be thankful that the Eclipse developers made it (somewhat)[1] possible at all to install an Eclipse product package in a system area (where normal users don't have write access).
@Amphitryon Modular Eclipse packaging by distributions is _by no means_ a simple task, it involves much more than simply splitting the whole thing up in a set of plugins. There is dependency hell, not all combinations of features work (well) with the same versions of plugins, not all plugins can coexist within the installation, etc., etc.
To get an inkling of the sheer complexity involved in modular Eclipse packaging, have a look at [2].
I can entirely understand that Arch Linux, striving for mostly vanilla, unpatched packages, doesn't want to go that way.
My personal tip: if you want to use Eclipse with more than a few extra features besides those of one of the main development products, by all means download, unzip and run one of the prebuilt product packages somewhere in your home directory, then add features using the "Install new software" menu choice. Don't try and pimp a "shared" installation with lots of extra plugins and features, things will break, often in very frustrating ways.
[1]: https://bugs.eclipse.org/bugs/show_bug.cgi?id=281510
[2]: https://github.com/eclipse/linuxtools.eclipse-build
# pacman -Su
:: Starting full system upgrade...
:: Replace eclipse with extra/eclipse-java? [Y/n]
:: Replace eclipse-cdt with extra/eclipse-cpp? [Y/n]
resolving dependencies...
looking for conflicting packages...
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
:: eclipse-java and eclipse-cpp are in conflict
This is because the packages eclipse "product" packages have overlapping files.
One suggested resolution is to only install one of the products, i.e. java or cpp and then add support for the other product via the eclipse installation mechanisms.
The way that I think it could be resolved is to have the 3 current product packages installed in their own directory and linked with standard eclipse mechanism for product extensions.
This mechanism is described here: http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fproduct_extension.htm
I think they should be installed as follows:
-------------
eclipse-common remains unchanged but for the addition of the "links" directory
add directory: /usr/lib/eclipse/links
-------------
eclipse-java is installed in to /usr/lib/eclipse-java/eclipse
add empty file: /usr/lib/eclipse-java/eclipse/.eclipseextension
add link file: /usr/lib/eclipse/links/eclipse-java.link whose contents would then be:
path=/usr/lib/eclipse-java/eclipse
name=Eclipse Java Developer Toolkit
id=org.eclipse.jdt
version=4.5.2
-------------
eclipse-cpp is installed in to /usr/lib/eclipse-cpp/eclipse
add empty file: /usr/lib/eclipse-cpp/eclipse/.eclipseextension
add link file: /usr/lib/eclipse/links/eclipse-cpp.link whose contents would then be:
path=/usr/lib/eclipse-cpp/eclipse
name=Eclipse C Developers Toolkit
id=org.eclipse.cdt
version=4.5.2
-------------
eclipse-php is installed in to /usr/lib/eclipse-php/eclipse
add empty file: /usr/lib/eclipse-php/eclipse/.eclipseextension
add link file: /usr/lib/eclipse/links/eclipse-php.link whose contents would then be:
path=/usr/lib/eclipse-php/eclipse
name=Eclipse PHP Developers Toolkit
id=org.eclipse.php
version=4.5.2
-------------
This would be a bare minimum Eclipse installation.
Users could then install plugins they want within Eclipse itself.
Edit: Sry, I missed that there is already an eclipse-platform package in the aur, which could be used just for this purpose.
!SESSION 2020-04-08 10:51:39.270 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_242
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=es_ES
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.osgi 4 0 2020-04-08 10:51:39.617
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:81)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
at org.eclipse.equinox.launcher.Main.main(Main.java:1420)
The attached patch should work as expected.
The patch will require manual intervention when updating from users, as Eclipse will read from a variant-specific directory for config and data instead of from the generic directories it would have been reading beforehand, btw.