* [gentoo-commits] proj/portage:master commit in: lib/_emerge/, /, lib/portage/elog/
@ 2022-12-15 0:50 Sam James
0 siblings, 0 replies; only message in thread
From: Sam James @ 2022-12-15 0:50 UTC (permalink / raw
To: gentoo-commits
commit: a28764138198e641cd0fdcc166d596f2cd076225
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 13 21:28:22 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 15 00:50:37 2022 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=a2876413
logging: Write logs under BROOT, not EPREFIX
Logs should be written to the build system, not the host system. When
building for a prefixed system under ROOT, logs were being written under
/${EPREFIX} even though that directory did not exist at all.
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
Closes: https://github.com/gentoo/portage/pull/959
Signed-off-by: Sam James <sam <AT> gentoo.org>
NEWS | 2 ++
lib/_emerge/actions.py | 5 ++++-
lib/portage/elog/mod_save.py | 2 +-
lib/portage/elog/mod_save_summary.py | 2 +-
4 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/NEWS b/NEWS
index 4684487b3..e80c82227 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,8 @@ Bug fixes:
* make.conf(5): Note the various file suffixes / file extensions used
for binary packages.
+* logging: Write logs under BROOT, not EPREFIX.
+
portage-3.0.41 (2022-11-04)
--------------
diff --git a/lib/_emerge/actions.py b/lib/_emerge/actions.py
index 30b687140..047948f56 100644
--- a/lib/_emerge/actions.py
+++ b/lib/_emerge/actions.py
@@ -3799,7 +3799,10 @@ def run_action(emerge_config):
emerge_log_dir = emerge_config.target_config.settings.get("EMERGE_LOG_DIR")
default_log_dir = os.path.join(
- os.sep, portage.const.EPREFIX.lstrip(os.sep), "var", "log"
+ os.sep,
+ emerge_config.target_config.settings["BROOT"].lstrip(os.sep),
+ "var",
+ "log",
)
for x in ("--pretend", "--fetchonly", "--fetch-all-uri"):
if x in emerge_config.opts:
diff --git a/lib/portage/elog/mod_save.py b/lib/portage/elog/mod_save.py
index a2b2cf7bd..e526b331f 100644
--- a/lib/portage/elog/mod_save.py
+++ b/lib/portage/elog/mod_save.py
@@ -20,7 +20,7 @@ def process(mysettings, key, logentries, fulltext):
logdir = normalize_path(mysettings["PORTAGE_LOGDIR"])
else:
logdir = os.path.join(
- os.sep, mysettings["EPREFIX"].lstrip(os.sep), "var", "log", "portage"
+ os.sep, mysettings["BROOT"].lstrip(os.sep), "var", "log", "portage"
)
if not os.path.isdir(logdir):
diff --git a/lib/portage/elog/mod_save_summary.py b/lib/portage/elog/mod_save_summary.py
index 5aa31a8e1..f2913da5b 100644
--- a/lib/portage/elog/mod_save_summary.py
+++ b/lib/portage/elog/mod_save_summary.py
@@ -20,7 +20,7 @@ def process(mysettings, key, logentries, fulltext):
logdir = normalize_path(mysettings["PORTAGE_LOGDIR"])
else:
logdir = os.path.join(
- os.sep, mysettings["EPREFIX"].lstrip(os.sep), "var", "log", "portage"
+ os.sep, mysettings["BROOT"].lstrip(os.sep), "var", "log", "portage"
)
if not os.path.isdir(logdir):
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-12-15 0:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-15 0:50 [gentoo-commits] proj/portage:master commit in: lib/_emerge/, /, lib/portage/elog/ Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox