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

Bug#858655: Please move Java dependencies to libreoffice-java-common



Package: src:libreoffice
Version: 1:5.2.5-2

I am interested in the topic of installing LibreOffice without Java.
This is possible, of course, but this bug report is concerned with a
dependency structure that makes this needlessly messy.

A regular LibreOffice install has many Java dependencies:

    # apt-get -s install libreoffice | grep '^Inst' | egrep 'jre|jdk|java'
    Inst libreoffice-java-common (1:5.2.5-2 Debian:testing [all])
    Inst ca-certificates-java (20161107 Debian:testing [all]) []
    Inst java-common (0.58 Debian:testing [all]) []
    Inst openjdk-8-jre-headless (8u121-b13-4 Debian:testing [amd64])
    [long list of Java-related packages elided]

Let's try installing sans what appears to be LibreOffice's main Java-
dependency package:

    # apt-get -s install libreoffice libreoffice-java-common-
    [...]
    The following packages have unmet dependencies:
     libreoffice : Depends: libreoffice-java-common (>= 1:5.2.5~) but it is not going to be installed
                   Recommends: libreoffice-nlpsolver but it is not going to be installed
                   Recommends: libreoffice-report-builder but it is not going to be installed
                   Recommends: libreoffice-wiki-publisher but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.

Darn. Okay, can we install without pulling in the JRE?

    # apt-get -s install libreoffice default-jre- | grep '^Inst' | egrep 'jre|jdk|java'
    Inst libreoffice-java-common (1:5.2.5-2 Debian:testing [all])

Hunh, that worked. The lo-java-common package went in, even though it's
presumably useless without a Java runtime. So what about those
aforementioned components that supposedly required Java?

    # apt-get -s install libreoffice default-jre- | grep '^Inst' | egrep 'nlpsolver|report-builder|wiki-publisher'
    Inst libreoffice-report-builder-bin (1:5.2.5-2 Debian:testing [amd64])
    Inst libreoffice-wiki-publisher (1.2.0+LibO5.2.5-2 Debian:testing [all])

So nlpsolver didn't go in (reasonable), only the bin package of
report-builder was installed (huh?), and wiki-publisher went in just
fine (will that even work in light of its hard dep on lo-java-common?).

This doesn't make much sense to me. I can't decline installation of
lo-java-common, but I can decline default-jre, yet some of the resulting
installed packages are useless (lo-report-buildir-bin without
lo-report-builder?) or at worse broken.

Looking through the dependencies in the various LibreOffice packages,
one issue I see is that several of them depend directly on default-jre
(or more specifically, "default-jre | openjdk-8-jre | openjdk-7-jre |
openjdk-6-jre | gcj-jre | sun-java5-jre | sun-java6-jre | java5-runtime
| jre") as well as lo-java-common, when the JRE dependency should in fact
be redundant alongside lo-java-common.

(Interestingly, libreoffice-script-provider-{bsh,js} depend on a JRE
_without_ depending on lo-java-common. Does that make sense?)

What I would like to see is for all the various LibreOffice packages
that can/must make use of Java to Depends:/Recommends:/Suggests:
lo-java-common, and then have lo-java-common Depends: default-jre et al.
That way, when installing LibreOffice, I can decline lo-java-common, the
JRE won't get pulled in, and no LibreOffice package that requires Java
(or is related to one that does) will get installed.


Reply to: