apt ignores virtual package provided equivs-created package












0














I want to install pdftk on my development machine where I have installed (multiple versions of) Java with SDKMAN!. In order to fulfill the dependency on default-jre-headless of pdftk-java, I created a simple file for equivs-build:



Section: misc
Priority: optional
Homepage: https://github.com/reitzig/sdkman-equivs
Standards-Version: 3.9.2

Package: sdkman-java-11-open
Maintainer: Raphael Reitzig <4246780+reitzig@users.noreply.github.com>
Provides: openjdk-11-jre-headless, openjdk-11-jdk-headless, openjdk-11-source, default-jdk-headless, default-jre-headless
Conflicts: openjdk-11-jre-headless, openjdk-11-jdk-headless, openjdk-11-source
Replaces: openjdk-11-jre-headless, openjdk-11-jdk-headless, openjdk-11-source
Architecture: all
Description: Dummy package for OpenJDK 11 installed with SDKMAN!


I then installed the package with



equivs-build java-11-open
sudo dpkg -i sdkman-java-11-open_1.0_all.deb


Seems to have worked:



$ aptitude show default-jre-headless
Package: default-jre-headless
<snip>
Provided by: sdkman-java-11-open (1.0)


However, the dependency is still not met:



$ sudo aptitude update > /dev/null; sudo aptitude install pdftk
The following NEW packages will be installed:
default-jre-headless{a} java-common{a} libapache-pom-java{a} libbcprov-java{a} libcommons-lang3-java{a}
libcommons-parent-java{a} pdftk pdftk-java{a}


Same with apt-get. This is on Ubuntu 18.04.



What have I done wrong?










share|improve this question





























    0














    I want to install pdftk on my development machine where I have installed (multiple versions of) Java with SDKMAN!. In order to fulfill the dependency on default-jre-headless of pdftk-java, I created a simple file for equivs-build:



    Section: misc
    Priority: optional
    Homepage: https://github.com/reitzig/sdkman-equivs
    Standards-Version: 3.9.2

    Package: sdkman-java-11-open
    Maintainer: Raphael Reitzig <4246780+reitzig@users.noreply.github.com>
    Provides: openjdk-11-jre-headless, openjdk-11-jdk-headless, openjdk-11-source, default-jdk-headless, default-jre-headless
    Conflicts: openjdk-11-jre-headless, openjdk-11-jdk-headless, openjdk-11-source
    Replaces: openjdk-11-jre-headless, openjdk-11-jdk-headless, openjdk-11-source
    Architecture: all
    Description: Dummy package for OpenJDK 11 installed with SDKMAN!


    I then installed the package with



    equivs-build java-11-open
    sudo dpkg -i sdkman-java-11-open_1.0_all.deb


    Seems to have worked:



    $ aptitude show default-jre-headless
    Package: default-jre-headless
    <snip>
    Provided by: sdkman-java-11-open (1.0)


    However, the dependency is still not met:



    $ sudo aptitude update > /dev/null; sudo aptitude install pdftk
    The following NEW packages will be installed:
    default-jre-headless{a} java-common{a} libapache-pom-java{a} libbcprov-java{a} libcommons-lang3-java{a}
    libcommons-parent-java{a} pdftk pdftk-java{a}


    Same with apt-get. This is on Ubuntu 18.04.



    What have I done wrong?










    share|improve this question



























      0












      0








      0







      I want to install pdftk on my development machine where I have installed (multiple versions of) Java with SDKMAN!. In order to fulfill the dependency on default-jre-headless of pdftk-java, I created a simple file for equivs-build:



      Section: misc
      Priority: optional
      Homepage: https://github.com/reitzig/sdkman-equivs
      Standards-Version: 3.9.2

      Package: sdkman-java-11-open
      Maintainer: Raphael Reitzig <4246780+reitzig@users.noreply.github.com>
      Provides: openjdk-11-jre-headless, openjdk-11-jdk-headless, openjdk-11-source, default-jdk-headless, default-jre-headless
      Conflicts: openjdk-11-jre-headless, openjdk-11-jdk-headless, openjdk-11-source
      Replaces: openjdk-11-jre-headless, openjdk-11-jdk-headless, openjdk-11-source
      Architecture: all
      Description: Dummy package for OpenJDK 11 installed with SDKMAN!


      I then installed the package with



      equivs-build java-11-open
      sudo dpkg -i sdkman-java-11-open_1.0_all.deb


      Seems to have worked:



      $ aptitude show default-jre-headless
      Package: default-jre-headless
      <snip>
      Provided by: sdkman-java-11-open (1.0)


      However, the dependency is still not met:



      $ sudo aptitude update > /dev/null; sudo aptitude install pdftk
      The following NEW packages will be installed:
      default-jre-headless{a} java-common{a} libapache-pom-java{a} libbcprov-java{a} libcommons-lang3-java{a}
      libcommons-parent-java{a} pdftk pdftk-java{a}


      Same with apt-get. This is on Ubuntu 18.04.



      What have I done wrong?










      share|improve this question















      I want to install pdftk on my development machine where I have installed (multiple versions of) Java with SDKMAN!. In order to fulfill the dependency on default-jre-headless of pdftk-java, I created a simple file for equivs-build:



      Section: misc
      Priority: optional
      Homepage: https://github.com/reitzig/sdkman-equivs
      Standards-Version: 3.9.2

      Package: sdkman-java-11-open
      Maintainer: Raphael Reitzig <4246780+reitzig@users.noreply.github.com>
      Provides: openjdk-11-jre-headless, openjdk-11-jdk-headless, openjdk-11-source, default-jdk-headless, default-jre-headless
      Conflicts: openjdk-11-jre-headless, openjdk-11-jdk-headless, openjdk-11-source
      Replaces: openjdk-11-jre-headless, openjdk-11-jdk-headless, openjdk-11-source
      Architecture: all
      Description: Dummy package for OpenJDK 11 installed with SDKMAN!


      I then installed the package with



      equivs-build java-11-open
      sudo dpkg -i sdkman-java-11-open_1.0_all.deb


      Seems to have worked:



      $ aptitude show default-jre-headless
      Package: default-jre-headless
      <snip>
      Provided by: sdkman-java-11-open (1.0)


      However, the dependency is still not met:



      $ sudo aptitude update > /dev/null; sudo aptitude install pdftk
      The following NEW packages will be installed:
      default-jre-headless{a} java-common{a} libapache-pom-java{a} libbcprov-java{a} libcommons-lang3-java{a}
      libcommons-parent-java{a} pdftk pdftk-java{a}


      Same with apt-get. This is on Ubuntu 18.04.



      What have I done wrong?







      apt dpkg aptitude equivs






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited yesterday

























      asked yesterday









      Raphael

      820920




      820920






















          1 Answer
          1






          active

          oldest

          votes


















          1














          David Foerster’s pdftk-java package depends on default-jre-headless (>= 7) | java7-runtime-headless; to satisfy that, you need a package with a versioned “Provides” (for default-jre-headless), or a package providing java7-runtime-headless. (I think the versioned dependency on default-jre-headless is incorrect; the default JDK/JRE packages are concrete packages with an epoch, so they all match that, and they’re not supposed to be used to enforce minimal versions.)



          You should change your equivs file to provide the same virtual packages as the packages you’re replacing (openjdk-11-jre-headless etc.), with at least:



          Provides: java-runtime-headless, java10-runtime-headless, java11-runtime-headless, java2-runtime-headless, java5-runtime-headless, java6-runtime-headless, java7-runtime-headless, java8-runtime-headless, java9-runtime-headless, openjdk-11-jre-headless, openjdk-11-jdk-headless, openjdk-11-source, default-jdk-headless, default-jre-headless


          (You probably don’t need to provide the concrete openjdk-11-jre-headless and openjdk-11-jdk-headless packages, but I’ve left them in for simplicity.)






          share|improve this answer





















          • I saw this long list of provided packages, which doesn't make a lot of sense to me: a Java 11 runtime does not double as a Java 7 runtime! But it seems it has to be this way (for now). Thanks!
            – Raphael
            yesterday










          • I agree on the dependency. default-jre-headless has version 2:1.10-... in the repos; >= 7 seems inconsistent. It should probably be java7-runtime-headless | java8-runtime-headless | java9-runtime-headless | java10-runtime-headless | java11-runtime-headless. At least, that seems to be the intent.
            – Raphael
            yesterday










          • More to the point: since openjdk-11-jre-headless provides all the java_0runtime-headless, I thought providing the single, specific package would to the trick. Are provides not recursive?
            – Raphael
            yesterday






          • 1




            No, provides aren’t transitive.
            – Stephen Kitt
            yesterday








          • 1




            To clarify this further, “Provides” is intended (at its core) for virtual packages, so there’s nothing to anchor transitive dependencies on.
            – Stephen Kitt
            yesterday











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f492446%2fapt-ignores-virtual-package-provided-equivs-created-package%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          David Foerster’s pdftk-java package depends on default-jre-headless (>= 7) | java7-runtime-headless; to satisfy that, you need a package with a versioned “Provides” (for default-jre-headless), or a package providing java7-runtime-headless. (I think the versioned dependency on default-jre-headless is incorrect; the default JDK/JRE packages are concrete packages with an epoch, so they all match that, and they’re not supposed to be used to enforce minimal versions.)



          You should change your equivs file to provide the same virtual packages as the packages you’re replacing (openjdk-11-jre-headless etc.), with at least:



          Provides: java-runtime-headless, java10-runtime-headless, java11-runtime-headless, java2-runtime-headless, java5-runtime-headless, java6-runtime-headless, java7-runtime-headless, java8-runtime-headless, java9-runtime-headless, openjdk-11-jre-headless, openjdk-11-jdk-headless, openjdk-11-source, default-jdk-headless, default-jre-headless


          (You probably don’t need to provide the concrete openjdk-11-jre-headless and openjdk-11-jdk-headless packages, but I’ve left them in for simplicity.)






          share|improve this answer





















          • I saw this long list of provided packages, which doesn't make a lot of sense to me: a Java 11 runtime does not double as a Java 7 runtime! But it seems it has to be this way (for now). Thanks!
            – Raphael
            yesterday










          • I agree on the dependency. default-jre-headless has version 2:1.10-... in the repos; >= 7 seems inconsistent. It should probably be java7-runtime-headless | java8-runtime-headless | java9-runtime-headless | java10-runtime-headless | java11-runtime-headless. At least, that seems to be the intent.
            – Raphael
            yesterday










          • More to the point: since openjdk-11-jre-headless provides all the java_0runtime-headless, I thought providing the single, specific package would to the trick. Are provides not recursive?
            – Raphael
            yesterday






          • 1




            No, provides aren’t transitive.
            – Stephen Kitt
            yesterday








          • 1




            To clarify this further, “Provides” is intended (at its core) for virtual packages, so there’s nothing to anchor transitive dependencies on.
            – Stephen Kitt
            yesterday
















          1














          David Foerster’s pdftk-java package depends on default-jre-headless (>= 7) | java7-runtime-headless; to satisfy that, you need a package with a versioned “Provides” (for default-jre-headless), or a package providing java7-runtime-headless. (I think the versioned dependency on default-jre-headless is incorrect; the default JDK/JRE packages are concrete packages with an epoch, so they all match that, and they’re not supposed to be used to enforce minimal versions.)



          You should change your equivs file to provide the same virtual packages as the packages you’re replacing (openjdk-11-jre-headless etc.), with at least:



          Provides: java-runtime-headless, java10-runtime-headless, java11-runtime-headless, java2-runtime-headless, java5-runtime-headless, java6-runtime-headless, java7-runtime-headless, java8-runtime-headless, java9-runtime-headless, openjdk-11-jre-headless, openjdk-11-jdk-headless, openjdk-11-source, default-jdk-headless, default-jre-headless


          (You probably don’t need to provide the concrete openjdk-11-jre-headless and openjdk-11-jdk-headless packages, but I’ve left them in for simplicity.)






          share|improve this answer





















          • I saw this long list of provided packages, which doesn't make a lot of sense to me: a Java 11 runtime does not double as a Java 7 runtime! But it seems it has to be this way (for now). Thanks!
            – Raphael
            yesterday










          • I agree on the dependency. default-jre-headless has version 2:1.10-... in the repos; >= 7 seems inconsistent. It should probably be java7-runtime-headless | java8-runtime-headless | java9-runtime-headless | java10-runtime-headless | java11-runtime-headless. At least, that seems to be the intent.
            – Raphael
            yesterday










          • More to the point: since openjdk-11-jre-headless provides all the java_0runtime-headless, I thought providing the single, specific package would to the trick. Are provides not recursive?
            – Raphael
            yesterday






          • 1




            No, provides aren’t transitive.
            – Stephen Kitt
            yesterday








          • 1




            To clarify this further, “Provides” is intended (at its core) for virtual packages, so there’s nothing to anchor transitive dependencies on.
            – Stephen Kitt
            yesterday














          1












          1








          1






          David Foerster’s pdftk-java package depends on default-jre-headless (>= 7) | java7-runtime-headless; to satisfy that, you need a package with a versioned “Provides” (for default-jre-headless), or a package providing java7-runtime-headless. (I think the versioned dependency on default-jre-headless is incorrect; the default JDK/JRE packages are concrete packages with an epoch, so they all match that, and they’re not supposed to be used to enforce minimal versions.)



          You should change your equivs file to provide the same virtual packages as the packages you’re replacing (openjdk-11-jre-headless etc.), with at least:



          Provides: java-runtime-headless, java10-runtime-headless, java11-runtime-headless, java2-runtime-headless, java5-runtime-headless, java6-runtime-headless, java7-runtime-headless, java8-runtime-headless, java9-runtime-headless, openjdk-11-jre-headless, openjdk-11-jdk-headless, openjdk-11-source, default-jdk-headless, default-jre-headless


          (You probably don’t need to provide the concrete openjdk-11-jre-headless and openjdk-11-jdk-headless packages, but I’ve left them in for simplicity.)






          share|improve this answer












          David Foerster’s pdftk-java package depends on default-jre-headless (>= 7) | java7-runtime-headless; to satisfy that, you need a package with a versioned “Provides” (for default-jre-headless), or a package providing java7-runtime-headless. (I think the versioned dependency on default-jre-headless is incorrect; the default JDK/JRE packages are concrete packages with an epoch, so they all match that, and they’re not supposed to be used to enforce minimal versions.)



          You should change your equivs file to provide the same virtual packages as the packages you’re replacing (openjdk-11-jre-headless etc.), with at least:



          Provides: java-runtime-headless, java10-runtime-headless, java11-runtime-headless, java2-runtime-headless, java5-runtime-headless, java6-runtime-headless, java7-runtime-headless, java8-runtime-headless, java9-runtime-headless, openjdk-11-jre-headless, openjdk-11-jdk-headless, openjdk-11-source, default-jdk-headless, default-jre-headless


          (You probably don’t need to provide the concrete openjdk-11-jre-headless and openjdk-11-jdk-headless packages, but I’ve left them in for simplicity.)







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered yesterday









          Stephen Kitt

          165k24366445




          165k24366445












          • I saw this long list of provided packages, which doesn't make a lot of sense to me: a Java 11 runtime does not double as a Java 7 runtime! But it seems it has to be this way (for now). Thanks!
            – Raphael
            yesterday










          • I agree on the dependency. default-jre-headless has version 2:1.10-... in the repos; >= 7 seems inconsistent. It should probably be java7-runtime-headless | java8-runtime-headless | java9-runtime-headless | java10-runtime-headless | java11-runtime-headless. At least, that seems to be the intent.
            – Raphael
            yesterday










          • More to the point: since openjdk-11-jre-headless provides all the java_0runtime-headless, I thought providing the single, specific package would to the trick. Are provides not recursive?
            – Raphael
            yesterday






          • 1




            No, provides aren’t transitive.
            – Stephen Kitt
            yesterday








          • 1




            To clarify this further, “Provides” is intended (at its core) for virtual packages, so there’s nothing to anchor transitive dependencies on.
            – Stephen Kitt
            yesterday


















          • I saw this long list of provided packages, which doesn't make a lot of sense to me: a Java 11 runtime does not double as a Java 7 runtime! But it seems it has to be this way (for now). Thanks!
            – Raphael
            yesterday










          • I agree on the dependency. default-jre-headless has version 2:1.10-... in the repos; >= 7 seems inconsistent. It should probably be java7-runtime-headless | java8-runtime-headless | java9-runtime-headless | java10-runtime-headless | java11-runtime-headless. At least, that seems to be the intent.
            – Raphael
            yesterday










          • More to the point: since openjdk-11-jre-headless provides all the java_0runtime-headless, I thought providing the single, specific package would to the trick. Are provides not recursive?
            – Raphael
            yesterday






          • 1




            No, provides aren’t transitive.
            – Stephen Kitt
            yesterday








          • 1




            To clarify this further, “Provides” is intended (at its core) for virtual packages, so there’s nothing to anchor transitive dependencies on.
            – Stephen Kitt
            yesterday
















          I saw this long list of provided packages, which doesn't make a lot of sense to me: a Java 11 runtime does not double as a Java 7 runtime! But it seems it has to be this way (for now). Thanks!
          – Raphael
          yesterday




          I saw this long list of provided packages, which doesn't make a lot of sense to me: a Java 11 runtime does not double as a Java 7 runtime! But it seems it has to be this way (for now). Thanks!
          – Raphael
          yesterday












          I agree on the dependency. default-jre-headless has version 2:1.10-... in the repos; >= 7 seems inconsistent. It should probably be java7-runtime-headless | java8-runtime-headless | java9-runtime-headless | java10-runtime-headless | java11-runtime-headless. At least, that seems to be the intent.
          – Raphael
          yesterday




          I agree on the dependency. default-jre-headless has version 2:1.10-... in the repos; >= 7 seems inconsistent. It should probably be java7-runtime-headless | java8-runtime-headless | java9-runtime-headless | java10-runtime-headless | java11-runtime-headless. At least, that seems to be the intent.
          – Raphael
          yesterday












          More to the point: since openjdk-11-jre-headless provides all the java_0runtime-headless, I thought providing the single, specific package would to the trick. Are provides not recursive?
          – Raphael
          yesterday




          More to the point: since openjdk-11-jre-headless provides all the java_0runtime-headless, I thought providing the single, specific package would to the trick. Are provides not recursive?
          – Raphael
          yesterday




          1




          1




          No, provides aren’t transitive.
          – Stephen Kitt
          yesterday






          No, provides aren’t transitive.
          – Stephen Kitt
          yesterday






          1




          1




          To clarify this further, “Provides” is intended (at its core) for virtual packages, so there’s nothing to anchor transitive dependencies on.
          – Stephen Kitt
          yesterday




          To clarify this further, “Provides” is intended (at its core) for virtual packages, so there’s nothing to anchor transitive dependencies on.
          – Stephen Kitt
          yesterday


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f492446%2fapt-ignores-virtual-package-provided-equivs-created-package%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to make a Squid Proxy server?

          Is this a new Fibonacci Identity?

          19世紀