Package installation using apt forces file remove/skip in /usr/share/doc/ wich often contains essential files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-images |
New
|
Undecided
|
Unassigned |
Bug Description
For example
In Dockerfile:
FROM ubuntu:focal
...
RUN apt-get install -y -q apt-utils imx-code-
...
In the result container:
# dpkg -L apt-utils
...
/usr/share/
/usr/share/
/usr/share/
...
But
# ls -lha /usr/share/
total 8.0K
drwxr-xr-x 2 root root 4.0K Jun 15 2021 .
drwxr-xr-x 3 root root 4.0K Dec 24 14:25 ..
# dpkg -L imx-code-
...
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
But
# ls -lha /usr/share/
total 8.0K
drwxr-xr-x 2 root root 4.0K Feb 4 2020 .
drwxr-xr-x 5 root root 4.0K Dec 24 14:25 ..
# ls -lha /usr/share/
total 8.0K
drwxr-xr-x 2 root root 4.0K Feb 4 2020 .
drwxr-xr-x 5 root root 4.0K Dec 24 14:25 ..
Reinstallation gives nothing.
How to turn files back???
We try to minimize the content of the container and exclude most of /usr/share/doc . Imo it's a bug in the imx-code- signing- tool package that it installs scripts into /usr/share/doc .
As a workaround, you can remove the exclude and reinstall the package:
# sed -i 's|^path- exclude= /usr/share/ doc/*|# path-exclude= /usr/share/ doc/*|' /etc/dpkg/ dpkg.cfg. d/excludes signing- tool
# apt install --reinstall imx-code-