commit:     f99ddf5659d143dd876ab05c5ff2ce425ffde672
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 27 19:12:53 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Nov 30 22:28:58 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=f99ddf56

Revert "env-update: skip PATH in systemd user environment definition"

This reverts commit 21739ea1e0a793e207b7ae28d524e45582d9b2ca, as it
was appearantly not necessary. Not sure what drove me into believing
that this was needed…

Thanks to Arsen for pointing this out.

Closes: https://bugs.gentoo.org/883307
Reported-by: Arsen Arsenović <arsen <AT> aarsen.me>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
Closes: https://github.com/gentoo/portage/pull/949
Signed-off-by: Sam James <sam <AT> gentoo.org>

 NEWS                           | 3 +++
 lib/portage/util/env_update.py | 5 -----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/NEWS b/NEWS
index 6fd185fcb..57d9c92ee 100644
--- a/NEWS
+++ b/NEWS
@@ -46,6 +46,9 @@ Bug fixes:
   in different ways, but one example was a rebuild in / causing the same 
package
   to be added to ROOT, even when it had no other reason to be.
 
+* env-update: Also generate PATH definition in systemd user environment file
+  /etc/environment.d/10-gentoo-env.conf
+
 portage-3.0.39 (2022-11-20)
 --------------
 

diff --git a/lib/portage/util/env_update.py b/lib/portage/util/env_update.py
index bb0ebf84c..bac5b6e7a 100644
--- a/lib/portage/util/env_update.py
+++ b/lib/portage/util/env_update.py
@@ -417,11 +417,6 @@ def _env_update(makelinks, target_root, prev_mtimes, 
contents, env, writemsg_lev
         systemd_gentoo_env.write(senvnotice)
 
         for env_key in env_keys:
-            # Skip PATH since this makes it impossible to use
-            # "systemctl --user import-environment PATH".
-            if env_key == "PATH":
-                continue
-
             env_key_value = env[env_key]
 
             # Skip variables with the empty string

Reply via email to