commit:     1abd94188e9e9eecd5fe16de3aeaceebac1ec4e0
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  5 01:43:19 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Sep  5 01:43:47 2023 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=1abd9418

Turn binrepos.conf into a folder with gentoobinhost.conf inside

Closes: https://bugs.gentoo.org/913660
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 catalyst/base/stagebase.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index fe307eab..3cbdf489 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1200,9 +1200,11 @@ class StageBase(TargetBase, ClearBase, GenBase):
             # Write out binrepos.conf (for the chroot)
             binrpath = normpath(self.settings["chroot_path"] +
                                 self.settings["binrepos_conf"])
+            Path(binrpath).mkdir(mode=0o755, parents=True, exist_ok=True)
 
-            with open(binrpath, "w") as myb:
-                log.notice("Writing the stage binrepos.conf to: %s" % binrpath)
+            binrfile = binrpath + "/gentoobinhost.conf"
+            with open(binrfile, "w") as myb:
+                log.notice("Writing the stage binrepo config to: %s" % 
binrfile)
                 myb.write("# These settings were set by the catalyst build 
script "
                         "that automatically\n# built this stage.\n")
                 myb.write("# Please consider using a local mirror.\n\n")
@@ -1211,8 +1213,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
                 myb.write("sync-uri = " + self.settings["binhost"] + \
                         self.settings["binrepo_path"] + "\n")
 
-        return
-
     def fsscript(self):
         if "autoresume" in self.settings["options"] \
                 and self.resume.is_enabled("fsscript"):

Reply via email to