#1070136 openjdk-17-jre-headless: error creating symbolic link '/usr/share/man/man1/java.1.gz.dpkg-tmp': No such file or directory

Package:
openjdk-17-jre-headless
Source:
openjdk-17-jre-headless
Description:
OpenJDK Java runtime, using Hotspot JIT (headless)
Submitter:
Peter van Dijk
Date:
2024-10-10 13:48:01 UTC
Severity:
normal
#1070136#5
Date:
2024-04-30 17:51:01 UTC
From:
To:
Dear Maintainer,

   * What led up to the situation?

Installing openjdk-17-jre-headless on a very minimal base system. The 12-slim Docker image is not minimal enough
 to reproduce this (it has an empty /usr/share/man/man1) but an mkosi-build Debian Bookworm image reproduces it
(by not having /usr/share/man/man1)

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

As suggested in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863199 (which appears to be a previous instanc
e of the same problem), mkdir -p /usr/share/man/man1 followed by apt install -f sorted the situation. The fix ap
plied to close that bug would likely help here too.

Please note that the System Information below is from after:

* attempting to install openjdk-17-jre-headless
* the mkdir -p
* installing reportbug and its dependencies

although I have the impression installing reportbug did not change any of the information mentioned below.

#1070136#10
Date:
2024-10-10 13:44:59 UTC
From:
To:
I can confirm that if I attempt to install openjdk-17-jre-headless I get
the following error:

Setting up openjdk-17-jre-headless:amd64 (17.0.12+7-2~deb12u1) ...
update-alternatives: using /usr/lib/jvm/java-17-openjdk-amd64/bin/java to provide /usr/bin/java (java) in auto mode
update-alternatives: error: error creating symbolic link '/usr/share/man/man1/java.1.gz.dpkg-tmp': No such file or directory
dpkg: error processing package openjdk-17-jre-headless:amd64 (--configure):
 installed openjdk-17-jre-headless:amd64 package post-installation
 script subprocess returned error exit status 2

I have to do `mkdir -p /usr/share/man/man1` and then `apt-get -f
install` to proceed.