[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#227587: [PROPOSAL] Java library dependencies



Ben Burton wrote:

Yes it does.  It tells us that the lib/app won't work with java1 alone.

Right. But it might work with Kaffe, GIJ and SavleVM. None of them provides java2-runtime since they don't implement the full JDK 1.2+ API. Non of them even implements the full JDK 1.1 API so they also shouldn't provide java1-runtime unless you change the definition of the java1-runtime virtual package.

And there *are* packages in debian that do work with java1 alone, so the
use of java2-runtime does convey meaningful information.

Which ones are these?

Then why bother providing debian packages at all?

Because then you can easily install packaged applications like Ant, Tomcat and Eclipse. The same argument can be used for or against
packaged C libraries.

I did not say that you can't use Debian packaged JARs. In most cases they are 100% compatible with upstream. But in some cases they are not and we have no way to fix this because some APIs are not available in main. You have the choice between a 100% compatible JUnit package in contrib or a JUnit package in main without Swing GUI. Which one do you want in Debian? Which one do you want to use in a custom project?

For some people, the
political ideals are part of what draws them to debian.  To add a library
package to debian and then say "it's broken but we don't care because
nobody should use it anyway" is absurd.

I never said something like this! I just said that I don't recommend using Debian JARs in custom projects. I suggest to use the original upstream JARs instead, especially when you intend to run your Java project on operating systems other that Debian. But that's just my personal opinion.

i.e., a library's dependencies belong with the *library* package, not with
the set of all apps that use the library.

Exactly. That's what my proposal said: "Java library packages must depend on other library packages if they can't be used without them." This is currently not mandated by the Java policy.

I think you've missed my point.  Sure, an application packager needs to
know that their app requires libraries X, Y and Z.  But they shouldn't
need to know that the external library X also requires P and Q, and that
Q in turn requires F and G, and so on.

Right. See above.

i.e., they should just be able to depend on X, Y and Z, and then let
the packagers for X, Y and Z work out the indirect dependencies that
come as a result of this.

Also correct.

>  But what you're suggesting is IMHO
akin to saying that kdelibs should depend on nothing, and that each
KDE app should manually track all of the many little libraries that
are used internally by kdelibs, even if the app itself doesn't use
them directly.

Wrong, I suggested to add them! I suggested to remove the dependency on java*-runtime instead for the following reasons:

- No free class library currently implements the full JDK 1.1 or
  JDK 1.2+ API. This means that none can provide java1-runtime and/or
  java2-runtime. This also means that dependencies on one of these
  virtual packages need to be satisfied by external non-free packages.

- You have no way to specify that your library requires JDK 1.3 or
  JDK 1.4 core classes. All you can so is depend on java2-runtime.

- In some cases you simply don't know which JDK version a library that
  you want to package was written for. Which dependencies should you
  specify? You can't run your library to test this. You need an
  application that uses your library to test it.

- java*-runtime are virtual packages. Packages are supposed to depend on
  "real_package | virtual_package". Which real_package should be chosen?
  Some packages have chosen classpath, others have chosen kaffe.

Tomcat 4.1.29 can be run with Kaffe 1.1.3. My next tomcat4 and libtomcat4-java packages will allow "kaffe (>= 1.1.3)" as first alternative dependency. But libtomcat4-java depends on libcommons-beanutils-java which in turn depends on java2-runtime without any other alternatives. So when I type "apt-get install tomcat4" kaffe is selected but you can't install tomcat4 anyway since the dependency on java2-runtime in not satisfied. You need to install external non-free packages in order to run tomcat4 with free software.

Sure, libcommons-beanutils-java's dependencies can be changed to "kaffe (>= 1.1.3) | java2-runtime" and everything will be fine but only because all other required libcommons-*-java already have this dependency. When GIJ or SableVM are able to run tomcat4, you will have to install the kaffe package although you are not going to use it. Do you see my point now?

I don't believe that dismantling the dependency system is the correct
way to do it.

I want to do the opposite: I want to mandate dependencies on other required libraries but not on external non-free packages. I'm not talking about application packages here, just about library packages!

Stefan




Reply to: