]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
pacman: Implement support for WithDocs=
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 26 Apr 2024 06:25:58 +0000 (08:25 +0200)
committerJörg Behrmann <behrmann@physik.fu-berlin.de>
Fri, 26 Apr 2024 09:03:38 +0000 (11:03 +0200)
Same list as we use for apt, using pacman's NoExtract= option.

mkosi/installer/pacman.py

index 5198e71a91512012a4b80b6eec1f76f9d289a658..627e8ea1f093b8599e9323480197d76beccc4b6b 100644 (file)
@@ -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(