aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2023-07-01 19:44:41 +0200
committerAndreas K. Hüttel <dilfridge@gentoo.org>2023-07-01 21:26:14 +0200
commit9d6e495ca2ee55c21befc183a9a56fc5062a63c7 (patch)
tree46300d9bee73365b3b08007040e2a81220920a09
parentstagebase: Add blank linkes in make.conf (e.g. before CHOST block) (diff)
downloadcatalyst-9d6e495ca2ee55c21befc183a9a56fc5062a63c7.tar.gz
catalyst-9d6e495ca2ee55c21befc183a9a56fc5062a63c7.tar.bz2
catalyst-9d6e495ca2ee55c21befc183a9a56fc5062a63c7.zip
stagebase: Fix and improve port_logdir config option
NOTE: The cleaning of log files does not work yet (and probably never did). Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
-rw-r--r--catalyst/base/stagebase.py7
-rw-r--r--catalyst/defaults.py2
2 files changed, 5 insertions, 4 deletions
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 65f4306e..74d197b5 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -271,9 +271,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
if "port_logdir" in self.settings:
self.mount['port_logdir']['enable'] = True
- self.mount['port_logdir']['source'] = self.settings['port_logdir']
- self.env["PORT_LOGDIR"] = self.settings["port_logdir"]
- self.env["PORT_LOGDIR_CLEAN"] = PORT_LOGDIR_CLEAN
+ self.mount['port_logdir']['source'] = normpath(self.settings['port_logdir'] + "/" + self.settings["target_subpath"] + "/")
+ self.env["PORTAGE_LOGDIR"] = self.settings["target_logdir"]
def override_cbuild(self):
if "CBUILD" in self.makeconf:
@@ -1002,7 +1001,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
# We may need to create the source of the bind mount. E.g., in the
# case of an empty package cache we must create the directory that
# the binary packages will be stored into.
- source_path.mkdir(mode=0o755, exist_ok=True)
+ source_path.mkdir(mode=0o755, parents=True, exist_ok=True)
Path(target).mkdir(mode=0o755, parents=True, exist_ok=True)
diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 2cede562..39b71c34 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -25,6 +25,7 @@ valid_config_file_values = frozenset([
"sharedir",
"storedir",
"target_distdir",
+ "target_logdir",
"target_pkgdir",
"var_tmpfs_portage",
])
@@ -53,6 +54,7 @@ confdefaults = {
"shdir": "%(sharedir)s/targets",
"storedir": "/var/tmp/catalyst",
"target_distdir": "/var/cache/distfiles",
+ "target_logdir": "/var/log/portage",
"target_pkgdir": "/var/cache/binpkgs",
}