From: Daan De Meyer Date: Fri, 26 Apr 2024 06:25:58 +0000 (+0200) Subject: pacman: Implement support for WithDocs= X-Git-Tag: v23.1~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b80a1fa9f23bd59b93137629343c8d612b6e7c1;p=thirdparty%2Fmkosi.git pacman: Implement support for WithDocs= Same list as we use for apt, using pacman's NoExtract= option. --- diff --git a/mkosi/installer/pacman.py b/mkosi/installer/pacman.py index 5198e71a9..627e8ea1f 100644 --- a/mkosi/installer/pacman.py +++ b/mkosi/installer/pacman.py @@ -91,12 +91,26 @@ class Pacman(PackageManager): ParallelDownloads = 5 Architecture = {context.config.distribution.architecture(context.config.architecture)} - # This has to go first so that our local repository always takes precedence over any other ones. - Include = /etc/mkosi-local.conf """ ) ) + if not context.config.with_docs: + f.write( + textwrap.dedent( + """\ + NoExtract = usr/share/doc/* + NoExtract = usr/share/doc/*/copyright + NoExtract = usr/share/man/* + NoExtract = usr/share/groff/* + NoExtract = usr/share/info/* + """ + ) + ) + + # This has to go first so that our local repository always takes precedence over any other ones. + f.write("Include = /etc/mkosi-local.conf\n") + for repo in repositories: f.write( textwrap.dedent(