From: Daan De Meyer Date: Sat, 22 Jul 2023 18:19:02 +0000 (+0200) Subject: Merge pull request #1692 from DaanDeMeyer/stuff X-Git-Tag: v15~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=102bf8b5cf30a7dabf243adad960aaf1a8984d7e;p=thirdparty%2Fmkosi.git Merge pull request #1692 from DaanDeMeyer/stuff More stuff --- 102bf8b5cf30a7dabf243adad960aaf1a8984d7e diff --cc mkosi/distributions/gentoo.py index e99e031a2,2cfcd9d0e..fd99909c2 --- a/mkosi/distributions/gentoo.py +++ b/mkosi/distributions/gentoo.py @@@ -124,27 -131,8 +115,27 @@@ class GentooInstaller(DistributionInsta for d in ("binpkgs", "distfiles", "repos/gentoo"): (state.cache_dir / d).mkdir(parents=True, exist_ok=True) - copy_path(state.pkgmngr, stage3, preserve_owner=False) + copy_tree(state.config, state.pkgmngr, stage3, preserve_owner=False) + features = " ".join([ + "getbinpkg", + "-candy", + # Disable sandboxing in emerge because we already do it in mkosi. + "-sandbox", + "-userfetch", + "-userpriv", + "-usersandbox", + "-usersync", + "-ebuild-locks", + "parallel-install", + *(["noman", "nodoc", "noinfo"] if state.config.with_docs else []), + ]) + + # Setting FEATURES via the environment variable does not seem to apply to ebuilds in portage, so we + # append to /etc/portage/make.conf instead. + with (stage3 / "etc/portage/make.conf").open("a") as f: + f.write(f"\nFEATURES=\"${{FEATURES}} {features}\"\n") + bwrap( cmd=["chroot", "emerge-webrsync"], apivfs=stage3,