From: "Moessbauer, Felix" <felix.moessbauer@siemens.com>
To: "Roberto A. Foglietta" <roberto.foglietta@gmail.com>
Cc: "isar-users@googlegroups.com" <isar-users@googlegroups.com>,
"Schild, Henning" <henning.schild@siemens.com>,
"jan.kiszka@siemens.com" <jan.kiszka@siemens.com>
Subject: RE: [PATCH 1/1] bugfix: isar-exclude-docs delete man folders but some packages expect that folders
Date: Fri, 23 Sep 2022 08:06:52 +0000 [thread overview]
Message-ID: <AM9PR10MB4869E983B33E008783260AB189519@AM9PR10MB4869.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <CAJGKYO7pP-Xc_VV8-34QDxjRkZGJ=csS6OOuLEr8ARi3y3t_FQ@mail.gmail.com>
> From: isar-users@googlegroups.com <isar-users@googlegroups.com> On Behalf Of Roberto A. Foglietta
> Sent: Thursday, September 22, 2022 10:36 PM
> To: isar-users@googlegroups.com
> Subject: [PATCH 1/1] bugfix: isar-exclude-docs delete man folders but some packages expect that folders
>
> Hi all,
>
> bugfix: isar-exclude-docs delete man folders but some packages expect that folders.
> solution: adopts the same approach used for the doc folder.
Hi Roberto,
There are two things to the removal of the docs:
1. no package should assume that some folders that are not provided by a direct dependency exists (=> packaging bug of openjdk-11-jre-headless)
2. I'm really wondering if simply clearing these folders is the right approach.
Instead, you could instruct dpkg via dpkg.conf to not install files into particular paths:
Simply add a drop-in to: /etc/dpkg/dpkg.cfg.d/ with dpkg options for path exclusions:
# Delete man pages
path-exclude=/usr/share/man/*
# Delete docs
path-exclude=/usr/share/doc/*
path-include=/usr/share/doc/*/copyright
Of course, this has to be done prior to any package installation and at best not from a package itself.
This would also solve the issue that docs are installed when installing packages into the live image (outside of ISAR).
Felix
>
> https://github.com/robang74/isar/commit/c656e6df63aa76701e34d7ee3f99c81e96312b9d
>
> diff --git a/meta/recipes-support/isar-exclude-docs/files/postinst b/meta/recipes-support/isar-exclude-docs/files/postinst
> index d34c04e..581cdc1 100644
> --- a/meta/recipes-support/isar-exclude-docs/files/postinst
> +++ b/meta/recipes-support/isar-exclude-docs/files/postinst
> @@ -3,5 +3,5 @@
> # time and do not need to be "the first" package
> # what we delete needs to be in sync with the dpkg configuration we ship
>
> -rm -rf /usr/share/man/*
> +find /usr/share/man/ -type f -exec rm -rf {} \;
> find /usr/share/doc/ -type f ! -name "copyright" ! -name "changelog.*" -exec rm -rf {} \;
>
> Here you are the error during the configuration of the package:
>
> Setting up openjdk-11-jre-headless:amd64 (11.0.16+8-1~deb11u1) ...
> update-alternatives: using /usr/lib/jvm/java-11-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-11-jre-headless:amd64 (--configure):
> installed openjdk-11-jre-headless:amd64 package post-installation script subprocess returned error exit status 2
> dpkg: dependency problems prevent configuration of openjdk-11-jre:amd64:
> openjdk-11-jre:amd64 depends on openjdk-11-jre-headless (= 11.0.16+8-1~deb11u1); however:
> Package openjdk-11-jre-headless:amd64 is not configured yet.
>
> Cheers, R-
next prev parent reply other threads:[~2022-09-23 8:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-22 20:36 Roberto A. Foglietta
2022-09-22 21:31 ` Roberto A. Foglietta
2022-09-23 12:01 ` Henning Schild
2022-09-23 14:18 ` Roberto A. Foglietta
2022-09-23 14:39 ` Henning Schild
2022-09-23 8:06 ` Moessbauer, Felix [this message]
2022-09-23 9:31 ` Roberto A. Foglietta
2022-09-23 11:18 ` Henning Schild
2022-09-23 8:57 ` Henning Schild
2022-09-23 9:25 ` Henning Schild
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AM9PR10MB4869E983B33E008783260AB189519@AM9PR10MB4869.EURPRD10.PROD.OUTLOOK.COM \
--to=felix.moessbauer@siemens.com \
--cc=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
--cc=roberto.foglietta@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox