Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o, Florian Schmaus <flo@×××××××××.eu>
Subject: Re: [gentoo-portage-dev] Re: [PATCH v4] env-update: create systemd env configuration if required
Date: Sat, 05 Sep 2020 01:12:38
Message-Id: cdb3de9f-fea2-41da-0340-3cceed993c27@gentoo.org
In Reply to: [gentoo-portage-dev] Re: [PATCH v4] env-update: create systemd env configuration if required by Florian Schmaus
1 On 9/4/20 8:39 AM, Florian Schmaus wrote:
2 > On 9/3/20 7:57 PM, Florian Schmaus wrote:
3 >> + systemd_profile_env_path = os.path.join(systemd_environment_dir,
4 >> + "10-gentoo-profile-env.conf")
5 >> + with open(systemd_profile_env_path, "w") as systemd_profile_env:
6 >
7 > I just noticed that portage has atomic_ofstream(). Would you prefer this
8 > change to use atomic_ofstream() instead of using "with open()"?
9
10 Yes, please do. Also, we can eliminate the earlier os.path.isdir by
11 using os.makedirs(systemd_environment_dir, exist_ok=True).
12 --
13 Thanks,
14 Zac

Attachments

File name MIME type
signature.asc application/pgp-signature