public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2022-11-22 21:19 Matt Turner
  2022-11-28 20:38 ` [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
  0 siblings, 1 reply; 144+ messages in thread
From: Matt Turner @ 2022-11-22 21:19 UTC (permalink / raw
  To: gentoo-commits

commit:     aa52470e86ebd0578c379813a9144611c97431a8
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 22 03:26:59 2022 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Nov 22 21:19:03 2022 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=aa52470e

catalyst: Use correct arch setting for setarch testing

Previously we were testing against the 'host' or subarchitecture (e.g.
i486) instead of the architecture (e.g. x86). This manifests on x86
builds on x86_64; on ppc on ppc64 and sparc on sparc64 the arch and
subarch values happen to line up.

Fixes: cd58b37b ("catalyst: Access setarch data correctly")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 5a3bd375..732c5939 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -129,7 +129,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
                 # Search for a subarchitecture in each arch in the arch_config
                 for arch in [x for x in arch_config if x.startswith(name) and host in arch_config[x]]:
                     self.settings.update(arch_config[arch][host])
-                    setarch = arch_config.get('setarch', {}).get(host, {})
+                    setarch = arch_config.get('setarch', {}).get(arch, {})
                     break
                 else:
                     # Didn't find a matching subarchitecture, keep searching


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2024-08-22 18:39 Ben Kohler
  0 siblings, 0 replies; 144+ messages in thread
From: Ben Kohler @ 2024-08-22 18:39 UTC (permalink / raw
  To: gentoo-commits

commit:     836744689e0cc09a1a0a89b7272142d5dfb99bd4
Author:     Ian Jordan <immoloism <AT> gmail <DOT> com>
AuthorDate: Tue Jul 30 18:27:34 2024 +0000
Commit:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Thu Aug 22 18:39:53 2024 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=83674468

Add Dist-kernel kconfig support

Based on the orginal patch by oldfashionedcow to add the abilty for
a user to set a custom kconfig for their livecd to be moved to
/etc/kernel/config.d/ before sys-kernel/gentoo-kernel is emerged.

Syntax is the same as the one used for Genkernel kconfigs.

Closes: https://bugs.gentoo.org/936676

Co-authored-by: Rahul Sandh <rahul <AT> sandhuservices.dev>
Co-authored-by: Christopher Fore <csfore <AT> posteo.net>

Signed-off-by: Ian Jordan <immoloism <AT> gmail.com>
Closes: https://github.com/gentoo/catalyst/pull/21
Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>

 catalyst/base/stagebase.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index a23b1d90..8a3d2af6 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1707,8 +1707,13 @@ class StageBase(TargetBase, ClearBase, GenBase):
                 raise CatalystError("Can't find kernel config: %s" %
                                     self.settings[key])
 
-            shutil.copy(self.settings[key],
-                        self.settings['chroot_path'] + '/var/tmp/' + kname + '.config')
+            if "boot/kernel/" + kname + "/distkernel" in self.settings:
+                os.makedirs(self.settings['chroot_path'] + '/etc//kernel/config.d')
+                shutil.copy(self.settings[key],
+                            self.settings['chroot_path'] + '/etc//kernel/config.d')
+            else:
+                shutil.copy(self.settings[key],
+                            self.settings['chroot_path'] + '/var/tmp/' + kname + '.config')
 
     def _copy_initramfs_overlay(self, kname):
         key = 'boot/kernel/' + kname + '/initramfs_overlay'


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2024-08-03  9:06 Andreas K. Hüttel
  0 siblings, 0 replies; 144+ messages in thread
From: Andreas K. Hüttel @ 2024-08-03  9:06 UTC (permalink / raw
  To: gentoo-commits

commit:     6356b5ab72a658635dd018c25b21ce998250f887
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Aug  3 09:04:30 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Aug  3 09:04:30 2024 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=6356b5ab

Add log.debug statements to follow profile symlink creation

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 catalyst/base/stagebase.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 82300e88..2975236e 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -888,11 +888,14 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
             # stage_path is chroot_path + root_path
             root_port_conf = Path(self.settings['stage_path'] + self.settings['port_conf'])
+            log.debug('  creating directory %s', root_port_conf)
             root_port_conf.mkdir(mode=0o755, parents=True, exist_ok=True)
 
             root_make_profile = root_port_conf / 'make.profile'
+            log.debug('  removing file %s', root_make_profile)
             root_make_profile.unlink(missing_ok=True)
 
+            log.debug('  symlinking it to %s', os.path.relpath(chroot_profile_path, root_port_conf))
             root_make_profile.symlink_to(os.path.relpath(chroot_profile_path, root_port_conf),
                                          target_is_directory=True)
 


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2024-07-30 14:12 Andreas K. Hüttel
  0 siblings, 0 replies; 144+ messages in thread
From: Andreas K. Hüttel @ 2024-07-30 14:12 UTC (permalink / raw
  To: gentoo-commits

commit:     a031478a9c996d8a3a9085ed6eed41d8737776ed
Author:     Doug Freed <dwfreed <AT> mtu <DOT> edu>
AuthorDate: Tue Jul 30 14:11:07 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Jul 30 14:11:32 2024 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=a031478a

stagebase: Create parent directories

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 catalyst/base/stagebase.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index ad7cd12e..82300e88 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -888,6 +888,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
             # stage_path is chroot_path + root_path
             root_port_conf = Path(self.settings['stage_path'] + self.settings['port_conf'])
+            root_port_conf.mkdir(mode=0o755, parents=True, exist_ok=True)
+
             root_make_profile = root_port_conf / 'make.profile'
             root_make_profile.unlink(missing_ok=True)
 


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2024-07-30 11:06 Andreas K. Hüttel
  0 siblings, 0 replies; 144+ messages in thread
From: Andreas K. Hüttel @ 2024-07-30 11:06 UTC (permalink / raw
  To: gentoo-commits

commit:     35e6088eda0c2c8197c16382f3ba29a69eea60ec
Author:     Doug Freed <dwfreed <AT> mtu <DOT> edu>
AuthorDate: Tue Jul 30 01:08:02 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Jul 30 11:06:05 2024 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=35e6088e

stagebase: create profile link for ROOT too

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 catalyst/base/stagebase.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index df2da7ef..ad7cd12e 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -883,6 +883,17 @@ class StageBase(TargetBase, ClearBase, GenBase):
         make_profile.symlink_to(os.path.relpath(chroot_profile_path, chroot_port_conf),
                                 target_is_directory=True)
 
+        if self.settings['root_path'] != '/':
+            log.info('Configuring ROOT profile link...')
+
+            # stage_path is chroot_path + root_path
+            root_port_conf = Path(self.settings['stage_path'] + self.settings['port_conf'])
+            root_make_profile = root_port_conf / 'make.profile'
+            root_make_profile.unlink(missing_ok=True)
+
+            root_make_profile.symlink_to(os.path.relpath(chroot_profile_path, root_port_conf),
+                                         target_is_directory=True)
+
     def setup_confdir(self):
         if "autoresume" in self.settings["options"] \
                 and self.resume.is_enabled("setup_confdir"):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2024-07-30 11:06 Andreas K. Hüttel
  0 siblings, 0 replies; 144+ messages in thread
From: Andreas K. Hüttel @ 2024-07-30 11:06 UTC (permalink / raw
  To: gentoo-commits

commit:     cde8a57f8c7b40e66cc6fda6f923bd8b2f21297c
Author:     Doug Freed <dwfreed <AT> mtu <DOT> edu>
AuthorDate: Tue Jul 30 00:00:40 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Jul 30 11:05:56 2024 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=cde8a57f

stagebase: clean up config_profile_link

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 catalyst/base/stagebase.py | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 2dcf6d71..df2da7ef 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -864,18 +864,23 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
     def config_profile_link(self):
         log.info('Configuring profile link...')
-        make_profile = Path(self.settings['chroot_path'] + self.settings['port_conf'],
-                            'make.profile')
+
+        chroot_port_conf = Path(self.settings['chroot_path'] + self.settings['port_conf'])
+        make_profile = chroot_port_conf / 'make.profile'
         make_profile.unlink(missing_ok=True)
+
         try:
             repo_name, target_profile = self.settings['target_profile'].split(":", 1)
         except ValueError:
             repo_name = self.settings['repo_name']
             target_profile = self.settings['target_profile']
-        make_profile.symlink_to(Path('../..' + self.settings['repo_basedir'],
-                                     repo_name,
-                                     'profiles',
-                                     target_profile),
+
+        chroot_profile_path = Path(self.settings['chroot_path'] + self.settings['repo_basedir'],
+                                   repo_name,
+                                   'profiles',
+                                   target_profile)
+
+        make_profile.symlink_to(os.path.relpath(chroot_profile_path, chroot_port_conf),
                                 target_is_directory=True)
 
     def setup_confdir(self):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2024-06-09 16:50 Andreas K. Hüttel
  0 siblings, 0 replies; 144+ messages in thread
From: Andreas K. Hüttel @ 2024-06-09 16:50 UTC (permalink / raw
  To: gentoo-commits

commit:     f1bc9478e0bd010919c476ca0fca9920f17a331a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  5 10:06:57 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Jun  9 16:50:39 2024 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f1bc9478

stagebase: tweak bindist comment emitted into make.conf

'USE' is more idiomatic.

Signed-off-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 1ebb2245..34e1b6d1 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1151,7 +1151,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
             myusevars = []
             if "bindist" in self.settings["options"]:
                 myf.write(
-                    "\n# NOTE: This stage was built with the bindist Use flag enabled\n")
+                    "\n# NOTE: This stage was built with the bindist USE flag enabled\n")
             if setup or "sticky-config" in self.settings["options"]:
                 myusevars.extend(self.settings["catalyst_use"])
                 log.notice("STICKY-CONFIG is enabled")


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2024-06-07 21:45 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2024-06-07 21:45 UTC (permalink / raw
  To: gentoo-commits

commit:     31e62c9ca151083e0b84bab8f478bb27592c5086
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Tue May 21 16:28:52 2024 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Jun  7 21:45:23 2024 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=31e62c9c

Explicitly declare repo as main when it does not match the default main

Otherwise Portage complains about PORTDIR not being set.

Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
Closes: https://github.com/gentoo/catalyst/pull/13
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 4bcab30c..1ebb2245 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -921,6 +921,12 @@ class StageBase(TargetBase, ClearBase, GenBase):
                 continue
 
             config = configparser.ConfigParser()
+
+            # If default is present but does not match this repo's location,
+            # then we need to explicitly set it as the main repo.
+            if default is not None:
+                config['DEFAULT'] = {'main-repo': name}
+
             config[name] = {'location': location}
             self.write_repo_conf(name, config)
 


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2024-03-03 18:50 Andreas K. Hüttel
  0 siblings, 0 replies; 144+ messages in thread
From: Andreas K. Hüttel @ 2024-03-03 18:50 UTC (permalink / raw
  To: gentoo-commits

commit:     1314c345cacfce8a5cd6036d66da0b5ab65c6adb
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Thu Feb 22 20:40:26 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Mar  3 18:50:45 2024 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=1314c345

avoid chrooting and running the $PATH to bash from outside the chroot

The API filename for bash is /bin/bash and that is where it is
guaranteed to be. On merged-usr systems, `shutil.which('bash')` will
search PATH and maybe find /usr/bin/bash first, since it is resolved as
a symlink, but that path will then fail in the chroot if the chroot is
not merged-usr.

Even on merged-usr systems, app-shells/bash always, always, always
installs to /bin/bash and lets portage handle the symlink.

Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 catalyst/base/stagebase.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index dd00af45..4bcab30c 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1458,11 +1458,12 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
     def enter_chroot(self):
         chroot = command('chroot')
-        bash = command('bash')
+        # verify existence only
+        command(os.path.join(self.settings['chroot_path'], '/bin/bash'))
 
         log.notice("Entering chroot")
         try:
-            cmd([chroot, self.settings['chroot_path'], bash, '-l'],
+            cmd([chroot, self.settings['chroot_path'], '/bin/bash', '-l'],
                 env=self.env)
         except CatalystError:
             pass


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2023-12-24 21:42 Andreas K. Hüttel
  0 siblings, 0 replies; 144+ messages in thread
From: Andreas K. Hüttel @ 2023-12-24 21:42 UTC (permalink / raw
  To: gentoo-commits

commit:     e9d2b62ea8300aae67a483c7e260d3ff7bc80fc5
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 24 21:17:59 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Dec 24 21:41:33 2023 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e9d2b62e

base/stagebase.py: Do not touch subarch if chost is set

Currently, if you set chost in a stage1 spec file, catalyst resets the
subarch to the first part of the triple (i.e. aarch64 for arm64).

With this change, it leaves the subarch alone at the value defined
in the spec file. This makes it much easier to override CHOST for,
say, musl, without having to provide a separate section in arch/* ...

Impact of the commit on the existing releng stage1 specs:
amd64, arm64, x86, ppc, ppc64, ppc64le are all fine (the definitions
are idencal, or subarch = first part of triplet)
power9le is funny because right now the chost (powerpc64le) resets the
subarch and drops the power9le optimizations, so there the commit is
actually an improvement!

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 3cbdf489..dd00af45 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -105,10 +105,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
         self.makeconf = {}
 
-        if "chost" in self.settings:
-            host = self.settings["chost"].split("-")[0]
-        else:
-            host = self.settings["subarch"]
+        host = self.settings["subarch"]
         self.settings["hostarch"] = host
 
         if "cbuild" in self.settings:


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2023-09-05  1:44 Andreas K. Hüttel
  0 siblings, 0 replies; 144+ messages in thread
From: Andreas K. Hüttel @ 2023-09-05  1:44 UTC (permalink / raw
  To: gentoo-commits

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"):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2023-07-01 19:27 Andreas K. Hüttel
  0 siblings, 0 replies; 144+ messages in thread
From: Andreas K. Hüttel @ 2023-07-01 19:27 UTC (permalink / raw
  To: gentoo-commits

commit:     6272f501c0101a49fcb35f60ba75778ded696b67
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Jul  1 17:39:01 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Jul  1 17:45:11 2023 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=6272f501

stagebase: Add blank linkes in make.conf (e.g. before CHOST block)

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 812ac4c8..65f4306e 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1114,13 +1114,13 @@ class StageBase(TargetBase, ClearBase, GenBase):
                               % (flags, self.settings[flags]))
 
             if "CBUILD" in self.settings:
-                myf.write("# This should not be changed unless you know exactly"
+                myf.write("\n# This should not be changed unless you know exactly"
                           " what you are doing.  You\n# should probably be "
                           "using a different stage, instead.\n")
                 myf.write('CBUILD="' + self.settings["CBUILD"] + '"\n')
 
             if "CHOST" in self.settings:
-                myf.write("# WARNING: Changing your CHOST is not something "
+                myf.write("\n# WARNING: Changing your CHOST is not something "
                           "that should be done lightly.\n# Please consult "
                           "https://wiki.gentoo.org/wiki/Changing_the_CHOST_variable "
                           "before changing.\n")


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2023-05-10 18:10 Ben Kohler
  0 siblings, 0 replies; 144+ messages in thread
From: Ben Kohler @ 2023-05-10 18:10 UTC (permalink / raw
  To: gentoo-commits

commit:     d7e25003b3657b8fb9dd69787efbdb6dec6cb491
Author:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
AuthorDate: Wed May 10 18:10:11 2023 +0000
Commit:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Wed May 10 18:10:11 2023 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d7e25003

stagebase.py: switch to LC_MESSAGES=C.utf8 in make.conf

Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 732c5939..812ac4c8 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1173,7 +1173,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
                 '\n'
                 '# This sets the language of build output to English.\n'
                 '# Please keep this setting intact when reporting bugs.\n'
-                'LC_MESSAGES=C\n')
+                'LC_MESSAGES=C.utf8\n')
 
     def fsscript(self):
         if "autoresume" in self.settings["options"] \


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/
@ 2022-11-20  0:21 Matt Turner
  2022-05-13 17:45 ` [gentoo-commits] proj/catalyst:master " Matt Turner
  0 siblings, 1 reply; 144+ messages in thread
From: Matt Turner @ 2022-11-20  0:21 UTC (permalink / raw
  To: gentoo-commits

commit:     430a699ca9262b25fea2e8e2f0ce4eea56e6c898
Author:     Daniel Cordero <gentoo.catalyst <AT> 0xdc <DOT> io>
AuthorDate: Thu Apr 21 07:08:25 2022 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri May 13 17:42:41 2022 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=430a699c

catalyst/stage4: don't split a single entry

A single entry in users is one user who could have multiple groups.

Fixes: 5be6069b ("catalyst: support 3 new options")
Signed-off-by: Daniel Cordero <gentoo.catalyst <AT> 0xdc.io>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 7e6b9e32..d4875491 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -602,7 +602,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
         if users in self.settings:
             self.settings["users"] = self.settings[users]
             if isinstance(self.settings[users], str):
-                self.settings["users"] = self.settings[users].split(",")
+                self.settings["users"] = [self.settings[users]]
             del self.settings[users]
         else:
             self.settings["users"] = []


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/
@ 2022-11-20  0:21 Matt Turner
  2022-04-20 23:26 ` [gentoo-commits] proj/catalyst:master " Matt Turner
  0 siblings, 1 reply; 144+ messages in thread
From: Matt Turner @ 2022-11-20  0:21 UTC (permalink / raw
  To: gentoo-commits

commit:     1c46e66ef2c9ab24f383eebd3c6cb1d02492b8fc
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 20 23:23:07 2022 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Apr 20 23:23:07 2022 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=1c46e66e

catalyst: Replace a tab

Fixes: 5be6069b ("catalyst: support 3 new options")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 76feb5f0..5c7e9adb 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -597,7 +597,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
             self.settings["groups"] = []
         log.info('groups to create: %s' % self.settings["groups"])
 
-	def set_users(self):
+    def set_users(self):
         users = self.settings["spec_prefix"] + "/users"
         if users in self.settings:
             if isinstance(self.settings[users], str):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2022-11-14 14:11 Andreas K. Hüttel
  0 siblings, 0 replies; 144+ messages in thread
From: Andreas K. Hüttel @ 2022-11-14 14:11 UTC (permalink / raw
  To: gentoo-commits

commit:     f2263466c535d0019be0bcbf1f08128b2399d6ea
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 14 00:05:58 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Nov 14 00:09:33 2022 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f2263466

stagebase: Also clean out profile/package.use.force profile/package.use.mask

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index bcf596ae..5a3bd375 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1230,7 +1230,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
                 "sticky-config" not in self.settings["options"]):
             log.debug("clean(), portage_preix = %s, no sticky-config",
                       self.settings["portage_prefix"])
-            for _dir in "package.accept_keywords", "package.keywords", "package.mask", "package.unmask", "package.use", "package.env", "env":
+            for _dir in "package.accept_keywords", "package.keywords", "package.mask", "package.unmask", "package.use", "package.env", "env", "profile/package.use.force", "profile/package.use.mask":
                 target = pjoin(self.settings["stage_path"],
                                "etc/portage/%s" % _dir,
                                self.settings["portage_prefix"])


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2022-11-13  2:18 Andreas K. Hüttel
  0 siblings, 0 replies; 144+ messages in thread
From: Andreas K. Hüttel @ 2022-11-13  2:18 UTC (permalink / raw
  To: gentoo-commits

commit:     64d2993d8ca38cefd76df7a69a44accd60284cd4
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 12 20:42:03 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Nov 13 02:17:29 2022 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=64d2993d

Allow "interpreter" parameter as space-separated list of files

I added this feature to the 3.0 branch long ago and forgot about it.
Needed for multilib emulation, e.g., qemu-mips qemu-mipsn32 qemu-mips64
Tested on demeter "in production"

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index eb869c70..bcf596ae 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1036,26 +1036,24 @@ class StageBase(TargetBase, ClearBase, GenBase):
         shutil.copy('/etc/resolv.conf',
                     self.settings['chroot_path'] + '/etc/')
 
-        # Copy over the binary interpreter (qemu), if applicable; note that it's given
-        # as full path and goes to the same place in the chroot
+        # Copy over the binary interpreter(s) (qemu), if applicable; note that they are given
+        # as space-separated list of full paths and go to the same place in the chroot
         if "interpreter" in self.settings:
-            if not os.path.exists(self.settings["interpreter"]):
-                raise CatalystError(
-                    "Can't find interpreter " +
-                    self.settings["interpreter"],
-                    print_traceback=True)
+            if isinstance(self.settings["interpreter"], str):
+                myints = [self.settings["interpreter"]]
+            else:
+                myints = self.settings["interpreter"]
 
-            log.notice('Copying binary interpreter %s into chroot',
-                       self.settings['interpreter'])
+            for myi in myints:
+                if not os.path.exists(myi):
+                    raise CatalystError("Can't find interpreter " + myi, print_traceback=True)
 
-            if os.path.exists(self.settings['chroot_path'] + '/' + self.settings['interpreter']):
-                os.rename(
-                    self.settings['chroot_path'] +
-                    '/' + self.settings['interpreter'],
-                    self.settings['chroot_path'] + '/' + self.settings['interpreter'] + '.catalyst')
+                log.notice('Copying binary interpreter %s into chroot', myi)
 
-            shutil.copy(self.settings['interpreter'],
-                        self.settings['chroot_path'] + '/' + self.settings['interpreter'])
+                if os.path.exists(self.settings['chroot_path'] + '/' + myi):
+                    os.rename(self.settings['chroot_path'] + '/' + myi, self.settings['chroot_path'] + '/' + myi + '.catalyst')
+
+                shutil.copy(myi, self.settings['chroot_path'] + '/' + myi)
 
         # Copy over the envscript, if applicable
         if "envscript" in self.settings:
@@ -1214,16 +1212,18 @@ class StageBase(TargetBase, ClearBase, GenBase):
         if os.path.exists(hosts_file + '.catalyst'):
             os.rename(hosts_file + '.catalyst', hosts_file)
 
-        # optionally clean up binary interpreter
+        # optionally clean up binary interpreter(s)
         if "interpreter" in self.settings:
-            if os.path.exists(self.settings['chroot_path'] + '/' + self.settings['interpreter'] + '.catalyst'):
-                os.rename(
-                    self.settings['chroot_path'] + '/' +
-                    self.settings['interpreter'] + '.catalyst',
-                    self.settings['chroot_path'] + '/' + self.settings['interpreter'])
+            if isinstance(self.settings["interpreter"], str):
+                myints = [self.settings["interpreter"]]
             else:
-                os.remove(
-                    self.settings['chroot_path'] + '/' + self.settings['interpreter'])
+                myints = self.settings["interpreter"]
+
+            for myi in myints:
+                if os.path.exists(self.settings['chroot_path'] + '/' + myi + '.catalyst'):
+                    os.rename(self.settings['chroot_path'] + '/' + myi + '.catalyst', self.settings['chroot_path'] + '/' + myi)
+                else:
+                    os.remove(self.settings['chroot_path'] + '/' + myi)
 
         # optionally clean up portage configs
         if ("portage_prefix" in self.settings and


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2022-05-13 17:45 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2022-05-13 17:45 UTC (permalink / raw
  To: gentoo-commits

commit:     a21d590f878bf63510aa5692dd5668a56fa9f2db
Author:     Daniel Cordero <gentoo.catalyst <AT> 0xdc <DOT> io>
AuthorDate: Mon May  9 11:20:47 2022 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri May 13 17:42:57 2022 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=a21d590f

catalyst/stage4: improve log message

When creating a user with no additional groups, don't print a misleading
message saying the user will be created with an equals sign in the
username.

Signed-off-by: Daniel Cordero <gentoo.catalyst <AT> 0xdc.io>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index d4875491..eb869c70 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -945,9 +945,11 @@ class StageBase(TargetBase, ClearBase, GenBase):
                 log.debug("users: '=' separator not found on line " + x)
                 log.debug("users: missing separator means no groups found")
             uacmd = ["useradd", "-R", self.settings['chroot_path'], "-m", x]
+            msg_create_user = "Creating user: '%s'" % usr
             if grp != '':
                 uacmd = ["useradd", "-R", self.settings['chroot_path'], "-m", "-G", grp, usr]
-            log.notice("Creating user: '%s'", f"{usr}={grp}")
+                msg_create_user = "Creating user: '%s' in group(s): %s" % usr, grp
+            log.notice(msg_create_user)
             cmd(uacmd, env=self.env)
 
     def ssh_public_keys(self):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2022-05-13 17:45 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2022-05-13 17:45 UTC (permalink / raw
  To: gentoo-commits

commit:     ae7d28b81ddc5285a210e927bec563065fda7f16
Author:     Daniel Cordero <gentoo.catalyst <AT> 0xdc <DOT> io>
AuthorDate: Thu Apr 21 07:08:23 2022 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri May 13 17:41:47 2022 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ae7d28b8

catalyst/stage4: fix handling of groups, users and keys

Previously, the set_*() functions would always set the result of the
toml parsing as the setting. Instead, only override it if it is a
string.

Fixes: 5be6069b ("catalyst: support 3 new options")
Signed-off-by: Daniel Cordero <gentoo.catalyst <AT> 0xdc.io>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 5c7e9adb..1d71c59d 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -589,9 +589,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
     def set_groups(self):
         groups = self.settings["spec_prefix"] + "/groups"
         if groups in self.settings:
+            self.settings["groups"] = self.settings[groups]
             if isinstance(self.settings[groups], str):
                 self.settings["groups"] = self.settings[groups].split(",")
-            self.settings["groups"] = self.settings[groups]
             del self.settings[groups]
         else:
             self.settings["groups"] = []
@@ -600,9 +600,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
     def set_users(self):
         users = self.settings["spec_prefix"] + "/users"
         if users in self.settings:
+            self.settings["users"] = self.settings[users]
             if isinstance(self.settings[users], str):
                 self.settings["users"] = self.settings[users].split(",")
-            self.settings["users"] = self.settings[users]
             del self.settings[users]
         else:
             self.settings["users"] = []
@@ -611,9 +611,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
     def set_ssh_public_keys(self):
         ssh_public_keys = self.settings["spec_prefix"] + "/ssh_public_keys"
         if ssh_public_keys in self.settings:
+            self.settings["ssh_public_keys"] = self.settings[ssh_public_keys]
             if isinstance(self.settings[ssh_public_keys], str):
                 self.settings["ssh_public_keys"] = self.settings[ssh_public_keys].split(",")
-            self.settings["ssh_public_keys"] = self.settings[ssh_public_keys]
             del self.settings[ssh_public_keys]
         else:
             self.settings["ssh_public_keys"] = []


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:stage4-user-groups-fixes commit in: catalyst/base/
@ 2022-05-13 17:43 Matt Turner
  2022-05-13 17:45 ` [gentoo-commits] proj/catalyst:master " Matt Turner
  0 siblings, 1 reply; 144+ messages in thread
From: Matt Turner @ 2022-05-13 17:43 UTC (permalink / raw
  To: gentoo-commits

commit:     214bb3d849d5bf7ce2314aab1858ed6e72b28108
Author:     Daniel Cordero <gentoo.catalyst <AT> 0xdc <DOT> io>
AuthorDate: Thu Apr 21 07:08:24 2022 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri May 13 17:42:15 2022 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=214bb3d8

catalyst/stage4: don't run split on a list

"groups" has been normalised into a list and does not have a split()
method.

Fixes: 5be6069b ("catalyst: support 3 new options")
Signed-off-by: Daniel Cordero <gentoo.catalyst <AT> 0xdc.io>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 1d71c59d..7e6b9e32 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -931,7 +931,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
                         env=self.env)
 
     def groups(self):
-        for x in self.settings["groups"].split():
+        for x in self.settings["groups"]:
             log.notice("Creating group: '%s'", x)
             cmd(["groupadd", "-R", self.settings['chroot_path'], x], env=self.env)
 


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2022-04-02 23:50 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2022-04-02 23:50 UTC (permalink / raw
  To: gentoo-commits

commit:     5be6069bcbd5a7fa3f114f28366597bc5ddbb891
Author:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  8 21:02:55 2022 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Apr  2 23:50:16 2022 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5be6069b

catalyst: support 3 new options

* stage4/groups: create a a list of groups.
* stage4/users: create a list of users. users can also be added to
  groups using the "foo.bar=wheel,audio,baz" format.
* stage4/ssh_public_keys: copy an SSH public key into the stage4 user's home
  (.ssh/authorized_keys) and set the file permission to 0644.

Bug: https://bugs.gentoo.org/236905
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 70 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index de1e30ef..76feb5f0 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -201,6 +201,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
         self.set_packages()
         self.set_rm()
         self.set_linuxrc()
+        self.set_groups()
+        self.set_users()
+        self.set_ssh_public_keys()
         self.set_busybox_config()
         self.set_overlay()
         self.set_repos()
@@ -583,6 +586,39 @@ class StageBase(TargetBase, ClearBase, GenBase):
                     self.settings[self.settings["spec_prefix"] + "/linuxrc"]
                 del self.settings[self.settings["spec_prefix"] + "/linuxrc"]
 
+    def set_groups(self):
+        groups = self.settings["spec_prefix"] + "/groups"
+        if groups in self.settings:
+            if isinstance(self.settings[groups], str):
+                self.settings["groups"] = self.settings[groups].split(",")
+            self.settings["groups"] = self.settings[groups]
+            del self.settings[groups]
+        else:
+            self.settings["groups"] = []
+        log.info('groups to create: %s' % self.settings["groups"])
+
+	def set_users(self):
+        users = self.settings["spec_prefix"] + "/users"
+        if users in self.settings:
+            if isinstance(self.settings[users], str):
+                self.settings["users"] = self.settings[users].split(",")
+            self.settings["users"] = self.settings[users]
+            del self.settings[users]
+        else:
+            self.settings["users"] = []
+        log.info('users to create: %s' % self.settings["users"])
+
+    def set_ssh_public_keys(self):
+        ssh_public_keys = self.settings["spec_prefix"] + "/ssh_public_keys"
+        if ssh_public_keys in self.settings:
+            if isinstance(self.settings[ssh_public_keys], str):
+                self.settings["ssh_public_keys"] = self.settings[ssh_public_keys].split(",")
+            self.settings["ssh_public_keys"] = self.settings[ssh_public_keys]
+            del self.settings[ssh_public_keys]
+        else:
+            self.settings["ssh_public_keys"] = []
+        log.info('ssh public keys to copy: %s' % self.settings["ssh_public_keys"])
+
     def set_busybox_config(self):
         if self.settings["spec_prefix"] + "/busybox_config" in self.settings:
             if isinstance(self.settings[self.settings['spec_prefix'] + '/busybox_config'], str):
@@ -894,6 +930,40 @@ class StageBase(TargetBase, ClearBase, GenBase):
                     cmd(['rsync', '-a', x + '/', self.settings['stage_path']],
                         env=self.env)
 
+    def groups(self):
+        for x in self.settings["groups"].split():
+            log.notice("Creating group: '%s'", x)
+            cmd(["groupadd", "-R", self.settings['chroot_path'], x], env=self.env)
+
+    def users(self):
+        for x in self.settings["users"]:
+            usr, grp = '', ''
+            try:
+                usr, grp = x.split("=")
+            except ValueError:
+                usr = x
+                log.debug("users: '=' separator not found on line " + x)
+                log.debug("users: missing separator means no groups found")
+            uacmd = ["useradd", "-R", self.settings['chroot_path'], "-m", x]
+            if grp != '':
+                uacmd = ["useradd", "-R", self.settings['chroot_path'], "-m", "-G", grp, usr]
+            log.notice("Creating user: '%s'", f"{usr}={grp}")
+            cmd(uacmd, env=self.env)
+
+    def ssh_public_keys(self):
+        for x in self.settings["ssh_public_keys"]:
+            usr, pub_key_src = '', ''
+            try:
+                usr, pub_key_src = x.split("=")
+            except ValueError:
+                raise CatalystError(f"ssh_public_keys: '=' separator not found on line {x}")
+            log.notice("Copying SSH public key for user: '%s'", usr)
+            pub_key_dest = self.settings['chroot_path'] + f"/home/{usr}/.ssh/authorized_keys"
+            cpcmd = ["cp", "-av", pub_key_src, pub_key_dest]
+            cmd(cpcmd, env=self.env)
+            chcmd = ["chmod", "0644", pub_key_dest]
+            cmd(chcmd, env=self.env)
+
     def bind(self):
         for x in [x for x in self.mount if self.mount[x]['enable']]:
             if str(self.mount[x]['source']) == 'config':


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/
@ 2021-06-10  0:48 Matt Turner
  2021-03-25  3:03 ` [gentoo-commits] proj/catalyst:master " Matt Turner
  0 siblings, 1 reply; 144+ messages in thread
From: Matt Turner @ 2021-06-10  0:48 UTC (permalink / raw
  To: gentoo-commits

commit:     dc22f3540c6879e88e5f3bd2ff8999066387d3ea
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 25 03:02:39 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Mar 25 03:02:39 2021 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=dc22f354

catalyst: Fix indentation

Fixes: 48338534 ("Add option to generate BSD-style tagged hashes ...")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

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

diff --git a/catalyst/base/genbase.py b/catalyst/base/genbase.py
index 4a4c3efa..b89e7c93 100644
--- a/catalyst/base/genbase.py
+++ b/catalyst/base/genbase.py
@@ -26,9 +26,9 @@ class GenBase():
         filename = os.path.split(filepath)[1]
 
         if self.settings['digest_format'] == 'bsd':
-                return f'# {name.upper()} HASH\n{name.upper()} ({filename}) = {h.hexdigest()}\n'
+            return f'# {name.upper()} HASH\n{name.upper()} ({filename}) = {h.hexdigest()}\n'
         else:
-                return f'# {name.upper()} HASH\n{h.hexdigest()}  {filename}\n'
+            return f'# {name.upper()} HASH\n{h.hexdigest()}  {filename}\n'
 
     def gen_contents_file(self, path):
         c = self.settings['contents_map']


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/
@ 2021-06-10  0:48 Matt Turner
  2021-03-09 16:18 ` [gentoo-commits] proj/catalyst:master " Matt Turner
  0 siblings, 1 reply; 144+ messages in thread
From: Matt Turner @ 2021-06-10  0:48 UTC (permalink / raw
  To: gentoo-commits

commit:     91dba2e6199b24c7d0b52b8bd6204b4a5f6e5137
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  9 16:17:33 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Mar  9 16:17:33 2021 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=91dba2e6

catalyst: Remove tabs

Fixes: 48338534 ("Add option to generate BSD-style tagged hashes ...")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

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

diff --git a/catalyst/base/genbase.py b/catalyst/base/genbase.py
index 52418877..4a4c3efa 100644
--- a/catalyst/base/genbase.py
+++ b/catalyst/base/genbase.py
@@ -25,10 +25,10 @@ class GenBase():
 
         filename = os.path.split(filepath)[1]
 
-	if self.settings['digest_format'] == 'bsd':
-		return f'# {name.upper()} HASH\n{name.upper()} ({filename}) = {h.hexdigest()}\n'
-	else:
-		return f'# {name.upper()} HASH\n{h.hexdigest()}  {filename}\n'
+        if self.settings['digest_format'] == 'bsd':
+                return f'# {name.upper()} HASH\n{name.upper()} ({filename}) = {h.hexdigest()}\n'
+        else:
+                return f'# {name.upper()} HASH\n{h.hexdigest()}  {filename}\n'
 
     def gen_contents_file(self, path):
         c = self.settings['contents_map']


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/
@ 2021-06-10  0:48 Matt Turner
  2021-02-21  2:05 ` [gentoo-commits] proj/catalyst:master " Matt Turner
  0 siblings, 1 reply; 144+ messages in thread
From: Matt Turner @ 2021-06-10  0:48 UTC (permalink / raw
  To: gentoo-commits

commit:     c1f5707a9c9f27f730aad908c8f3c86075201fc9
Author:     Daniel Cordero <catalyst <AT> 0xdc <DOT> io>
AuthorDate: Thu Feb  4 11:07:19 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Feb 21 02:05:39 2021 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=c1f5707a

catalyst: Remove /etc/machine-id in all stages

Machine IDs are unique per installation, but if they are retained in a
stage tarball, all installations from that stage share the same machine
id.

Signed-off-by: Daniel Cordero <catalyst <AT> 0xdc.io>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index bc0eccd0..a4da7eb3 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -465,6 +465,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
     def set_cleanables(self):
         self.settings['cleanables'] = [
+            "/etc/machine-id",
             "/etc/resolv.conf",
             "/var/tmp/*",
             "/tmp/*",


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/
@ 2021-06-10  0:48 Matt Turner
  2021-02-20 21:27 ` [gentoo-commits] proj/catalyst:master " Matt Turner
  0 siblings, 1 reply; 144+ messages in thread
From: Matt Turner @ 2021-06-10  0:48 UTC (permalink / raw
  To: gentoo-commits

commit:     5f34226550e221921189ca2184a0afe2de1e8821
Author:     Felix Bier <Felix.Bier <AT> rohde-schwarz <DOT> com>
AuthorDate: Thu Feb  4 00:45:27 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Feb 20 21:27:29 2021 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5f342265

Drop PORTDIR from make.conf

This commit drops PORTDIR from being included in the generated
make.conf. The variable is no longer needed, since the existing code
will now generate a repos.conf entry for the main repo when needed
(i.e. when the location is non-default, which is the same condition
that was applied for PORTDIR in the code removed by this commit).

The PORTDIR variable is considered deprecated in favor of
repos.conf entries (reference: https://wiki.gentoo.org/wiki/PORTDIR).

Signed-off-by: Felix Bier <felix.bier <AT> rohde-schwarz.com>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 97e2318c..bc0eccd0 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1092,12 +1092,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
                     myf.write(hostuseexpand + '="' +
                               ' '.join(myuseexpandvars[hostuseexpand]) + '"\n')
 
-            # Write non-default PORTDIR/DISTDIR/PKGDIR settings to make.conf
-            if (self.settings['repo_basedir'], self.settings['repo_name']) != \
-               (confdefaults['repo_basedir'], confdefaults['repo_name']):
-                myf.write('PORTDIR="%s/%s"\n' % (self.settings['repo_basedir'],
-                                                 self.settings['repo_name']))
-
             for x in ['target_distdir', 'target_pkgdir']:
                 if self.settings[x] != confdefaults[x]:
                     varname = x.split('_')[1].upper()


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2021-03-25  3:03 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2021-03-25  3:03 UTC (permalink / raw
  To: gentoo-commits

commit:     7c4d1c5f3aab4a32795797332f33d5a759f72a9d
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 25 03:02:53 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Mar 25 03:02:53 2021 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=7c4d1c5f

catalyst: Remove @staticmethod from generate_hash()

Fixes: 48338534 ("Add option to generate BSD-style tagged hashes ...")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/genbase.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/catalyst/base/genbase.py b/catalyst/base/genbase.py
index b89e7c93..6d039a8f 100644
--- a/catalyst/base/genbase.py
+++ b/catalyst/base/genbase.py
@@ -12,8 +12,7 @@ class GenBase():
     def __init__(self, myspec):
         self.settings = myspec
 
-    @staticmethod
-    def generate_hash(filepath, name):
+    def generate_hash(self, filepath, name):
         h = hashlib.new(name)
 
         with open(filepath, 'rb') as f:


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2021-03-06 16:58 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2021-03-06 16:58 UTC (permalink / raw
  To: gentoo-commits

commit:     71037a931ff23141875c40d37605e8614a31077e
Author:     Daniel Cordero <catalyst <AT> 0xdc <DOT> io>
AuthorDate: Thu Feb 25 13:09:12 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Mar  6 16:57:09 2021 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=71037a93

catalyst: Handle specifying target_profiles in repo_name:path format

Fixes: a5004005 ("catalyst: Call config_profile_link for all targets")
Signed-off-by: Daniel Cordero <catalyst <AT> 0xdc.io>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index a4da7eb3..448d6265 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -814,10 +814,15 @@ class StageBase(TargetBase, ClearBase, GenBase):
         make_profile = Path(self.settings['chroot_path'] + self.settings['port_conf'],
                             'make.profile')
         make_profile.unlink(missing_ok=True)
+        try:
+            repo_name, target_profile = self.settings['target_profile'].split(":", 1)
+        except ValueError:
+            repo_name = self.settings['repo_name']
+            target_profile = self.settings['target_profile']
         make_profile.symlink_to(Path('../..' + self.settings['repo_basedir'],
-                                     self.settings['repo_name'],
+                                     repo_name,
                                      'profiles',
-                                     self.settings['target_profile']),
+                                     target_profile),
                                 target_is_directory=True)
 
     def setup_confdir(self):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2021-01-28  2:41 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2021-01-28  2:41 UTC (permalink / raw
  To: gentoo-commits

commit:     2d348c2e9d063662a9fd4526d77fd28cacf233ce
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 24 01:54:16 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Jan 28 02:06:46 2021 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=2d348c2e

catalyst: Use lazy % formatting in logging functions

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 25efd4b3..28ff8fd2 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -823,7 +823,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
         repo_conf_chroot = self.to_chroot(repo_conf)
         repo_conf_chroot.parent.mkdir(mode=0o755, parents=True, exist_ok=True)
 
-        log.info(f'Creating repo config {repo_conf_chroot}.')
+        log.info('Creating repo config %s.', repo_conf_chroot)
 
         try:
             with open(repo_conf_chroot, 'w') as f:
@@ -846,10 +846,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
                     location_chroot = self.to_chroot(location)
                     location_chroot.mkdir(mode=0o755, parents=True, exist_ok=True)
 
-                    log.info(f'Copying overlay dir {x} to {location_chroot}')
+                    log.info('Copying overlay dir %s to %s', x, location_chroot)
                     cmd(f'cp -a {x}/* {location_chroot}', env=self.env)
                 else:
-                    log.warning(f'Skipping missing overlay {x}.')
+                    log.warning('Skipping missing overlay %s.', x)
 
     def root_overlay(self):
         """ Copy over the root_overlay """


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2021-01-28  2:41 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2021-01-28  2:41 UTC (permalink / raw
  To: gentoo-commits

commit:     30c40a1572e7c95c39c0367d1ed0fbc08c7adc87
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 28 02:04:26 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Jan 28 02:06:45 2021 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=30c40a15

catalyst: Fix copy-and-paste mistake

Fixes: 87b0588a ("catalyst: Add option to enter the chroot before building")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 676206ff..25efd4b3 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -95,7 +95,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
             self.chroot_setup,
             self.setup_environment,
         ]
-        if 'enter-chroot' in self.settings['options']:
+        if 'enter-chroot' in myspec['options']:
             self.build_sequence.append(self.enter_chroot)
 
         self.finish_sequence = []


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: catalyst/base/
@ 2021-01-28  2:09 Matt Turner
  2021-01-28  2:41 ` [gentoo-commits] proj/catalyst:master " Matt Turner
  0 siblings, 1 reply; 144+ messages in thread
From: Matt Turner @ 2021-01-28  2:09 UTC (permalink / raw
  To: gentoo-commits

commit:     d52c931a600cb0dc7193ccda37d39218c094b7d0
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 24 01:42:50 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Jan 28 02:06:45 2021 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d52c931a

catalyst: Remove unused import

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/targetbase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/targetbase.py b/catalyst/base/targetbase.py
index 3e338bee..ce16566b 100644
--- a/catalyst/base/targetbase.py
+++ b/catalyst/base/targetbase.py
@@ -3,7 +3,7 @@ import os
 from abc import ABC, abstractmethod
 from pathlib import Path
 
-from catalyst.support import addl_arg_parse, CatalystError
+from catalyst.support import addl_arg_parse
 
 
 class TargetBase(ABC):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: catalyst/base/
@ 2021-01-18 19:53 Matt Turner
  2020-12-27 23:15 ` [gentoo-commits] proj/catalyst:master " Matt Turner
  0 siblings, 1 reply; 144+ messages in thread
From: Matt Turner @ 2021-01-18 19:53 UTC (permalink / raw
  To: gentoo-commits

commit:     a0f348e99151277cfd52ce1343777844dae5e0e8
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 19 01:58:21 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Dec 19 02:56:52 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=a0f348e9

catalyst: Set stage_path = chroot_path + root_path

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index fe79b55a..ba6b1a1b 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -545,7 +545,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
             self.settings["catalyst_use"].append("bindist")
 
     def set_stage_path(self):
-        self.settings["stage_path"] = normpath(self.settings["chroot_path"])
+        self.settings["stage_path"] = normpath(self.settings["chroot_path"] +
+                                               self.settings["root_path"])
 
     def set_packages(self):
         pass


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/
@ 2020-12-19 19:56 Matt Turner
  2020-10-30 22:41 ` [gentoo-commits] proj/catalyst:master " Matt Turner
  0 siblings, 1 reply; 144+ messages in thread
From: Matt Turner @ 2020-12-19 19:56 UTC (permalink / raw
  To: gentoo-commits

commit:     d9010dead74470b2be148412e5b9ed9cca7a8b45
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 29 13:03:33 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Oct 30 22:40:52 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d9010dea

catalyst: Factor out run_sequence()

This is preparation for the next patch, which will run the build
sequence in a separate mount namespace.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 40 +++++++++++++++++++++++-----------------
 1 file changed, 23 insertions(+), 17 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 75c84baa..06ec8727 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1362,6 +1362,22 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
         log.debug('setup_environment(); env = %r', self.env)
 
+    def run_sequence(self, sequence):
+        for func in sequence:
+            log.notice('--- Running action sequence: %s', func)
+            sys.stdout.flush()
+            try:
+                getattr(self, func)()
+            except LockInUse:
+                log.error('Unable to aquire the lock...')
+                return False
+            except Exception:
+                log.error('Exception running action sequence %s',
+                          func, exc_info=True)
+                return False
+
+        return True
+
     def run(self):
         self.chroot_lock.write_lock()
 
@@ -1386,26 +1402,16 @@ class StageBase(TargetBase, ClearBase, GenBase):
             log.info('StageBase: run() purge')
             self.purge()
 
-        failure = False
-        for x in self.prepare_sequence + self.build_sequence + self.finish_sequence:
-            log.notice('--- Running action sequence: %s', x)
-            sys.stdout.flush()
-            try:
-                getattr(self, x)()
-            except LockInUse:
-                log.error('Unable to aquire the lock...')
-                failure = True
-                break
-            except Exception:
-                log.error('Exception running action sequence %s',
-                          x, exc_info=True)
-                failure = True
-                break
+        if not self.run_sequence(self.prepare_sequence):
+            return False
 
-        if failure:
-            log.notice('Cleaning up... Running unbind()')
+        if not self.run_sequence(self.build_sequence):
             self.unbind()
             return False
+
+        if not self.run_sequence(self.finish_sequence):
+            return False
+
         return True
 
     def unmerge(self):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-10-30 22:41 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-10-30 22:41 UTC (permalink / raw
  To: gentoo-commits

commit:     595ab9922f4ed8f88148ca7fbc9fe533db63fb4c
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 29 14:39:35 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Oct 30 22:40:52 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=595ab992

catalyst: Remove mount_safety_check()

mount_safety_check() exists to prevent bad things from happening if a
previous catalyst invocation left bind mounts active in the chroot.
E.g., a previous catalyst invocation is interrupted without unmounting
the bind mounts. A new catalyst invocation runs and cleans the old
chroot, which inadvertently deletes files outside of the chroot via the
bind mounts.

With all the mounts now inside a namespace, it is no longer possible to
have mounts accessible outside the build sequence. In fact, I think this
code has been unnecessary since commit e5a53e42 ("catalyst: create
namespaces for building").

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 37 -------------------------------------
 1 file changed, 37 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index bd5ba8d0..b9c220d0 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -638,39 +638,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
             assert self.settings[verify] == "blake2"
             self.settings.setdefault("gk_mainargs", []).append("--b2sum")
 
-    def mount_safety_check(self):
-        """
-        Check and verify that none of our paths in mypath are mounted. We don't
-        want to clean up with things still mounted, and this allows us to check.
-        Returns 1 on ok, 0 on "something is still mounted" case.
-        """
-
-        if not os.path.exists(self.settings["chroot_path"]):
-            return
-
-        log.debug('self.mount = %s', self.mount)
-        for x in [x for x in self.mount if self.mount[x]['enable']]:
-            target = normpath(self.settings['chroot_path'] +
-                              self.mount[x]['target'])
-            log.debug('mount_safety_check() x = %s %s', x, target)
-            if not os.path.exists(target):
-                continue
-
-            if ismount(target):
-                # Something is still mounted
-                try:
-                    log.warning(
-                        '%s is still mounted; performing auto-bind-umount...', target)
-                    # Try to umount stuff ourselves
-                    self.unbind()
-                    if ismount(target):
-                        raise CatalystError("Auto-unbind failed for " + target)
-                    log.notice('Auto-unbind successful...')
-                except CatalystError:
-                    raise CatalystError("Unable to auto-unbind " + target)
-
     def unpack(self):
-
         clst_unpack_hash = self.resume.get("unpack")
 
         # Set up all unpack info settings
@@ -755,8 +723,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
                     % self.settings["source_path"])
 
         if _unpack:
-            self.mount_safety_check()
-
             if invalid_chroot:
                 if "autoresume" in self.settings["options"]:
                     log.notice(
@@ -1363,9 +1329,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
     def run(self):
         self.chroot_lock.write_lock()
 
-        # Check for mounts right away and abort if we cannot unmount them
-        self.mount_safety_check()
-
         if "clear-autoresume" in self.settings["options"]:
             self.clear_autoresume()
 


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-10-30 22:41 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-10-30 22:41 UTC (permalink / raw
  To: gentoo-commits

commit:     d5747d138a0ce706d4b18be60d99ea55bdbc4120
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat May 16 21:44:37 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Oct 30 22:40:52 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d5747d13

catalyst: Use libmount for handling mounts

Handle the mounts/unmounts in all in process rather than shelling out
(pun intended!) to an external program.

While we're here, change some log.notice to log.debug since those cases
are normal and expected.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 57 ++++++++++++++++++++++++++++------------------
 1 file changed, 35 insertions(+), 22 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index e71ce344..73eacfbe 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -6,6 +6,7 @@ import sys
 
 from pathlib import Path
 
+import libmount
 import toml
 
 from snakeoil import fileutils
@@ -853,7 +854,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
             source = str(self.mount[x]['source'])
             target = self.settings['chroot_path'] + str(self.mount[x]['target'])
-            mount = ['mount']
+            fstype = ''
+            options = ''
 
             log.debug('bind %s: "%s" -> "%s"', x, source, target)
 
@@ -861,18 +863,20 @@ class StageBase(TargetBase, ClearBase, GenBase):
                 if 'var_tmpfs_portage' not in self.settings:
                     continue
 
-                mount += ['-t', 'tmpfs', '-o',
-                          f"size={self.settings['var_tmpfs_portage']}G"]
+                fstype = 'tmpfs'
+                options = f"size={self.settings['var_tmpfs_portage']}G"
             elif source == 'tmpfs':
-                mount += ['-t', 'tmpfs']
+                fstype = 'tmpfs'
             elif source == 'shm':
-                mount += ['-t', 'tmpfs', '-o', 'noexec,nosuid,nodev']
+                fstype = 'tmpfs'
+                options = 'noexec,nosuid,nodev'
             else:
                 source_path = Path(self.mount[x]['source'])
                 if source_path.suffix == '.sqfs':
-                    mount += ['-o', 'ro']
+                    fstype = 'squashfs'
+                    options = 'ro,loop'
                 else:
-                    mount.append('--bind')
+                    options = 'bind'
 
                     # 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
@@ -881,38 +885,47 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
             Path(target).mkdir(mode=0o755, parents=True, exist_ok=True)
 
-            cmd(mount + [source, target], env=self.env, fail_func=self.unbind)
+            try:
+                cxt = libmount.Context(source=source, target=target,
+                                       fstype=fstype, options=options)
+                cxt.mount()
+            except OSError as e:
+                self.unbind()
+                raise CatalystError(f"Couldn't mount: {source}, {e.strerror}")
 
     def unbind(self):
-        ouch = 0
-        mypath = self.settings["chroot_path"]
+        chroot_path = self.settings["chroot_path"]
+        umount_failed = False
 
         # Unmount in reverse order
-        for x in [x for x in reversed(self.mount) if self.mount[x]['enable']]:
-            target = normpath(mypath + self.mount[x]['target'])
-            if not os.path.exists(target):
-                log.notice('%s does not exist. Skipping', target)
+        for target in [Path(chroot_path + self.mount[x]['target'])
+                       for x in reversed(self.mount)
+                       if self.mount[x]['enable']]:
+            if not target.exists():
+                log.debug('%s does not exist. Skipping', target)
                 continue
 
             if not ismount(target):
-                log.notice('%s is not a mount point. Skipping', target)
+                log.debug('%s is not a mount point. Skipping', target)
                 continue
 
             try:
-                cmd(['umount', target], env=self.env)
-            except CatalystError:
+                cxt = libmount.Context(target=str(target))
+                cxt.umount()
+            except OSError:
                 log.warning('First attempt to unmount failed: %s', target)
                 log.warning('Killing any pids still running in the chroot')
 
                 self.kill_chroot_pids()
 
                 try:
-                    cmd(['umount', target], env=self.env)
-                except CatalystError:
-                    ouch = 1
-                    log.warning("Couldn't umount bind mount: %s", target)
+                    cxt.umount()
+                except OSError as e:
+                    umount_failed = True
+                    log.warning("Couldn't umount: %s, %s", target,
+                                e.strerror)
 
-        if ouch:
+        if umount_failed:
             # if any bind mounts really failed, then we need to raise
             # this to potentially prevent an upcoming bash stage cleanup script
             # from wiping our bind mounts.


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-10-24 22:07 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-10-24 22:07 UTC (permalink / raw
  To: gentoo-commits

commit:     da56b3e0b3080dd592874e7076c69809b2657cfb
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 23 04:09:18 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Oct 23 04:09:18 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=da56b3e0

catalyst: Fix indentation

This code was initially committed with tabs and didn't work. I ran
autopep8 on it but did not realize that the indentation was still
incorrect.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index be7b96c8..603e49d9 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1132,16 +1132,16 @@ class StageBase(TargetBase, ClearBase, GenBase):
         if os.path.exists(hosts_file + '.catalyst'):
             os.rename(hosts_file + '.catalyst', hosts_file)
 
-            # optionally clean up binary interpreter
-            if "interpreter" in self.settings:
-                    if os.path.exists(self.settings['chroot_path'] + '/' + self.settings['interpreter'] + '.catalyst'):
-                        os.rename(
-                            self.settings['chroot_path'] + '/' +
-                            self.settings['interpreter'] + '.catalyst',
-                            self.settings['chroot_path'] + '/' + self.settings['interpreter'])
-                    else:
-                        os.remove(
-                            self.settings['chroot_path'] + '/' + self.settings['interpreter'])
+        # optionally clean up binary interpreter
+        if "interpreter" in self.settings:
+            if os.path.exists(self.settings['chroot_path'] + '/' + self.settings['interpreter'] + '.catalyst'):
+                os.rename(
+                    self.settings['chroot_path'] + '/' +
+                    self.settings['interpreter'] + '.catalyst',
+                    self.settings['chroot_path'] + '/' + self.settings['interpreter'])
+            else:
+                os.remove(
+                    self.settings['chroot_path'] + '/' + self.settings['interpreter'])
 
         # optionally clean up portage configs
         if ("portage_prefix" in self.settings and


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-10-24 22:07 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-10-24 22:07 UTC (permalink / raw
  To: gentoo-commits

commit:     e13140dcbcd4d03ef3884bfb9c8af0d820fdb957
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 23 04:10:56 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Oct 23 04:10:56 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e13140dc

catalyst: Drop stray vim modeline

This was the only one in catalyst. We should have an EditorConfig file
instead.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 603e49d9..e71ce344 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1611,5 +1611,3 @@ class StageBase(TargetBase, ClearBase, GenBase):
     @staticmethod
     def _debug_pause_():
         input("press any key to continue: ")
-
-# vim: ts=4 sw=4 sta et sts=4 ai


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-10-14 17:48 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-10-14 17:48 UTC (permalink / raw
  To: gentoo-commits

commit:     5d01bda685236a8543da3a8136a4fe809f6fd9ae
Author:     Felix Bier <Felix.Bier <AT> rohde-schwarz <DOT> com>
AuthorDate: Wed Oct 14 13:38:21 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Oct 14 17:47:48 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5d01bda6

catalyst: Fix spec file USE flag parsing

In stagebase, the set_use function applies .split() to the use flags
passed from the spec file, if the value is a string. However, the
result is immediately overwritten after the if-statement. Therefore the
.split() is ineffectual.

This results in self.settings["use"] holding a string,
which is then regarded as a list of characters in write_make_conf.
This fix ensures that the result of the split is not overwritten
(matching the similar code in set_catalyst_use).

For example, setting "stage4/use: abc" in a spec file results
in USE="a b c ..." in the generated make.conf.
With this fix, the generated make.conf contains the expected
USE="abc ...".

Fixes: b30dd97d ("Unify all make.conf settings and writing")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index df1cb844..2e313bd8 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -512,7 +512,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
         if use in self.settings:
             if isinstance(self.settings[use], str):
                 self.settings["use"] = self.settings[use].split()
-            self.settings["use"] = self.settings[use]
+            else:
+                self.settings["use"] = self.settings[use]
             del self.settings[use]
         else:
             self.settings["use"] = []


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-08-15 21:11 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-08-15 21:11 UTC (permalink / raw
  To: gentoo-commits

commit:     a1efe958a133a49275b359e78cde0f222166cbcd
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 15 21:11:10 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Aug 15 21:11:10 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=a1efe958

stagebase: Run autopep8 to remove tabs

Fixes: 22f59e6d758b (Add "interpreter" parameter for qemu-user build support)
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 49 +++++++++++++++++++++++++---------------------
 1 file changed, 27 insertions(+), 22 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 345fe1db..df1cb844 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -939,23 +939,26 @@ class StageBase(TargetBase, ClearBase, GenBase):
             shutil.copy('/etc/resolv.conf',
                         self.settings['chroot_path'] + '/etc/')
 
-			# Copy over the binary interpreter (qemu), if applicable; note that it's given
-			# as full path and goes to the same place in the chroot
-			if "interpreter" in self.settings:
-				if not os.path.exists(self.settings["interpreter"]):
-					raise CatalystError(
-						"Can't find interpreter " + self.settings["interpreter"],
-						print_traceback=True)
+            # Copy over the binary interpreter (qemu), if applicable; note that it's given
+            # as full path and goes to the same place in the chroot
+            if "interpreter" in self.settings:
+                    if not os.path.exists(self.settings["interpreter"]):
+                        raise CatalystError(
+                            "Can't find interpreter " +
+                            self.settings["interpreter"],
+                            print_traceback=True)
 
-				log.notice('Copying binary interpreter %s into chroot', self.settings['interpreter'])
+                    log.notice('Copying binary interpreter %s into chroot',
+                               self.settings['interpreter'])
 
-				if os.path.exists(self.settings['chroot_path'] + '/' + self.settings['interpreter']):
-					os.rename(
-						self.settings['chroot_path'] + '/' + self.settings['interpreter'], 
-						self.settings['chroot_path'] + '/' + self.settings['interpreter'] + '.catalyst')
+                    if os.path.exists(self.settings['chroot_path'] + '/' + self.settings['interpreter']):
+                        os.rename(
+                            self.settings['chroot_path'] +
+                            '/' + self.settings['interpreter'],
+                            self.settings['chroot_path'] + '/' + self.settings['interpreter'] + '.catalyst')
 
-				shutil.copy(self.settings['interpreter'],
-					self.settings['chroot_path'] + '/' + self.settings['interpreter'])
+                    shutil.copy(self.settings['interpreter'],
+                                self.settings['chroot_path'] + '/' + self.settings['interpreter'])
 
             # Copy over the envscript, if applicable
             if "envscript" in self.settings:
@@ -1124,14 +1127,16 @@ class StageBase(TargetBase, ClearBase, GenBase):
         if os.path.exists(hosts_file + '.catalyst'):
             os.rename(hosts_file + '.catalyst', hosts_file)
 
-		# optionally clean up binary interpreter
-		if "interpreter" in self.settings:
-			if os.path.exists(self.settings['chroot_path'] + '/' + self.settings['interpreter'] + '.catalyst'):
-				os.rename(
-					self.settings['chroot_path'] + '/' + self.settings['interpreter'] + '.catalyst', 
-					self.settings['chroot_path'] + '/' + self.settings['interpreter'])
-			else:
-				os.remove(self.settings['chroot_path'] + '/' + self.settings['interpreter'])
+            # optionally clean up binary interpreter
+            if "interpreter" in self.settings:
+                    if os.path.exists(self.settings['chroot_path'] + '/' + self.settings['interpreter'] + '.catalyst'):
+                        os.rename(
+                            self.settings['chroot_path'] + '/' +
+                            self.settings['interpreter'] + '.catalyst',
+                            self.settings['chroot_path'] + '/' + self.settings['interpreter'])
+                    else:
+                        os.remove(
+                            self.settings['chroot_path'] + '/' + self.settings['interpreter'])
 
         # optionally clean up portage configs
         if ("portage_prefix" in self.settings and


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-07-24 20:33 Andreas K. Hüttel
  0 siblings, 0 replies; 144+ messages in thread
From: Andreas K. Hüttel @ 2020-07-24 20:33 UTC (permalink / raw
  To: gentoo-commits

commit:     b267ba9b28953df3ba6528e8cf189527b037fc1d
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 23 22:25:17 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Jul 24 13:34:54 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=b267ba9b

stagebase: Extend cleanup logic to more directories

Needed for FEATURES management (switching off pid namespaces in qemu)
and for testing build system hacks (like building python single-threaded
to avoid hangs).

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 0d3a418b..345fe1db 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1138,13 +1138,19 @@ class StageBase(TargetBase, ClearBase, GenBase):
                 "sticky-config" not in self.settings["options"]):
             log.debug("clean(), portage_preix = %s, no sticky-config",
                       self.settings["portage_prefix"])
-            for _dir in "accept_keywords", "keywords", "mask", "unmask", "use":
+            for _dir in "package.accept_keywords", "package.keywords", "package.mask", "package.unmask", "package.use", "package.env", "env":
                 target = pjoin(self.settings["destpath"],
-                               "etc/portage/package.%s" % _dir,
+                               "etc/portage/%s" % _dir,
                                self.settings["portage_prefix"])
                 log.notice("Clearing portage_prefix target: %s", target)
                 clear_path(target)
 
+        # Remove hacks that should *never* go into stages
+        target = pjoin(self.settings["destpath"], "etc/portage/patches")
+        if os.path.exists(target):
+            log.warning("You've been hacking. Clearing target patches: %s", target)
+            clear_path(target)
+
         # Remove our overlay
         overlay = normpath(
             self.settings["chroot_path"] + self.settings["local_overlay"])


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-07-20 20:40 Andreas K. Hüttel
  0 siblings, 0 replies; 144+ messages in thread
From: Andreas K. Hüttel @ 2020-07-20 20:40 UTC (permalink / raw
  To: gentoo-commits

commit:     22f59e6d758b3c4801a984ea6a3b4574407143c6
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 20 20:39:53 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Jul 20 20:39:53 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=22f59e6d

Add "interpreter" parameter for qemu-user build support

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 catalyst/base/stagebase.py | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index c2cc2c3e..0d3a418b 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -55,6 +55,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
             "fflags",
             "hostuse",
             "install_mask",
+            "interpreter",
             "kerncache_path",
             "ldflags",
             "makeopts",
@@ -938,6 +939,24 @@ class StageBase(TargetBase, ClearBase, GenBase):
             shutil.copy('/etc/resolv.conf',
                         self.settings['chroot_path'] + '/etc/')
 
+			# Copy over the binary interpreter (qemu), if applicable; note that it's given
+			# as full path and goes to the same place in the chroot
+			if "interpreter" in self.settings:
+				if not os.path.exists(self.settings["interpreter"]):
+					raise CatalystError(
+						"Can't find interpreter " + self.settings["interpreter"],
+						print_traceback=True)
+
+				log.notice('Copying binary interpreter %s into chroot', self.settings['interpreter'])
+
+				if os.path.exists(self.settings['chroot_path'] + '/' + self.settings['interpreter']):
+					os.rename(
+						self.settings['chroot_path'] + '/' + self.settings['interpreter'], 
+						self.settings['chroot_path'] + '/' + self.settings['interpreter'] + '.catalyst')
+
+				shutil.copy(self.settings['interpreter'],
+					self.settings['chroot_path'] + '/' + self.settings['interpreter'])
+
             # Copy over the envscript, if applicable
             if "envscript" in self.settings:
                 if not os.path.exists(self.settings["envscript"]):
@@ -1105,6 +1124,15 @@ class StageBase(TargetBase, ClearBase, GenBase):
         if os.path.exists(hosts_file + '.catalyst'):
             os.rename(hosts_file + '.catalyst', hosts_file)
 
+		# optionally clean up binary interpreter
+		if "interpreter" in self.settings:
+			if os.path.exists(self.settings['chroot_path'] + '/' + self.settings['interpreter'] + '.catalyst'):
+				os.rename(
+					self.settings['chroot_path'] + '/' + self.settings['interpreter'] + '.catalyst', 
+					self.settings['chroot_path'] + '/' + self.settings['interpreter'])
+			else:
+				os.remove(self.settings['chroot_path'] + '/' + self.settings['interpreter'])
+
         # optionally clean up portage configs
         if ("portage_prefix" in self.settings and
                 "sticky-config" not in self.settings["options"]):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-06-05 21:13 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-06-05 21:13 UTC (permalink / raw
  To: gentoo-commits

commit:     834e1caa4d78ffc7607c6508f54fd192a5a3830c
Author:     Daniel Cordero <catalyst <AT> 0xdc <DOT> io>
AuthorDate: Thu May 21 17:32:45 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Jun  5 21:03:26 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=834e1caa

stagebase: allow specfiles to define install_mask

There is some code that uses this option - set_install_mask() - but it was not
added to the list of valid specfile options.

The only mention of use is in the embedded target, but it may also be useful
for other stages.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 5a8cd1df..5c59c4d2 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -54,6 +54,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
             "fcflags",
             "fflags",
             "hostuse",
+            "install_mask",
             "kerncache_path",
             "ldflags",
             "makeopts",


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-06-05 21:13 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-06-05 21:13 UTC (permalink / raw
  To: gentoo-commits

commit:     fd1903e5cd80a13d397ae07c6472d08ac6675cba
Author:     Daniel Cordero <catalyst <AT> 0xdc <DOT> io>
AuthorDate: Thu May 21 17:32:46 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Jun  5 21:08:36 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=fd1903e5

embedded: use destpath to clean mergeroot

When using remove() with a capture subpath (e.g. the embedded target), specifying
files in rm removes the files from the seed stage, not the captured stage.

Use destpath as a base for removals. When not using a subpath, destpath
equals chroot_path.

Also unhardcode log prefix to match the target.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 5c59c4d2..ab1d409b 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1168,8 +1168,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
                 for x in self.settings[self.settings["spec_prefix"] + "/rm"]:
                     # We're going to shell out for all these cleaning
                     # operations, so we get easy glob handling.
-                    log.notice('livecd: removing %s', x)
-                    clear_path(self.settings["chroot_path"] + x)
+                    log.notice('%s: removing %s', self.settings["spec_prefix"], x)
+                    clear_path(self.settings["destpath"] + x)
                 try:
                     if os.path.exists(self.settings["controller_file"]):
                         cmd([self.settings['controller_file'], 'clean'],


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-06-05 21:13 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-06-05 21:13 UTC (permalink / raw
  To: gentoo-commits

commit:     d2dd86b8f21337133d9d8c744c5f3fdd96867cd5
Author:     Daniel Cordero <catalyst <AT> 0xdc <DOT> io>
AuthorDate: Thu May 21 17:32:47 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Jun  5 21:08:42 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d2dd86b8

embedded: copy root overlay into destpath

When using a merge subpath (e.g. the embedded target's /tmp/mergeroot),
root_overlay() copies the overlay into the seed stage, rather than the subpath.

Copy the files into destpath. When not using a subpath, destpath equals
chroot_path (so other stages are not affected).

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index ab1d409b..c2cc2c3e 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -838,7 +838,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
                                    "/root_overlay"]:
                 if os.path.exists(x):
                     log.info('Copying root_overlay: %s', x)
-                    cmd(['rsync', '-a', x + '/', self.settings['chroot_path']],
+                    cmd(['rsync', '-a', x + '/', self.settings['destpath']],
                         env=self.env)
 
     def bind(self):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-05-21 20:25 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-05-21 20:25 UTC (permalink / raw
  To: gentoo-commits

commit:     6bacd678bab3be95318fe4dcd432ad627a3f2b3e
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed May 20 00:23:42 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed May 20 01:49:37 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=6bacd678

catalyst: Add decompressor_search_order as valid spec option

The next commit is going to remove this from the list of valid config
file options, where it should not be, and that list currently is used to
populate the list of valid spec options.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 0c311515..f39895fe 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -49,6 +49,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
             "common_flags",
             "compression_mode",
             "cxxflags",
+            "decompressor_search_order",
             "distcc_hosts",
             "fcflags",
             "fflags",


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-05-21 20:25 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-05-21 20:25 UTC (permalink / raw
  To: gentoo-commits

commit:     d97ef9d0879cc935258f5d30b84dd31d464abc9f
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed May 20 02:55:15 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed May 20 02:58:07 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d97ef9d0

catalyst: Don't even try to make envars from dicts

With the removal of the arch modules (presumably), the two exceptions
(compress_definitions and decompress_definitions) are the only dicts in
self.settings.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 22 ++--------------------
 1 file changed, 2 insertions(+), 20 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 9410f151..8e2b08da 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1285,28 +1285,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
                     self.env[varname] = "true"
                 else:
                     self.env[varname] = "false"
-            # This handles a dictionary of objects just one level deep and no deeper!
-            # Its currently used only for USE_EXPAND flags which are dictionaries of
-            # lists in arch/amd64.py and friends.  If we wanted self.settigs[var]
-            # of any depth, we should make this function recursive.
             elif isinstance(self.settings[x], dict):
-                if x in ["compress_definitions",
-                         "decompress_definitions"]:
+                if x in ['compress_definitions', 'decompress_definitions']:
                     continue
-                self.env[varname] = ' '.join(self.settings[x].keys())
-                for y in self.settings[x].keys():
-                    varname2 = "clst_" + y.replace("/", "_")
-                    varname2 = varname2.replace("-", "_")
-                    varname2 = varname2.replace(".", "_")
-                    if isinstance(self.settings[x][y], str):
-                        self.env[varname2] = self.settings[x][y]
-                    elif isinstance(self.settings[x][y], list):
-                        self.env[varname2] = ' '.join(self.settings[x][y])
-                    elif isinstance(self.settings[x][y], bool):
-                        if self.settings[x][y]:
-                            self.env[varname] = "true"
-                        else:
-                            self.env[varname] = "false"
+                log.warning("Not making envar for '%s', is a dict", x)
 
         if "makeopts" in self.settings:
             if isinstance(self.settings["makeopts"], str):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-05-21 20:25 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-05-21 20:25 UTC (permalink / raw
  To: gentoo-commits

commit:     3e1784975ab40fda968fe4f36a57e2cfb8edd695
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed May 20 00:11:36 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed May 20 01:49:37 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=3e178497

catalyst: Remove unused decompression_mode spec option

Never used.

Fixes: 99e9ceabe053 (DeComp bug fixes)
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 651bf4e4..0c311515 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -49,7 +49,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
             "common_flags",
             "compression_mode",
             "cxxflags",
-            "decompression_mode",
             "distcc_hosts",
             "fcflags",
             "fflags",


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/base/
@ 2020-05-20  3:39 Matt Turner
  2020-05-21 20:25 ` [gentoo-commits] proj/catalyst:master " Matt Turner
  0 siblings, 1 reply; 144+ messages in thread
From: Matt Turner @ 2020-05-20  3:39 UTC (permalink / raw
  To: gentoo-commits

commit:     ff0b574a509e9b2796d25dabdcfb473ffa673fd1
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed May 20 02:26:52 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed May 20 03:15:02 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ff0b574a

catalyst: Support emitting int/float envars

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 645a9f61..5a8cd1df 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1283,6 +1283,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
             elif isinstance(self.settings[x], bool):
                 if self.settings[x]:
                     self.env[varname] = "true"
+            elif isinstance(self.settings[x], (int, float)):
+                self.env[varname] = str(self.settings[x])
             elif isinstance(self.settings[x], dict):
                 if x in ['compress_definitions', 'decompress_definitions']:
                     continue


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-05-16  6:43 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-05-16  6:43 UTC (permalink / raw
  To: gentoo-commits

commit:     202556d8a04852f2fa1c39eaca11da3c1421fbfe
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu May 14 03:27:47 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri May 15 03:39:56 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=202556d8

catalyst: Drop unnecessary clear_path()

open(..., 'w') truncates the file.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 964a5129..68945da8 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -974,7 +974,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
         # Modify and write out make.conf (for the chroot)
         makepath = normpath(self.settings["chroot_path"] +
                             self.settings["make_conf"])
-        clear_path(makepath)
         with open(makepath, "w") as myf:
             log.notice("Writing the stage make.conf to: %s" % makepath)
             myf.write("# These settings were set by the catalyst build script "


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-05-16  6:43 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-05-16  6:43 UTC (permalink / raw
  To: gentoo-commits

commit:     4d2ed2e6ea5bf5e2d79a7a9e9726748752986a35
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri May 15 01:22:28 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri May 15 03:39:56 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4d2ed2e6

catalyst: Make parent directories of snapshots/

Otherwise, if /var/tmp/catalyst does not exist when the snapshot target
is executed it will fail to make the snapshots/ directory.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/targetbase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/targetbase.py b/catalyst/base/targetbase.py
index 5bcea920..3e338bee 100644
--- a/catalyst/base/targetbase.py
+++ b/catalyst/base/targetbase.py
@@ -24,7 +24,7 @@ class TargetBase(ABC):
     def set_snapshot(self, treeish=None):
         # Make snapshots directory
         snapshot_dir = Path(self.settings['storedir'], 'snapshots')
-        snapshot_dir.mkdir(mode=0o755, exist_ok=True)
+        snapshot_dir.mkdir(mode=0o755, parents=True, exist_ok=True)
 
         repo_name = self.settings['repo_name']
         if treeish is None:


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: catalyst/base/
@ 2020-05-15  6:32 Matt Turner
  2020-05-16  6:43 ` [gentoo-commits] proj/catalyst:master " Matt Turner
  0 siblings, 1 reply; 144+ messages in thread
From: Matt Turner @ 2020-05-15  6:32 UTC (permalink / raw
  To: gentoo-commits

commit:     f7b7b9f3e0df2c62e4724a7f44ce8ddd9c3e1084
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri May 15 06:30:09 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri May 15 06:31:34 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f7b7b9f3

catalyst: Mount squashfs with -o ro

Even though squashfs is not writeable, it must be mounted with -o ro in
order to be mounted multiple times. This allows, for example, the same
snapshot to be mounted simultaneously in multiple catalyst chroots.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 55d1032d..651bf4e4 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -868,7 +868,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
                 mount += ['-t', 'tmpfs', '-o', 'noexec,nosuid,nodev']
             else:
                 source_path = Path(self.mount[x]['source'])
-                if source_path.suffix != '.sqfs':
+                if source_path.suffix == '.sqfs':
+                    mount += ['-o', 'ro']
+                else:
                     mount.append('--bind')
 
                     # We may need to create the source of the bind mount. E.g., in the


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: catalyst/base/
@ 2020-05-15  6:32 Matt Turner
  2020-05-16  6:43 ` [gentoo-commits] proj/catalyst:master " Matt Turner
  0 siblings, 1 reply; 144+ messages in thread
From: Matt Turner @ 2020-05-15  6:32 UTC (permalink / raw
  To: gentoo-commits

commit:     dc0abc9160b4f85659a1d5db39201febb184e8df
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri May 15 06:24:52 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri May 15 06:31:34 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=dc0abc91

catalyst: Factor out mount/source/target in bind()

This simplifies things, and lets us only append to the end of the list.
It also enables us to simply add multiple args (in the next commit).

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 52f9cd5b..55d1032d 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -852,6 +852,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
             source = str(self.mount[x]['source'])
             target = self.settings['chroot_path'] + str(self.mount[x]['target'])
+            mount = ['mount']
 
             log.debug('bind %s: "%s" -> "%s"', x, source, target)
 
@@ -859,29 +860,25 @@ class StageBase(TargetBase, ClearBase, GenBase):
                 if 'var_tmpfs_portage' not in self.settings:
                     continue
 
-                _cmd = ['mount', '-t', 'tmpfs', '-o', 'size=' +
-                        self.settings['var_tmpfs_portage'] + 'G', source,
-                        target]
+                mount += ['-t', 'tmpfs', '-o', 'size=' +
+                          self.settings['var_tmpfs_portage'] + 'G']
             elif source == 'tmpfs':
-                _cmd = ['mount', '-t', 'tmpfs', source, target]
+                mount += ['-t', 'tmpfs']
             elif source == 'shm':
-                _cmd = ['mount', '-t', 'tmpfs', '-o', 'noexec,nosuid,nodev',
-                        source, target]
+                mount += ['-t', 'tmpfs', '-o', 'noexec,nosuid,nodev']
             else:
-                _cmd = ['mount', source, target]
-
-                source = Path(self.mount[x]['source'])
-                if source.suffix != '.sqfs':
-                    _cmd.insert(1, '--bind')
+                source_path = Path(self.mount[x]['source'])
+                if source_path.suffix != '.sqfs':
+                    mount.append('--bind')
 
                     # 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.mkdir(mode=0o755, exist_ok=True)
+                    source_path.mkdir(mode=0o755, exist_ok=True)
 
             Path(target).mkdir(mode=0o755, parents=True, exist_ok=True)
 
-            cmd(_cmd, env=self.env, fail_func=self.unbind)
+            cmd(mount + [source, target], env=self.env, fail_func=self.unbind)
 
     def unbind(self):
         ouch = 0


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-05-06 17:41 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-05-06 17:41 UTC (permalink / raw
  To: gentoo-commits

commit:     9f60d7d97a9fb72d10b756801a79ad5878a9bfa2
Author:     Etienne Buira <etienne.buira <AT> free <DOT> fr>
AuthorDate: Wed May  6 16:46:10 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed May  6 17:41:15 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=9f60d7d9

catalyst: Skip only var_tmpfs_portage mount

If var_tmpfs_portage is not in settings, we want to skip the tmpfs mount
only. Prior to this commit subsequent mounts would have been incorrectly
skipped.

Fixes: 4c4a82badb5e (catalyst: Clean up bind())
Signed-off-by: Etienne Buira <etienne.buira <AT> free.fr>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 951500d8..964a5129 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -857,7 +857,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
             if source == 'maybe_tmpfs':
                 if 'var_tmpfs_portage' not in self.settings:
-                    return
+                    continue
 
                 _cmd = ['mount', '-t', 'tmpfs', '-o', 'size=' +
                         self.settings['var_tmpfs_portage'] + 'G', source,


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-05-05  5:20 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-05-05  5:20 UTC (permalink / raw
  To: gentoo-commits

commit:     7e392bb6998dfb726f72b3c7bddcedbce685261c
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue May  5 05:20:15 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue May  5 05:20:15 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=7e392bb6

catalyst: Remove never-used "crosscompile"

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 80cc16f2..951500d8 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -111,15 +111,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
             chroot = 'chroot'
         self.settings["CHROOT"] = chroot
 
-        self.settings["crosscompile"] = \
-            build != host and not chroot.startswith('setarch')
-
         log.notice('Using target: %s', self.settings['target'])
         # Print a nice informational message
-        if self.settings["crosscompile"]:
-            log.info('Cross-compiling on %s for different machine type %s',
-                     build, host)
-        elif chroot.startswith('setarch'):
+        if chroot.startswith('setarch'):
             log.info('Building on %s for alternate personality type %s',
                      build, host)
         else:


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-05-01  5:57 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-05-01  5:57 UTC (permalink / raw
  To: gentoo-commits

commit:     cd58b37bcd07433e93b80b4a93c9e79ec9395e26
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri May  1 05:55:43 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri May  1 05:55:43 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=cd58b37b

catalyst: Access setarch data correctly

This prevented the setarch data in the TOML files from being applied
correctly.

Fixes: b368f6aa5e29 (catalyst: Use arch data from TOML, not python
                     modules)
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index affdabbe..7c82029a 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -95,7 +95,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
                 # Search for a subarchitecture in each arch in the arch_config
                 for arch in [x for x in arch_config if x.startswith(name) and host in arch_config[x]]:
                     self.settings.update(arch_config[arch][host])
-                    setarch = arch_config.get('setarch', {})
+                    setarch = arch_config.get('setarch', {}).get(host, {})
                     break
                 else:
                     # Didn't find a matching subarchitecture, keep searching


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-04-30 22:56 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-04-30 22:56 UTC (permalink / raw
  To: gentoo-commits

commit:     4c4a82badb5ef8bd472dae7b530ef87a4c1f9127
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 19 01:10:51 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Apr 23 18:20:35 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4c4a82ba

catalyst: Clean up bind()

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 62 +++++++++++++++++++++++++---------------------
 1 file changed, 34 insertions(+), 28 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 275c07eb..9aecf013 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -906,35 +906,41 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
     def bind(self):
         for x in [x for x in self.mount if self.mount[x]['enable']]:
-            log.debug('bind(); x = %s', x)
-            target = normpath(self.settings['chroot_path'] +
-                              self.mount[x]['target'])
-            ensure_dirs(target, mode=0o755)
-
-            if not os.path.exists(self.mount[x]['source']):
-                if self.mount[x]['source'] not in ("maybe_tmpfs", "tmpfs", "shmfs"):
-                    ensure_dirs(self.mount[x]['source'], mode=0o755)
-
-            src = self.mount[x]['source']
-            log.debug('bind(); src = %s', src)
-            if src == "maybe_tmpfs":
-                if "var_tmpfs_portage" in self.settings:
-                    _cmd = ['mount', '-t', 'tmpfs',
-                            '-o', 'size=' +
-                            self.settings['var_tmpfs_portage'] + 'G',
-                            src, target]
-            elif src == "tmpfs":
-                _cmd = ['mount', '-t', 'tmpfs', src, target]
+            if str(self.mount[x]['source']) == 'config':
+                raise CatalystError(f'"{x}" bind mount source is not configured')
+            if str(self.mount[x]['target']) == 'config':
+                raise CatalystError(f'"{x}" bind mount target is not configured')
+
+            source = str(self.mount[x]['source'])
+            target = self.settings['chroot_path'] + str(self.mount[x]['target'])
+
+            log.debug('bind %s: "%s" -> "%s"', x, source, target)
+
+            if source == 'maybe_tmpfs':
+                if 'var_tmpfs_portage' not in self.settings:
+                    return
+
+                _cmd = ['mount', '-t', 'tmpfs', '-o', 'size=' +
+                        self.settings['var_tmpfs_portage'] + 'G', source,
+                        target]
+            elif source == 'tmpfs':
+                _cmd = ['mount', '-t', 'tmpfs', source, target]
+            elif source == 'shmfs':
+                _cmd = ['mount', '-t', 'tmpfs', '-o', 'noexec,nosuid,nodev',
+                        'shm', target]
             else:
-                if src == "shmfs":
-                    _cmd = ['mount', '-t', 'tmpfs', '-o',
-                            'noexec,nosuid,nodev', 'shm', target]
-                else:
-                    _cmd = ['mount', '--bind', src, target]
-            if _cmd:
-                log.debug('bind(); _cmd = %s', _cmd)
-                cmd(_cmd, env=self.env, fail_func=self.unbind)
-        log.debug('bind(); finished :D')
+                _cmd = ['mount', '--bind', source, target]
+
+                source = Path(self.mount[x]['source'])
+
+                # 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.mkdir(mode=0o755, exist_ok=True)
+
+            Path(target).mkdir(mode=0o755, parents=True, exist_ok=True)
+
+            cmd(_cmd, env=self.env, fail_func=self.unbind)
 
     def unbind(self):
         ouch = 0


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-04-23  2:06 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-04-23  2:06 UTC (permalink / raw
  To: gentoo-commits

commit:     992cf27d631b064a612c203169f1bc2446e6c6fc
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 23 02:05:11 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Apr 23 02:05:11 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=992cf27d

catalyst: Fix Path() usage

When an Path argument has a leading /, all previous arguments are
ignored. This is surprising behavior to me...

Fixes: ddc1b50d47ff (catalyst: Simplify config_profile_link())
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 0531cf61..1c0d98c6 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -906,12 +906,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
     def config_profile_link(self):
         log.info('Configuring profile link...')
-        make_profile = Path(self.settings['chroot_path'],
-                            self.settings['port_conf'],
+        make_profile = Path(self.settings['chroot_path'] + self.settings['port_conf'],
                             'make.profile')
         make_profile.unlink()
-        make_profile.symlink_to(Path('../..',
-                                     self.settings['portdir'],
+        make_profile.symlink_to(Path('../..' + self.settings['portdir'],
                                      'profiles',
                                      self.settings['target_profile']),
                                 target_is_directory=True)


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-04-22  5:52 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-04-22  5:52 UTC (permalink / raw
  To: gentoo-commits

commit:     ddc1b50d47ffde9b9bbceb83ce0b5a6cb7045e1b
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 18 23:32:08 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Apr 22 05:51:22 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ddc1b50d

catalyst: Simplify config_profile_link()

I see no use in making this a resume point since making a symlink is a
cheap operation.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 31 +++++++++++++------------------
 1 file changed, 13 insertions(+), 18 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index cc997688..0531cf61 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -3,6 +3,9 @@ import os
 import platform
 import shutil
 import sys
+
+from pathlib import Path
+
 import toml
 
 from snakeoil import fileutils
@@ -902,24 +905,16 @@ class StageBase(TargetBase, ClearBase, GenBase):
                 self.snapcache_lock.unlock()
 
     def config_profile_link(self):
-        if "autoresume" in self.settings["options"] \
-                and self.resume.is_enabled("config_profile_link"):
-            log.notice(
-                'Resume point detected, skipping config_profile_link operation...')
-        else:
-            # TODO: zmedico and I discussed making this a directory and pushing
-            # in a parent file, as well as other user-specified configuration.
-            log.info('Configuring profile link...')
-            clear_path(self.settings['chroot_path'] +
-                       self.settings['port_conf'] + '/make.profile')
-            ensure_dirs(self.settings['chroot_path'] +
-                        self.settings['port_conf'])
-            cmd(['ln', '-sf',
-                 '../..' + self.settings['portdir'] +
-                 '/profiles/' + self.settings['target_profile'],
-                 self.settings['chroot_path'] + self.settings['port_conf'] + '/make.profile'],
-                env=self.env)
-            self.resume.enable("config_profile_link")
+        log.info('Configuring profile link...')
+        make_profile = Path(self.settings['chroot_path'],
+                            self.settings['port_conf'],
+                            'make.profile')
+        make_profile.unlink()
+        make_profile.symlink_to(Path('../..',
+                                     self.settings['portdir'],
+                                     'profiles',
+                                     self.settings['target_profile']),
+                                target_is_directory=True)
 
     def setup_confdir(self):
         if "autoresume" in self.settings["options"] \


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-04-18 20:30 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-04-18 20:30 UTC (permalink / raw
  To: gentoo-commits

commit:     060df92357aed97af955aa36caf47e8518b01e05
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 18 20:25:38 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Apr 18 20:26:38 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=060df923

catalyst: Open CONTENTS file in text mode

Fixes: bb21b8615e64 (catalyst: gzip the .CONTENTS file)
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/genbase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/genbase.py b/catalyst/base/genbase.py
index 3db20f84..c7dd87bc 100644
--- a/catalyst/base/genbase.py
+++ b/catalyst/base/genbase.py
@@ -29,7 +29,7 @@ class GenBase():
     def gen_contents_file(self, path):
         c = self.settings['contents_map']
 
-        with gzip.open(path + '.CONTENTS.gz', 'w', encoding='utf-8') as file:
+        with gzip.open(path + '.CONTENTS.gz', 'wt', encoding='utf-8') as file:
             file.write(c.contents(path, '', verbose=self.settings['VERBOSE']))
 
     def gen_digest_file(self, path):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-04-17 19:52 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-04-17 19:52 UTC (permalink / raw
  To: gentoo-commits

commit:     46e6f497dcd0c21cd5197e5d9cf1ef6e196af10a
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 17 05:37:42 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Apr 17 05:51:15 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=46e6f497

catalyst: Generate array outside of loop

I'm going to change all of this code anyway, but I had to make this a
separate commit since I was so flabbergasted by the absurdity of it.
After digging through the history across multiple renames, I found that
this mistake was introduced in 2006.

Fixes: d128d2a554b0 (digests function uses raw output from hash function now)
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

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

diff --git a/catalyst/base/genbase.py b/catalyst/base/genbase.py
index 1164fd55..e75e6e3c 100644
--- a/catalyst/base/genbase.py
+++ b/catalyst/base/genbase.py
@@ -22,7 +22,7 @@ class GenBase():
                     keys = {}
                     for i in self.settings["contents"].split():
                         keys[i] = 1
-                        array = sorted(keys.keys())
+                    array = sorted(keys.keys())
                     for j in array:
                         contents = contents_map.contents(path, j,
                                                          verbose=self.settings["VERBOSE"])
@@ -40,7 +40,7 @@ class GenBase():
                     keys = {}
                     for i in self.settings["digests"].split():
                         keys[i] = 1
-                        array = sorted(keys.keys())
+                    array = sorted(keys.keys())
                     for f in [path, path + '.CONTENTS']:
                         if os.path.exists(f):
                             if "all" in array:


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-04-17 19:52 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-04-17 19:52 UTC (permalink / raw
  To: gentoo-commits

commit:     907f5a20e28ef9fed45595bdc68daaebd36d5281
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 17 07:03:14 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Apr 17 07:08:24 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=907f5a20

catalyst: Remove guard rails on duplicate digests

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/genbase.py | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/catalyst/base/genbase.py b/catalyst/base/genbase.py
index e75e6e3c..f55b113f 100644
--- a/catalyst/base/genbase.py
+++ b/catalyst/base/genbase.py
@@ -37,17 +37,13 @@ class GenBase():
             hash_map = self.settings["hash_map"]
             if os.path.exists(path):
                 with io.open(digests, "w", encoding='utf-8') as myf:
-                    keys = {}
-                    for i in self.settings["digests"].split():
-                        keys[i] = 1
-                    array = sorted(keys.keys())
                     for f in [path, path + '.CONTENTS']:
                         if os.path.exists(f):
-                            if "all" in array:
+                            if "all" in self.settings["digests"].split():
                                 for k in list(hash_map.hash_map):
                                     digest = hash_map.generate_hash(f, hash_=k)
                                     myf.write(digest)
                             else:
-                                for j in array:
+                                for j in self.settings["digests"].split():
                                     digest = hash_map.generate_hash(f, hash_=j)
                                     myf.write(digest)


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-04-17 19:52 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-04-17 19:52 UTC (permalink / raw
  To: gentoo-commits

commit:     fe133e8058ecfcad654ae80bdfbf7359237d4ec5
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 17 07:11:33 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Apr 17 07:14:44 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=fe133e80

catalyst: Remove dead 'all' digests case

Generating close to 30 digests is not a sensible thing to do in general,
but worse this code was not possible: 'all' was not a valid digest
option since it is not a key in HASH_DEFINITIONS.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/genbase.py | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/catalyst/base/genbase.py b/catalyst/base/genbase.py
index f55b113f..2dc8bad0 100644
--- a/catalyst/base/genbase.py
+++ b/catalyst/base/genbase.py
@@ -39,11 +39,6 @@ class GenBase():
                 with io.open(digests, "w", encoding='utf-8') as myf:
                     for f in [path, path + '.CONTENTS']:
                         if os.path.exists(f):
-                            if "all" in self.settings["digests"].split():
-                                for k in list(hash_map.hash_map):
-                                    digest = hash_map.generate_hash(f, hash_=k)
-                                    myf.write(digest)
-                            else:
-                                for j in self.settings["digests"].split():
-                                    digest = hash_map.generate_hash(f, hash_=j)
-                                    myf.write(digest)
+                            for i in self.settings["digests"].split():
+                                digest = hash_map.generate_hash(f, hash_=i)
+                                myf.write(digest)


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-04-17 19:52 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-04-17 19:52 UTC (permalink / raw
  To: gentoo-commits

commit:     f0e78af28a5e1c6275cd5b6b3f8c602e7fd16f7f
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 17 17:17:49 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Apr 17 18:55:18 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f0e78af2

catalyst: Simplify GenBase

So much was wrong with this code. Deleting a file if it exists only to
open it with 'w' (which would have truncated it anyway!), checking for
presence of files that must exist and doing it in the wrong place, etc.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/genbase.py | 36 ++++++++++++------------------------
 1 file changed, 12 insertions(+), 24 deletions(-)

diff --git a/catalyst/base/genbase.py b/catalyst/base/genbase.py
index 632ee0d9..bc7f9375 100644
--- a/catalyst/base/genbase.py
+++ b/catalyst/base/genbase.py
@@ -3,10 +3,9 @@ import hashlib
 import io
 import os
 
-
 class GenBase():
     """
-    This class does generation of the contents and digests files.
+    Generates CONTENTS and DIGESTS files.
     """
 
     def __init__(self, myspec):
@@ -27,27 +26,16 @@ class GenBase():
         return f'# {name.upper()} HASH\n{h.hexdigest()}  {filename}\n'
 
     def gen_contents_file(self, path):
-        contents = path + ".CONTENTS"
-        if os.path.exists(contents):
-            os.remove(contents)
-
-        contents_map = self.settings["contents_map"]
-        if os.path.exists(path):
-            with io.open(contents, "w", encoding='utf-8') as myf:
-                contents = contents_map.contents(path, '',
-                                                 verbose=self.settings["VERBOSE"])
-                if contents:
-                    myf.write(contents)
+        c = self.settings['contents_map']
+
+        with io.open(path + '.CONTENTS', 'w', encoding='utf-8') as file:
+            file.write(c.contents(path, '', verbose=self.settings['VERBOSE']))
 
     def gen_digest_file(self, path):
-        digests = path + ".DIGESTS"
-        if os.path.exists(digests):
-            os.remove(digests)
-        if "digests" in self.settings:
-            if os.path.exists(path):
-                with io.open(digests, "w", encoding='utf-8') as myf:
-                    for f in [path, path + '.CONTENTS']:
-                        if os.path.exists(f):
-                            for i in self.settings["digests"].split():
-                                digest = self.generate_hash(f, name=i)
-                                myf.write(digest)
+        if 'digests' not in self.settings:
+            return
+
+        with io.open(path + '.DIGESTS', 'w', encoding='utf-8') as file:
+            for f in [path, path + '.CONTENTS']:
+                for i in self.settings['digests'].split():
+                    file.write(self.generate_hash(f, name=i))


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-04-15 19:59 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-04-15 19:59 UTC (permalink / raw
  To: gentoo-commits

commit:     051596bc5da38d0d1b6ccc1f349cec783d9599b3
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 15 19:57:41 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Apr 15 19:57:41 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=051596bc

catalyst: Remove unused import and reorder

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index d1e638be..d2f16f9b 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1,10 +1,9 @@
 
 import os
-import imp
-import toml
 import platform
 import shutil
 import sys
+import toml
 
 from snakeoil import fileutils
 from snakeoil.osutils import pjoin


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-04-13 20:43 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-04-13 20:43 UTC (permalink / raw
  To: gentoo-commits

commit:     f0c42aff30385e2e37b96bb0b568ed049d40443b
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 11 21:59:07 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Apr 13 20:43:10 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f0c42aff

catalyst: Require that subclasses implement needed properties

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/targetbase.py | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/targetbase.py b/catalyst/base/targetbase.py
index 0977bad3..a09abc73 100644
--- a/catalyst/base/targetbase.py
+++ b/catalyst/base/targetbase.py
@@ -1,8 +1,10 @@
 import os
 
+from abc import ABC, abstractmethod
+
 from catalyst.support import addl_arg_parse
 
-class TargetBase():
+class TargetBase(ABC):
 	"""
 	The toplevel class for all targets. This is about as generic as we get.
 	"""
@@ -13,3 +15,15 @@ class TargetBase():
 			'PATH': '/bin:/sbin:/usr/bin:/usr/sbin',
 			'TERM': os.getenv('TERM', 'dumb'),
 			}
+
+	@property
+	@classmethod
+	@abstractmethod
+	def required_values(cls):
+		return NotImplementedError
+
+	@property
+	@classmethod
+	@abstractmethod
+	def valid_values(cls):
+		return NotImplementedError


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-04-13 20:43 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-04-13 20:43 UTC (permalink / raw
  To: gentoo-commits

commit:     403ab9c13eda83e841316a15dff4877be4eda698
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 13 19:44:27 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Apr 13 20:42:48 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=403ab9c1

catalyst: Fix appending --b2sum

... again. If gk_mainargs is set in the spec, then
self.settings[gk_mainargs] is an array, not a string, so adding a string
adds the individual characters as array elements. However, if
gk_mainargs is not set, then adding a string makes it a string and
everything works.

Fixes: 4b430dc36fdb (catalyst: Fix appending --b2sum)
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 6f0a1bc3..b4275355 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -676,8 +676,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		verify = prefix + "/verify"
 		if verify in self.settings:
 			assert self.settings[verify] == "blake2"
-			self.settings.setdefault("gk_mainargs", "")
-			self.settings["gk_mainargs"] += " --b2sum"
+			self.settings.setdefault("gk_mainargs", []).append("--b2sum")
 
 	def kill_chroot_pids(self):
 		log.info('Checking for processes running in chroot and killing them.')


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-04-13 20:43 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-04-13 20:43 UTC (permalink / raw
  To: gentoo-commits

commit:     e28d8c5cc9e80003ae9eb8ba401601845f81a413
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 12 01:01:31 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Apr 13 20:43:10 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e28d8c5c

catalyst: Use platform.machine() instead of uname

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index d1dd14b4..d18f28af 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1,6 +1,7 @@
 
 import os
 import imp
+import platform
 import shutil
 import sys
 
@@ -131,7 +132,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		if "cbuild" in self.settings:
 			buildmachine = self.settings["cbuild"].split("-")[0]
 		else:
-			buildmachine = os.uname()[4]
+			buildmachine = platform.machine()
 		if buildmachine not in machinemap:
 			raise CatalystError("Unknown build machine type " + buildmachine)
 		self.settings["buildarch"] = machinemap[buildmachine]


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-04-13 20:36 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-04-13 20:36 UTC (permalink / raw
  To: gentoo-commits

commit:     a711659173fa2d1b3763370bb8b76b990a2d2df4
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 11 21:59:07 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Apr 13 20:35:35 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=a7116591

catalyst: Require that subclasses implement needed properties

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/targetbase.py | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/targetbase.py b/catalyst/base/targetbase.py
index 0977bad3..a09abc73 100644
--- a/catalyst/base/targetbase.py
+++ b/catalyst/base/targetbase.py
@@ -1,8 +1,10 @@
 import os
 
+from abc import ABC, abstractmethod
+
 from catalyst.support import addl_arg_parse
 
-class TargetBase():
+class TargetBase(ABC):
 	"""
 	The toplevel class for all targets. This is about as generic as we get.
 	"""
@@ -13,3 +15,15 @@ class TargetBase():
 			'PATH': '/bin:/sbin:/usr/bin:/usr/sbin',
 			'TERM': os.getenv('TERM', 'dumb'),
 			}
+
+	@property
+	@classmethod
+	@abstractmethod
+	def required_values(cls):
+		return NotImplementedError
+
+	@property
+	@classmethod
+	@abstractmethod
+	def valid_values(cls):
+		return NotImplementedError


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-04-13 20:36 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-04-13 20:36 UTC (permalink / raw
  To: gentoo-commits

commit:     36980e93e59ede79aa3ecbf72dfedfd2014d692b
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 13 19:44:27 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Apr 13 20:35:35 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=36980e93

catalyst: Fix appending --b2sum

... again. If gk_mainargs is set in the spec, then
self.settings[gk_mainargs] is an array, not a string, so adding a string
adds the individual characters as array elements. However, if
gk_mainargs is not set, then adding a string makes it a string and
everything works.

Fixes: 4b430dc36fdb (catalyst: Fix appending --b2sum)
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 6f0a1bc3..829f9fb7 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -676,8 +676,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		verify = prefix + "/verify"
 		if verify in self.settings:
 			assert self.settings[verify] == "blake2"
-			self.settings.setdefault("gk_mainargs", "")
-			self.settings["gk_mainargs"] += " --b2sum"
+			self.settings.setdefault("gk_mainargs", []).append("--b2um")
 
 	def kill_chroot_pids(self):
 		log.info('Checking for processes running in chroot and killing them.')


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-04-13 20:36 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-04-13 20:36 UTC (permalink / raw
  To: gentoo-commits

commit:     af046b2ae52d510496c8896c3750c3dae3640b71
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 12 01:01:31 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Apr 13 20:35:35 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=af046b2a

catalyst: Use platform.machine() instead of uname

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 683e5989..210527a9 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1,6 +1,7 @@
 
 import os
 import imp
+import platform
 import shutil
 import sys
 
@@ -131,7 +132,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		if "cbuild" in self.settings:
 			buildmachine = self.settings["cbuild"].split("-")[0]
 		else:
-			buildmachine = os.uname()[4]
+			buildmachine = platform.machine()
 		if buildmachine not in machinemap:
 			raise CatalystError("Unknown build machine type " + buildmachine)
 		self.settings["buildarch"] = machinemap[buildmachine]


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-04-10 21:04 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-04-10 21:04 UTC (permalink / raw
  To: gentoo-commits

commit:     481d0321fc1278e9a1a0af328c0b4cf14013ff3c
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 10 07:34:19 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Apr 10 07:34:19 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=481d0321

catalyst: Remove some python-2 left-overs

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 53d39536..320e9d53 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -20,11 +20,6 @@ from catalyst.lock import LockDir, LockInUse
 from catalyst.fileops import ensure_dirs, pjoin, clear_dir, clear_path
 from catalyst.base.resume import AutoResume
 
-if sys.version_info[0] >= 3:
-	py_input = input
-else:
-	py_input = raw_input  # pylint: disable=undefined-variable
-
 
 class StageBase(TargetBase, ClearBase, GenBase):
 	"""
@@ -1697,6 +1692,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 	@staticmethod
 	def _debug_pause_():
-		py_input("press any key to continue: ")
+		input("press any key to continue: ")
 
 # vim: ts=4 sw=4 sta et sts=4 ai


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-04-10  5:38 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-04-10  5:38 UTC (permalink / raw
  To: gentoo-commits

commit:     4b430dc36fdb7fdecb768f617b67fab1baacb9cd
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 10 05:35:35 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Apr 10 05:37:06 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4b430dc3

catalyst: Fix appending --b2sum

I fixed this locally on my testing machine and failed to sync the
changes back.

Fixes: c3b572d0ed5e (catalyst: Automatically specify --b2sum ...)
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 00596264..72ef57d3 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -683,7 +683,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		verify = prefix + "/verify"
 		if verify in self.settings:
 			assert self.settings[verify] == "blake2"
-			self.settings.setdefault("gk_mainargs", "").append(" --b2sum")
+			self.settings.setdefault("gk_mainargs", "")
+			self.settings["gk_mainargs"] += " --b2sum"
 
 	def kill_chroot_pids(self):
 		log.info('Checking for processes running in chroot and killing them.')


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-04-10  2:11 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-04-10  2:11 UTC (permalink / raw
  To: gentoo-commits

commit:     c3b572d0ed5ebf29017da5e894e98fe9ab150126
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  9 19:04:28 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Apr  9 19:23:43 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=c3b572d0

catalyst: Automatically specify --b2sum if <target>/verify is set

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 4855c9f0..00596264 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -672,10 +672,18 @@ class StageBase(TargetBase, ClearBase, GenBase):
 							[addlargs["boot/kernel/" + x + "/packages"]]
 
 	def set_build_kernel_vars(self):
-		if self.settings["spec_prefix"] + "/gk_mainargs" in self.settings:
-			self.settings["gk_mainargs"] = \
-				self.settings[self.settings["spec_prefix"] + "/gk_mainargs"]
-			del self.settings[self.settings["spec_prefix"] + "/gk_mainargs"]
+		prefix = self.settings["spec_prefix"]
+
+		gk_mainargs = prefix + "/gk_mainargs"
+		if gk_mainargs in self.settings:
+			self.settings["gk_mainargs"] = self.settings[gk_mainargs]
+			del self.settings[gk_mainargs]
+
+		# Ask genkernel to include b2sum if <target>/verify is set
+		verify = prefix + "/verify"
+		if verify in self.settings:
+			assert self.settings[verify] == "blake2"
+			self.settings.setdefault("gk_mainargs", "").append(" --b2sum")
 
 	def kill_chroot_pids(self):
 		log.info('Checking for processes running in chroot and killing them.')


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-03-29 17:48 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-03-29 17:48 UTC (permalink / raw
  To: gentoo-commits

commit:     a4f0612d4162d937652c34200e3de0925d113e05
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 28 22:00:59 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Mar 29 01:35:14 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=a4f0612d

catalyst: Skip "maybe_tmpfs" directory creation

Fixes: 8441372c2857 (fix /var/tmp/portage not being forced into a tmpfs)
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 939e03e2..4855c9f0 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -963,7 +963,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			ensure_dirs(target, mode=0o755)
 
 			if not os.path.exists(self.mountmap[x]):
-				if self.mountmap[x] not in ["tmpfs", "shmfs"]:
+				if self.mountmap[x] not in ("maybe_tmpfs", "tmpfs", "shmfs"):
 					ensure_dirs(self.mountmap[x], mode=0o755)
 
 			src = self.mountmap[x]


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2020-03-28 20:07 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2020-03-28 20:07 UTC (permalink / raw
  To: gentoo-commits

commit:     671ba2f22c9ac335c5f24d69d75b75a1050f543d
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 28 00:52:57 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Mar 28 07:34:51 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=671ba2f2

catalyst: Trim annoying warning

> WARNING : You have been warned.

is awfully silly.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index d2b4cd94..0a825700 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1068,11 +1068,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
 						print_traceback=True)
 
 				log.warning(
-					'Overriding certain env variables may cause catastrophic failure.\n'
-					'If your build fails look here first as the possible problem.\n'
-					'Catalyst assumes you know what you are doing when setting these variables.\n'
-					'Catalyst Maintainers use VERY minimal envscripts, if used at all.\n'
-					'You have been warned.')
+					'env variables in catalystrc may cause catastrophic failure.\n'
+					'If your build fails look here first as the possible problem.')
 
 				shutil.copy(self.settings['envscript'],
 					self.settings['chroot_path'] + '/tmp/envscript')


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2019-10-19 23:25 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2019-10-19 23:25 UTC (permalink / raw
  To: gentoo-commits

commit:     f06836c23696fb6eb4bcae3b343129e2d4b4d1ac
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 19 23:11:07 2019 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Oct 19 23:11:07 2019 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f06836c2

Improve debugging messages

- Move start message out of loop
- Print loaded module name in the loop

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index c68c278d..2ad53381 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -75,10 +75,11 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		self.subarchmap = {}
 		machinemap = {}
 		arch_dir = self.settings["archdir"] + "/"
+		log.debug("Begin loading arch modules...")
 		for x in [
 					x[:-3] for x in os.listdir(arch_dir) if x.endswith(".py")
 					and x != "__init__.py"]:
-			log.debug("Begin loading arch modules...")
+			log.debug("\tLoading %s", x)
 			try:
 				fh = open(arch_dir + x + ".py")
 				# This next line loads the plugin as a module and


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2019-10-14 20:15 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2019-10-14 20:15 UTC (permalink / raw
  To: gentoo-commits

commit:     f08bb56fb240da5860418b47b726a2954587a85a
Author:     Michael Everitt <michael <AT> 2e0cer <DOT> net>
AuthorDate: Mon Oct 14 20:14:18 2019 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Oct 14 20:14:50 2019 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f08bb56f

Demote warning about missing/failed unmounts to 'notice'

Signed-off-by: Michael Everitt <michael <AT> 2e0cer.net>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 3c274587..c68c278d 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1001,11 +1001,11 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		for x in myrevmounts:
 			target = normpath(mypath + self.target_mounts[x])
 			if not os.path.exists(target):
-				log.warning('%s does not exist. Skipping', target)
+				log.notice('%s does not exist. Skipping', target)
 				continue
 
 			if not ismount(target):
-				log.warning('%s is not a mount point. Skipping', target)
+				log.notice('%s is not a mount point. Skipping', target)
 				continue
 
 			try:


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2019-10-05 22:31 Matt Turner
  0 siblings, 0 replies; 144+ messages in thread
From: Matt Turner @ 2019-10-05 22:31 UTC (permalink / raw
  To: gentoo-commits

commit:     f97a050114eeef0550eec0052c526706a6bf3f0a
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Oct  5 22:30:38 2019 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Oct  5 22:30:38 2019 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f97a0501

Warn if skipping unbinding a path

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/base/stagebase.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 4e81a9b1..3c274587 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1001,9 +1001,11 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		for x in myrevmounts:
 			target = normpath(mypath + self.target_mounts[x])
 			if not os.path.exists(target):
+				log.warning('%s does not exist. Skipping', target)
 				continue
 
 			if not ismount(target):
+				log.warning('%s is not a mount point. Skipping', target)
 				continue
 
 			try:


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2018-11-07 19:50 Rick Farina
  0 siblings, 0 replies; 144+ messages in thread
From: Rick Farina @ 2018-11-07 19:50 UTC (permalink / raw
  To: gentoo-commits

commit:     44fcaf16a9eb5b17b6f0b6a61647c97ccc92cd25
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  7 19:47:16 2018 +0000
Commit:     Rick Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Wed Nov  7 19:49:47 2018 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=44fcaf16

allow custom COMMON_FLAGS

instead of forcing the user to override *FLAGS, just let them set
COMMON_FLAGS directly

Signed-off-by: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo.org>

 catalyst/base/stagebase.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 7665834c..54a1f389 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -39,7 +39,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			"rel_type", "profile", "snapshot", "source_subpath",
 			"portage_confdir", "portage_prefix", "portage_overlay",
 			"cflags", "cxxflags", "fcflags", "fflags", "ldflags", "asflags",
-			"cbuild", "hostuse", "catalyst_use",
+			"common_flags", "cbuild", "hostuse", "catalyst_use",
 			"distcc_hosts", "makeopts", "pkgcache_path", "kerncache_path",
 			"compression_mode", "decompression_mode"])
 
@@ -305,6 +305,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		if "ASFLAGS" in self.makeconf:
 			self.settings["ASFLAGS"] = self.makeconf["ASFLAGS"]
 
+	def override_common_flags(self):
+		if "COMMON_FLAGS" in self.makeconf:
+			self.settings["COMMON_FLAGS"] = self.makeconf["COMMON_FLAGS"]
+
 	def set_install_mask(self):
 		if "install_mask" in self.settings:
 			if not isinstance(self.settings['install_mask'], str):
@@ -1042,6 +1046,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		self.override_fflags()
 		self.override_ldflags()
 		self.override_asflags()
+		self.override_common_flags()
 		if "autoresume" in self.settings["options"] \
 			and self.resume.is_enabled("chroot_setup"):
 			log.notice('Resume point detected, skipping chroot_setup operation...')


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2018-10-01 16:30 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2018-10-01 16:30 UTC (permalink / raw
  To: gentoo-commits

commit:     9cfdfd6076471edbc422ba2e73dc103a93c9e917
Author:     Michael Everitt <m.j.everitt <AT> iee <DOT> org>
AuthorDate: Fri Sep  7 17:11:34 2018 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Mon Oct  1 16:21:36 2018 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=9cfdfd60

Update parsing of 'makeopts' in specs to permit multiple arguments

edit by Brian Dolbec <dolsen <AT> gentoo.org>:
    Make elif an else so it will accept any iterable.

 catalyst/base/stagebase.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 6d78f937..7665834c 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1420,7 +1420,12 @@ class StageBase(TargetBase, ClearBase, GenBase):
 							self.env[varname] = "false"
 
 		if "makeopts" in self.settings:
-			self.env["MAKEOPTS"] = self.settings["makeopts"]
+			if isinstance(self.settings["makeopts"], str):
+				self.env["MAKEOPTS"] = self.settings["makeopts"]
+			else:
+				# ensure makeopts is a string
+				self.env["MAKEOPTS"] = ' '.join(self.settings["makeopts"])
+
 		log.debug('setup_environment(); env = %r', self.env)
 
 	def run(self):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2018-07-21 18:54 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2018-07-21 18:54 UTC (permalink / raw
  To: gentoo-commits

commit:     bb1aad33b000e39689a66243bbb446c6c25c1e88
Author:     Brian Dolbec dolsen <dolsen <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 20 16:30:19 2018 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Fri Jul 20 16:36:15 2018 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=bb1aad33

stagebase.py: Remove /root/* from default cleanables

This was not something that should need to be cleaned.
With ccache removed, it is safe to leave alone.
Livecd images may have a .bashrc to start to start the desktop, etc..

Signed-off-by: Brian Dolbec dolsen <dolsen <AT> gentoo.org>

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index d30ed5ce..a66229c2 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -465,7 +465,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 	def set_cleanables(self):
 		self.settings["cleanables"] = ["/etc/resolv.conf", "/var/tmp/*", "/tmp/*",
-			"/root/*", self.settings["repo_basedir"] + "/" +
+			self.settings["repo_basedir"] + "/" +
 			self.settings["repo_name"]]
 
 	def set_snapshot_path(self):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2018-07-21 18:54 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2018-07-21 18:54 UTC (permalink / raw
  To: gentoo-commits

commit:     c142d2f5c70d254d197343c2d86043a0e8616a46
Author:     Brian Dolbec dolsen <dolsen <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 20 16:29:26 2018 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Fri Jul 20 16:36:15 2018 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=c142d2f5

stagebase.py: Relocate ccache location away from /root/

Signed-off-by: Brian Dolbec dolsen <dolsen <AT> gentoo.org>

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index e98a289f..d30ed5ce 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -253,7 +253,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				ccdir = os.environ["CCACHE_DIR"]
 				del os.environ["CCACHE_DIR"]
 			else:
-				ccdir = "/root/.ccache"
+				ccdir = "/var/tmp/ccache"
 			if not os.path.isdir(ccdir):
 				raise CatalystError(
 					"Compiler cache support can't be enabled (can't find " + ccdir+")")


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2018-02-22  3:53 Richard Farina
  0 siblings, 0 replies; 144+ messages in thread
From: Richard Farina @ 2018-02-22  3:53 UTC (permalink / raw
  To: gentoo-commits

commit:     85646148865ae50e4e5702f2c707f816060ac5cf
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 22 03:53:39 2018 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Thu Feb 22 03:53:39 2018 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=85646148

fix copypasta, sorry

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index c249295a..e98a289f 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1231,7 +1231,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		if os.path.exists(overlay):
 			clear_path(overlay)
 
-		if "sticky-config" not in self.settings["options"]):
+		if "sticky-config" not in self.settings["options"]:
 			# re-write the make.conf to be sure it is clean
 			self.write_make_conf(setup=False)
 


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2018-02-22  3:50 Richard Farina
  0 siblings, 0 replies; 144+ messages in thread
From: Richard Farina @ 2018-02-22  3:50 UTC (permalink / raw
  To: gentoo-commits

commit:     6dce47a175ec2508eac1e04e5df42efc58baf398
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 22 03:44:54 2018 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Thu Feb 22 03:44:54 2018 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=6dce47a1

do not rewrite make.conf if sticky-config is set

we don't want to re-write the user's make.conf if sticky-config is set,
it may have been modified during fsscript and the user asked for their
config to be preserved

 catalyst/base/stagebase.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index eaed73fc..c249295a 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1231,8 +1231,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		if os.path.exists(overlay):
 			clear_path(overlay)
 
-		# re-write the make.conf to be sure it is clean
-		self.write_make_conf(setup=False)
+		if "sticky-config" not in self.settings["options"]):
+			# re-write the make.conf to be sure it is clean
+			self.write_make_conf(setup=False)
 
 		# Clean up old and obsoleted files in /etc
 		if os.path.exists(self.settings["stage_path"]+"/etc"):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2017-12-29  2:27 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2017-12-29  2:27 UTC (permalink / raw
  To: gentoo-commits

commit:     73219eb1c1878d2dd160ba067c6096ff5aefff95
Author:     Yuta SATOH <nigoro.dev <AT> gmail <DOT> com>
AuthorDate: Fri Dec 29 01:55:05 2017 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Fri Dec 29 02:05:15 2017 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=73219eb1

stagebase.py: Update bind() for Gentoo/FreeBSD tmpfs/shmfs # 363577

Bug url: https://bugs.gentoo.org/363577

 catalyst/base/stagebase.py | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 32cc3df1..eaed73fc 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -967,21 +967,22 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			if "snapcache" in self.settings["options"] and x == "portdir":
 				self.snapcache_lock.read_lock()
 			_cmd = None
-			if os.uname()[0] == "FreeBSD":
-				if src == "/dev":
-					_cmd = ['mount', '-t', 'devfs', 'none', target]
-				else:
-					_cmd = ['mount_nullfs', src, target]
+			if src == "tmpfs":
+				if "var_tmpfs_portage" in self.settings:
+					_cmd = ['mount', '-t', 'tmpfs',
+						'-o', 'size=' + self.settings['var_tmpfs_portage'] + 'G',
+						src, target]
 			else:
-				if src == "tmpfs":
-					if "var_tmpfs_portage" in self.settings:
-						_cmd = ['mount', '-t', 'tmpfs',
-							'-o', 'size=' + self.settings['var_tmpfs_portage'] + 'G',
-							src, target]
-				elif src == "shmfs":
-					_cmd = ['mount', '-t', 'tmpfs', '-o', 'noexec,nosuid,nodev', 'shm', target]
+				if os.uname()[0] == "FreeBSD":
+					if src == "/dev":
+						_cmd = ['mount', '-t', 'devfs', 'none', target]
+					else:
+						_cmd = ['mount_nullfs', src, target]
 				else:
-					_cmd = ['mount', '--bind', src, target]
+					if src == "shmfs":
+						_cmd = ['mount', '-t', 'tmpfs', '-o', 'noexec,nosuid,nodev', 'shm', target]
+					else:
+						_cmd = ['mount', '--bind', src, target]
 			if _cmd:
 				log.debug('bind(); _cmd = %s', _cmd)
 				cmd(_cmd, env=self.env, fail_func=self.unbind)


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2017-12-29  2:27 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2017-12-29  2:27 UTC (permalink / raw
  To: gentoo-commits

commit:     16cb2fcfa1fac91f877a5f41ddb97eee68208466
Author:     Yuta SATOH <nigoro.dev <AT> gmail <DOT> com>
AuthorDate: Fri Dec 29 01:42:12 2017 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Fri Dec 29 02:05:15 2017 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=16cb2fcf

stagebase.py: Update umount cmd, add env=self.env  # 363577

Bug url: https://bugs.gentoo.org/363577

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 8f9a5dbd..32cc3df1 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1002,7 +1002,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				continue
 
 			try:
-				cmd(['umount', target])
+				cmd(['umount', target], env=self.env)
 			except CatalystError:
 				log.warning('First attempt to unmount failed: %s', target)
 				log.warning('Killing any pids still running in the chroot')
@@ -1010,7 +1010,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				self.kill_chroot_pids()
 
 				try:
-					cmd(['umount', target])
+					cmd(['umount', target], env=self.env)
 				except CatalystError:
 					ouch = 1
 					log.warning("Couldn't umount bind mount: %s", target)


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2017-12-29  0:35 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2017-12-29  0:35 UTC (permalink / raw
  To: gentoo-commits

commit:     d1dbb555a08951b65c21f900ace740b1a76efa51
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 28 20:58:29 2017 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Fri Dec 29 00:34:30 2017 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d1dbb555

stagebase.py: Fix cleaning portage_prefix errors

Remove outer [ ] pair in the pjoin.
Remove leading / in the "/etc/portage/package.%s"  Ben Kohler <bkohler <AT> gmail.com>
Add "accept_keywords" package.* entry to clean. Ben Kohler <bkohler <AT> gmail.com>
Add extra logging info.
Change from using chroot_path to destpath in case it is different (stage1).
Use normpath() on some other cleanables to remove "//"'s

 catalyst/base/stagebase.py | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index a6a32f5a..8f9a5dbd 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1207,7 +1207,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		else:
 			for x in self.settings["cleanables"]:
 				log.notice('Cleaning chroot: %s', x)
-				clear_path(self.settings["destpath"] + x)
+				clear_path(normpath(self.settings["destpath"] + x))
 
 		# Put /etc/hosts back into place
 		hosts_file = self.settings['chroot_path'] + '/etc/hosts'
@@ -1217,15 +1217,18 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		# optionally clean up portage configs
 		if ("portage_prefix" in self.settings and
 			"sticky-config" not in self.settings["options"]):
-			for _dir in "keywords", "mask", "unmask", "use":
-				target = pjoin([self.settings['chroot_path'],
-					"/etc/portage/package.%s" % _dir,
-					self.settings["portage_prefix"]])
+			log.debug("clean(), portage_preix = %s, no sticky-config", self.settings["portage_prefix"])
+			for _dir in "accept_keywords", "keywords", "mask", "unmask", "use":
+				target = pjoin(self.settings["destpath"],
+					"etc/portage/package.%s" % _dir,
+					self.settings["portage_prefix"])
+				log.notice("Clearing portage_prefix target: %s", target)
 				clear_path(target)
 
 		# Remove our overlay
-		if os.path.exists(self.settings["chroot_path"] + self.settings["local_overlay"]):
-			clear_path(self.settings["chroot_path"] + self.settings["local_overlay"])
+		overlay = normpath(self.settings["chroot_path"] + self.settings["local_overlay"])
+		if os.path.exists(overlay):
+			clear_path(overlay)
 
 		# re-write the make.conf to be sure it is clean
 		self.write_make_conf(setup=False)


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2017-11-29 17:20 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2017-11-29 17:20 UTC (permalink / raw
  To: gentoo-commits

commit:     739a1a78513a27b5234fce708acb64211c43cb74
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  9 08:58:10 2017 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Wed Nov 22 01:16:20 2017 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=739a1a78

base/stagebase.py: Correctly log the correct function name for unpack_snapshot()

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 93c13902..532f0997 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -822,7 +822,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		target_portdir = normpath(self.settings["chroot_path"] +
 			self.settings["repo_basedir"] + "/" + self.settings["repo_name"])
 		log.info('%s', self.settings['chroot_path'])
-		log.info('unpack(), target_portdir = %s', target_portdir)
+		log.info('unpack_snapshot(), target_portdir = %s', target_portdir)
 		if "snapcache" in self.settings["options"]:
 			snapshot_cache_hash_path = pjoin(
 				self.settings['snapshot_cache_path'], 'catalyst-hash')


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2017-11-29 17:20 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2017-11-29 17:20 UTC (permalink / raw
  To: gentoo-commits

commit:     40c83b1e77efc539ca80709ae3ae0a56b065a7d1
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 11 08:25:15 2017 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Wed Nov 22 01:16:21 2017 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=40c83b1e

base/stagebase.py: Update the cleanables to the new repo variables

 catalyst/base/stagebase.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 67382b9a..d44db985 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -452,7 +452,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 	def set_cleanables(self):
 		self.settings["cleanables"] = ["/etc/resolv.conf", "/var/tmp/*", "/tmp/*",
-			"/root/*", self.settings["portdir"]]
+			"/root/*", self.settings["repo_basedir"] + "/" +
+			self.settings["repo_name"]]
 
 	def set_snapshot_path(self):
 		self.settings["snapshot_path"] = file_check(


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:pending commit in: catalyst/base/
@ 2017-11-22 15:52 Brian Dolbec
  2017-11-29 17:20 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
  0 siblings, 1 reply; 144+ messages in thread
From: Brian Dolbec @ 2017-11-22 15:52 UTC (permalink / raw
  To: gentoo-commits

commit:     03d8e9d832dcf2b3e52f4aa84e0782e47f3c9b71
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  9 08:56:45 2017 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Wed Nov 22 01:16:20 2017 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=03d8e9d8

base/stagebase.py: Rename unpack_portage resume point to unpack_repo

One part of the effort to separate the portage name from the repository.

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index b857a64b..93c13902 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -808,7 +808,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 	def unpack_snapshot(self):
 		unpack = True
-		snapshot_hash = self.resume.get("unpack_portage")
+		snapshot_hash = self.resume.get("unpack_repo")
 
 		unpack_errmsg = "Error unpacking snapshot using mode %(mode)s"
 
@@ -847,7 +847,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 			if "autoresume" in self.settings["options"] \
 				and os.path.exists(target_portdir) \
-				and self.resume.is_enabled("unpack_portage") \
+				and self.resume.is_enabled("unpack_repo") \
 				and self.settings["snapshot_path_hash"] == snapshot_hash:
 				log.notice('Valid Resume point detected, skipping unpack of portage tree...')
 				unpack = False
@@ -868,7 +868,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 					myf.write(self.settings["snapshot_path_hash"])
 			else:
 				log.info('Setting snapshot autoresume point')
-				self.resume.enable("unpack_portage",
+				self.resume.enable("unpack_repo",
 					data = self.settings["snapshot_path_hash"])
 
 			if "snapcache" in self.settings["options"]:


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2017-03-09  5:38 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2017-03-09  5:38 UTC (permalink / raw
  To: gentoo-commits

commit:     753d18b58afd38cb282b405e75406e20dd9c14be
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  9 05:38:28 2017 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Mar  9 05:38:28 2017 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=753d18b5

base/stagebase.py: Fix 48856f7e10e due to a change to AutoResume.get()

Changing the formatting to match in the log messages broke the hash matching preventing
them from ever matching.

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 2557fe8..b857a64 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -744,7 +744,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 			# check seed source
 			if os.path.isfile(self.settings["source_path"]) and not invalid_chroot:
-				if self.settings["source_path_hash"] == clst_unpack_hash:
+				if self.settings["source_path_hash"].replace("\n", " ") == clst_unpack_hash:
 					# Seed tarball has not changed, chroot is valid
 					_unpack = False
 					invalid_chroot = False


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2017-03-09  5:05 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2017-03-09  5:05 UTC (permalink / raw
  To: gentoo-commits

commit:     48856f7e10e04d1720b35d32a6151ff2e0d50b31
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  9 05:04:47 2017 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Mar  9 05:04:47 2017 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=48856f7e

base/stagebase.py: Cleanup and fix the autoresume validation in the unpack()

The previous logic was convoluted and had many errors, most notably, not checking
the chroot is a directory, but instead was checking the seed source.
I broke up and simplified the logic into two sections, one checks the chroot for a valid resume
point, the other checks for seed tarball changes which would invalidate the existing chroot.

Also the non-autoresume code block code was mostly not needed and was also simplified.

 catalyst/base/resume.py    |  2 +-
 catalyst/base/stagebase.py | 92 ++++++++++++++++++++++------------------------
 2 files changed, 45 insertions(+), 49 deletions(-)

diff --git a/catalyst/base/resume.py b/catalyst/base/resume.py
index 70d9a4f..b210073 100644
--- a/catalyst/base/resume.py
+++ b/catalyst/base/resume.py
@@ -75,7 +75,7 @@ class AutoResume(object):
 				with open(self._points[point], 'r') as myf:
 					data = myf.read()
 				if data and no_lf:
-					data = data.replace('\n', '')
+					data = data.replace('\n', ' ')
 			except OSError as e:
 				log.error('AutoResumeError: %s', e)
 				return None

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index a6233b2..2557fe8 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -416,6 +416,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				self.settings["source_subpath"] + "/")):
 			self.settings["source_path"] = normpath(self.settings["storedir"] +
 				"/tmp/" + self.settings["source_subpath"] + "/")
+			log.debug("source_subpath is: %s", self.settings["source_path"])
 		else:
 			log.debug('Checking source path existence and '
 				'get the final filepath. subpath: %s',
@@ -693,10 +694,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 					raise CatalystError("Unable to auto-unbind " + target)
 
 	def unpack(self):
-		_unpack = True
 
 		clst_unpack_hash = self.resume.get("unpack")
 
+		# Set up all unpack info settings
 		unpack_info = self.decompressor.create_infodict(
 			source = self.settings["source_path"],
 			destination = self.settings["chroot_path"],
@@ -721,56 +722,51 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		else:
 			# No SEEDCACHE, use tar
 			unpack_info['source'] = file_check(unpack_info['source'])
-		# endif "seedcache"
+		# end of unpack_info settings
 
+		# set defaults,
+		# only change them if the resume point is proven to be good
+		_unpack = True
+		invalid_chroot = True
+		# Begin autoresume validation
 		if "autoresume" in self.settings["options"]:
-			if os.path.isdir(self.settings["source_path"]) \
-				and self.resume.is_enabled("unpack"):
-				# Autoresume is valid, SEEDCACHE is valid
-				_unpack = False
-				invalid_snapshot = False
-				log.notice('Resume point "unpack" valid...')
-
-			elif os.path.isfile(self.settings["source_path"]) \
-				and self.settings["source_path_hash"] == clst_unpack_hash:
-				# Autoresume is valid, tarball is valid
-				_unpack = False
-				invalid_snapshot = False
-				log.notice('Resume point "source_path_hash" valid...')
-
-			elif os.path.isdir(self.settings["source_path"]) \
-				and self.resume.is_disabled("unpack"):
-				# Autoresume is invalid, SEEDCACHE
-				_unpack = True
-				invalid_snapshot = True
-				log.notice('Resume point "unpack is disabled" is True, invalidating snapshot... :(')
-
-			elif os.path.isfile(self.settings["source_path"]) \
-				and self.settings["source_path_hash"] != clst_unpack_hash:
-				# Autoresume is invalid, tarball
-				_unpack = True
-				invalid_snapshot = True
-				log.notice('Resume point "source_path_hash" is invalid... :(')
-				unpack_info['source'] = file_check(unpack_info['source'])
+			# check chroot
+			if os.path.isdir(self.settings["chroot_path"]):
+				if self.resume.is_enabled("unpack"):
+					# Autoresume is valid in the chroot
+					_unpack = False
+					invalid_chroot = False
+					log.notice('Resume: "chroot" is valid...')
+				else:
+					# self.resume.is_disabled("unpack")
+					# Autoresume is invalid in the chroot
+					log.notice('Resume: "seed source" unpack resume point is disabled')
+
+			# check seed source
+			if os.path.isfile(self.settings["source_path"]) and not invalid_chroot:
+				if self.settings["source_path_hash"] == clst_unpack_hash:
+					# Seed tarball has not changed, chroot is valid
+					_unpack = False
+					invalid_chroot = False
+					log.notice('Resume: "seed source" hash matches chroot...')
+				else:
+					# self.settings["source_path_hash"] != clst_unpack_hash
+					# Seed tarball has changed, so invalidate the chroot
+					_unpack = True
+					invalid_chroot = True
+					log.notice('Resume: "seed source" has changed, hashes do not match, invalidating resume...')
+					log.notice('        source_path......: %s', self.settings["source_path"])
+					log.notice('        new source hash..: %s', self.settings["source_path_hash"].replace("\n", " "))
+					log.notice('        recorded hash....: %s', clst_unpack_hash)
+					unpack_info['source'] = file_check(unpack_info['source'])
 
 		else:
-			# No autoresume, SEEDCACHE
+			# No autoresume, check SEEDCACHE
 			if "seedcache" in self.settings["options"]:
-				# SEEDCACHE so let's run rsync and let it clean up
+				# if the seedcache is a dir, rsync will clean up the chroot
 				if os.path.isdir(self.settings["source_path"]):
-					_unpack = True
-					invalid_snapshot = False
-				elif os.path.isfile(self.settings["source_path"]):
-					# Tarball so unpack and remove anything already there
-					_unpack = True
-					invalid_snapshot = True
-				# No autoresume, no SEEDCACHE
-			else:
-				# Tarball so unpack and remove anything already there
-				if os.path.isfile(self.settings["source_path"]):
-					_unpack = True
-					invalid_snapshot = True
-				elif os.path.isdir(self.settings["source_path"]):
+					pass
+			elif os.path.isdir(self.settings["source_path"]):
 					# We should never reach this, so something is very wrong
 					raise CatalystError(
 						"source path is a dir but seedcache is not enabled: %s"
@@ -779,9 +775,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		if _unpack:
 			self.mount_safety_check()
 
-			if invalid_snapshot:
+			if invalid_chroot:
 				if "autoresume" in self.settings["options"]:
-					log.notice('No Valid Resume point detected, cleaning up...')
+					log.notice('Resume: Target chroot is invalid, cleaning up...')
 
 				self.clear_autoresume()
 				self.clear_chroot()
@@ -808,7 +804,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			else:
 				self.resume.enable("unpack")
 		else:
-			log.notice('Resume point detected, skipping unpack operation...')
+			log.notice('Resume: Valid resume point detected, skipping seed unpack operation...')
 
 	def unpack_snapshot(self):
 		unpack = True


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2017-03-08 23:16 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2017-03-08 23:16 UTC (permalink / raw
  To: gentoo-commits

commit:     b2138541f56bb777df703c854e61f90972d00359
Author:     Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org>
AuthorDate: Mon Feb  6 03:35:34 2017 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue Mar  7 17:06:59 2017 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=b2138541

stagebase.py: Whitespace cleanups

Add spaces around '=', after ','
Some long line cleanup.

Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo.org>

 catalyst/base/stagebase.py | 532 +++++++++++++++++++++++----------------------
 1 file changed, 271 insertions(+), 261 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 68ccb79..78fd67f 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -32,13 +32,15 @@ class StageBase(TargetBase, ClearBase, GenBase):
 	the driver class for pretty much everything that Catalyst does.
 	"""
 	def __init__(self,myspec,addlargs):
-		self.required_values.extend(["version_stamp","target","subarch",\
-			"rel_type","profile","snapshot","source_subpath"])
-
-		self.valid_values.extend(["version_stamp","target","subarch",
-			"rel_type","profile","snapshot","source_subpath","portage_confdir",
-			"cflags","cxxflags","fcflags","fflags","ldflags","asflags","cbuild","hostuse","portage_overlay",
-			"distcc_hosts","makeopts","pkgcache_path","kerncache_path",
+		self.required_values.extend(["version_stamp", "target", "subarch",
+			"rel_type", "profile", "snapshot", "source_subpath"])
+
+		self.valid_values.extend(["version_stamp", "target", "subarch",
+			"rel_type", "profile", "snapshot", "source_subpath",
+			"portage_confdir", "portage_prefix", "portage_overlay",
+			"cflags", "cxxflags", "fcflags", "fflags", "ldflags", "asflags",
+			"cbuild", "hostuse", "catalyst_use",
+			"distcc_hosts", "makeopts", "pkgcache_path", "kerncache_path",
 			"compression_mode", "decompression_mode"])
 
 		self.set_valid_build_kernel_vars(addlargs)
@@ -73,16 +75,18 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		self.subarchmap = {}
 		machinemap = {}
 		arch_dir = self.settings["archdir"] + "/"
-		for x in [x[:-3] for x in os.listdir(arch_dir) if x.endswith(".py") and x != "__init__.py"]:
+		for x in [
+					x[:-3] for x in os.listdir(arch_dir) if x.endswith(".py")
+					and x != "__init__.py"]:
 			log.debug("Begin loading arch modules...")
 			try:
-				fh=open(arch_dir + x + ".py")
-				# This next line loads the plugin as a module and assigns it to
-				# archmap[x]
-				self.archmap[x]=imp.load_module(x,fh, arch_dir + x + ".py",
+				fh = open(arch_dir + x + ".py")
+				# This next line loads the plugin as a module and
+				# assigns it to archmap[x]
+				self.archmap[x] = imp.load_module(x, fh, arch_dir + x + ".py",
 					(".py", "r", imp.PY_SOURCE))
-				# This next line registers all the subarches supported in the
-				# plugin
+				# This next line registers all the subarches
+				# supported in the plugin
 				tmpsubarchmap, tmpmachinemap = self.archmap[x].register()
 				self.subarchmap.update(tmpsubarchmap)
 				for machine in tmpmachinemap:
@@ -100,26 +104,26 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		if "chost" in self.settings:
 			hostmachine = self.settings["chost"].split("-")[0]
 			if hostmachine not in machinemap:
-				raise CatalystError("Unknown host machine type "+hostmachine)
-			self.settings["hostarch"]=machinemap[hostmachine]
+				raise CatalystError("Unknown host machine type " + hostmachine)
+			self.settings["hostarch"] = machinemap[hostmachine]
 		else:
 			hostmachine = self.settings["subarch"]
 			if hostmachine in machinemap:
 				hostmachine = machinemap[hostmachine]
-			self.settings["hostarch"]=hostmachine
+			self.settings["hostarch"] = hostmachine
 		if "cbuild" in self.settings:
 			buildmachine = self.settings["cbuild"].split("-")[0]
 		else:
 			buildmachine = os.uname()[4]
 		if buildmachine not in machinemap:
-			raise CatalystError("Unknown build machine type "+buildmachine)
-		self.settings["buildarch"]=machinemap[buildmachine]
-		self.settings["crosscompile"]=(self.settings["hostarch"]!=\
+			raise CatalystError("Unknown build machine type " + buildmachine)
+		self.settings["buildarch"] = machinemap[buildmachine]
+		self.settings["crosscompile"] = (self.settings["hostarch"] != \
 			self.settings["buildarch"])
 
 		# Call arch constructor, pass our settings
 		try:
-			self.arch=self.subarchmap[self.settings["subarch"]](self.settings)
+			self.arch = self.subarchmap[self.settings["subarch"]](self.settings)
 		except KeyError:
 			log.critical(
 				'Invalid subarch: %s\n'
@@ -129,7 +133,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 		log.notice('Using target: %s', self.settings['target'])
 		# Print a nice informational message
-		if self.settings["buildarch"]==self.settings["hostarch"]:
+		if self.settings["buildarch"] == self.settings["hostarch"]:
 			log.info('Building natively for %s', self.settings['hostarch'])
 		elif self.settings["crosscompile"]:
 			log.info('Cross-compiling on %s for different machine type %s',
@@ -143,10 +147,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 		# Initialize our (de)compressor's)
 		self.decompressor = CompressMap(self.settings["decompress_definitions"],
-			env=self.env,
-			search_order=self.settings["decompressor_search_order"],
-			comp_prog=self.settings["comp_prog"],
-			decomp_opt=self.settings["decomp_opt"])
+			env = self.env,
+			search_order = self.settings["decompressor_search_order"],
+			comp_prog = self.settings["comp_prog"],
+			decomp_opt = self.settings["decomp_opt"])
 		self.accepted_extensions = self.decompressor.search_order_extensions(
 			self.settings["decompressor_search_order"])
 		log.notice("Source file specification matching setting is: %s",
@@ -194,14 +198,12 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		self.set_portage_overlay()
 		self.set_root_overlay()
 
-		# This next line checks to make sure that the specified variables exist
-		# on disk.
+		# This next line checks to make sure that the specified variables exist on disk.
 		#pdb.set_trace()
-		file_locate(self.settings,["distdir"],\
-			expand=0)
+		file_locate(self.settings, ["distdir"], expand = 0)
 		# If we are using portage_confdir, check that as well.
 		if "portage_confdir" in self.settings:
-			file_locate(self.settings,["portage_confdir"],expand=0)
+			file_locate(self.settings, ["portage_confdir"], expand = 0)
 
 		# Setup our mount points.
 		# initialize our target mounts.
@@ -242,14 +244,13 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 		if "ccache" in self.settings["options"]:
 			if "CCACHE_DIR" in os.environ:
-				ccdir=os.environ["CCACHE_DIR"]
+				ccdir = os.environ["CCACHE_DIR"]
 				del os.environ["CCACHE_DIR"]
 			else:
-				ccdir="/root/.ccache"
+				ccdir = "/root/.ccache"
 			if not os.path.isdir(ccdir):
 				raise CatalystError(
-					"Compiler cache support can't be enabled (can't find "+\
-					ccdir+")")
+					"Compiler cache support can't be enabled (can't find " + ccdir+")")
 			self.mounts.append("ccache")
 			self.mountmap["ccache"] = ccdir
 			# for the chroot:
@@ -258,8 +259,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		if "icecream" in self.settings["options"]:
 			self.mounts.append("icecream")
 			self.mountmap["icecream"] = self.settings["icecream"]
-			self.env["PATH"] = self.target_mounts["icecream"] + ":" + \
-				self.env["PATH"]
+			self.env["PATH"] = self.target_mounts["icecream"] + ":" + self.env["PATH"]
 
 		if "port_logdir" in self.settings:
 			self.mounts.append("port_logdir")
@@ -269,81 +269,81 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 	def override_cbuild(self):
 		if "CBUILD" in self.makeconf:
-			self.settings["CBUILD"]=self.makeconf["CBUILD"]
+			self.settings["CBUILD"] = self.makeconf["CBUILD"]
 
 	def override_chost(self):
 		if "CHOST" in self.makeconf:
-			self.settings["CHOST"]=self.makeconf["CHOST"]
+			self.settings["CHOST"] = self.makeconf["CHOST"]
 
 	def override_cflags(self):
 		if "CFLAGS" in self.makeconf:
-			self.settings["CFLAGS"]=self.makeconf["CFLAGS"]
+			self.settings["CFLAGS"] = self.makeconf["CFLAGS"]
 
 	def override_cxxflags(self):
 		if "CXXFLAGS" in self.makeconf:
-			self.settings["CXXFLAGS"]=self.makeconf["CXXFLAGS"]
+			self.settings["CXXFLAGS"] = self.makeconf["CXXFLAGS"]
 
 	def override_fcflags(self):
 		if "FCFLAGS" in self.makeconf:
-			self.settings["FCFLAGS"]=self.makeconf["FCFLAGS"]
+			self.settings["FCFLAGS"] = self.makeconf["FCFLAGS"]
 
 	def override_fflags(self):
 		if "FFLAGS" in self.makeconf:
-			self.settings["FFLAGS"]=self.makeconf["FFLAGS"]
+			self.settings["FFLAGS"] = self.makeconf["FFLAGS"]
 
 	def override_ldflags(self):
 		if "LDFLAGS" in self.makeconf:
-			self.settings["LDFLAGS"]=self.makeconf["LDFLAGS"]
+			self.settings["LDFLAGS"] = self.makeconf["LDFLAGS"]
 
 	def override_asflags(self):
 		if "ASFLAGS" in self.makeconf:
-			self.settings["ASFLAGS"]=self.makeconf["ASFLAGS"]
+			self.settings["ASFLAGS"] = self.makeconf["ASFLAGS"]
 
 	def set_install_mask(self):
 		if "install_mask" in self.settings:
 			if not isinstance(self.settings['install_mask'], str):
-				self.settings["install_mask"]=\
+				self.settings["install_mask"] = \
 					' '.join(self.settings["install_mask"])
 
 	def set_spec_prefix(self):
-		self.settings["spec_prefix"]=self.settings["target"]
+		self.settings["spec_prefix"] = self.settings["target"]
 
 	def set_target_profile(self):
-		self.settings["target_profile"]=self.settings["profile"]
+		self.settings["target_profile"] = self.settings["profile"]
 
 	def set_target_subpath(self):
-		self.settings["target_subpath"]=self.settings["rel_type"]+"/"+\
-				self.settings["target"]+"-"+self.settings["subarch"]+"-"+\
-				self.settings["version_stamp"] +'/'
+		self.settings["target_subpath"] = self.settings["rel_type"] + "/" + \
+				self.settings["target"] + "-" + self.settings["subarch"] + "-" + \
+				self.settings["version_stamp"] + '/'
 
 	def set_source_subpath(self):
 		if not isinstance(self.settings['source_subpath'], str):
 			raise CatalystError(
-				"source_subpath should have been a string. Perhaps you have " +\
+				"source_subpath should have been a string. Perhaps you have " + \
 				"something wrong in your spec file?")
 
 	def set_pkgcache_path(self):
 		if "pkgcache_path" in self.settings:
 			if not isinstance(self.settings['pkgcache_path'], str):
-				self.settings["pkgcache_path"]=\
+				self.settings["pkgcache_path"] = \
 					normpath(self.settings["pkgcache_path"])
 		else:
-			self.settings["pkgcache_path"]=\
-				normpath(self.settings["storedir"]+"/packages/"+\
-				self.settings["target_subpath"]+"/")
+			self.settings["pkgcache_path"] = \
+				normpath(self.settings["storedir"] + "/packages/" + \
+				self.settings["target_subpath"] + "/")
 
 	def set_kerncache_path(self):
 		if "kerncache_path" in self.settings:
 			if not isinstance(self.settings['kerncache_path'], str):
-				self.settings["kerncache_path"]=\
+				self.settings["kerncache_path"] = \
 					normpath(self.settings["kerncache_path"])
 		else:
-			self.settings["kerncache_path"]=normpath(self.settings["storedir"]+\
-				"/kerncache/"+self.settings["target_subpath"])
+			self.settings["kerncache_path"] = normpath(self.settings["storedir"] + \
+				"/kerncache/" + self.settings["target_subpath"])
 
 	def set_target_path(self):
-		self.settings["target_path"]=normpath(self.settings["storedir"]+\
-			"/builds/"+self.settings["target_subpath"])
+		self.settings["target_path"] = normpath(self.settings["storedir"] + \
+			"/builds/" + self.settings["target_subpath"])
 		if "autoresume" in self.settings["options"]\
 			and self.resume.is_enabled("setup_target_path"):
 			log.notice('Resume point detected, skipping target path setup operation...')
@@ -352,67 +352,67 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			ensure_dirs(self.settings["storedir"] + "/builds")
 
 	def set_fsscript(self):
-		if self.settings["spec_prefix"]+"/fsscript" in self.settings:
-			self.settings["fsscript"]=\
-				self.settings[self.settings["spec_prefix"]+"/fsscript"]
-			del self.settings[self.settings["spec_prefix"]+"/fsscript"]
+		if self.settings["spec_prefix"] + "/fsscript" in self.settings:
+			self.settings["fsscript"] = \
+				self.settings[self.settings["spec_prefix"] + "/fsscript"]
+			del self.settings[self.settings["spec_prefix"] + "/fsscript"]
 
 	def set_rcadd(self):
-		if self.settings["spec_prefix"]+"/rcadd" in self.settings:
-			self.settings["rcadd"]=\
-				self.settings[self.settings["spec_prefix"]+"/rcadd"]
-			del self.settings[self.settings["spec_prefix"]+"/rcadd"]
+		if self.settings["spec_prefix"] + "/rcadd" in self.settings:
+			self.settings["rcadd"] = \
+				self.settings[self.settings["spec_prefix"] + "/rcadd"]
+			del self.settings[self.settings["spec_prefix"] + "/rcadd"]
 
 	def set_rcdel(self):
-		if self.settings["spec_prefix"]+"/rcdel" in self.settings:
-			self.settings["rcdel"]=\
-				self.settings[self.settings["spec_prefix"]+"/rcdel"]
-			del self.settings[self.settings["spec_prefix"]+"/rcdel"]
+		if self.settings["spec_prefix"] + "/rcdel" in self.settings:
+			self.settings["rcdel"] = \
+				self.settings[self.settings["spec_prefix"] + "/rcdel"]
+			del self.settings[self.settings["spec_prefix"] + "/rcdel"]
 
 	def set_cdtar(self):
-		if self.settings["spec_prefix"]+"/cdtar" in self.settings:
-			self.settings["cdtar"]=\
-				normpath(self.settings[self.settings["spec_prefix"]+"/cdtar"])
-			del self.settings[self.settings["spec_prefix"]+"/cdtar"]
+		if self.settings["spec_prefix"] + "/cdtar" in self.settings:
+			self.settings["cdtar"] = \
+				normpath(self.settings[self.settings["spec_prefix"] + "/cdtar"])
+			del self.settings[self.settings["spec_prefix"] + "/cdtar"]
 
 	def set_iso(self):
-		if self.settings["spec_prefix"]+"/iso" in self.settings:
-			if self.settings[self.settings["spec_prefix"]+"/iso"].startswith('/'):
-				self.settings["iso"]=\
-					normpath(self.settings[self.settings["spec_prefix"]+"/iso"])
+		if self.settings["spec_prefix"] + "/iso" in self.settings:
+			if self.settings[self.settings["spec_prefix"] + "/iso"].startswith('/'):
+				self.settings["iso"] = \
+					normpath(self.settings[self.settings["spec_prefix"] + "/iso"])
 			else:
 				# This automatically prepends the build dir to the ISO output path
 				# if it doesn't start with a /
 				self.settings["iso"] = normpath(self.settings["storedir"] + \
 					"/builds/" + self.settings["rel_type"] + "/" + \
-					self.settings[self.settings["spec_prefix"]+"/iso"])
-			del self.settings[self.settings["spec_prefix"]+"/iso"]
+					self.settings[self.settings["spec_prefix"] + "/iso"])
+			del self.settings[self.settings["spec_prefix"] + "/iso"]
 
 	def set_fstype(self):
-		if self.settings["spec_prefix"]+"/fstype" in self.settings:
-			self.settings["fstype"]=\
-				self.settings[self.settings["spec_prefix"]+"/fstype"]
-			del self.settings[self.settings["spec_prefix"]+"/fstype"]
+		if self.settings["spec_prefix"] + "/fstype" in self.settings:
+			self.settings["fstype"] = \
+				self.settings[self.settings["spec_prefix"] + "/fstype"]
+			del self.settings[self.settings["spec_prefix"] + "/fstype"]
 
 		if "fstype" not in self.settings:
-			self.settings["fstype"]="normal"
+			self.settings["fstype"] = "normal"
 			for x in self.valid_values:
-				if x ==  self.settings["spec_prefix"]+"/fstype":
+				if x ==  self.settings["spec_prefix"] + "/fstype":
 					log.info('%s/fstype is being set to the default of "normal"',
 						self.settings['spec_prefix'])
 
 	def set_fsops(self):
 		if "fstype" in self.settings:
 			self.valid_values.append("fsops")
-			if self.settings["spec_prefix"]+"/fsops" in self.settings:
-				self.settings["fsops"]=\
-					self.settings[self.settings["spec_prefix"]+"/fsops"]
-				del self.settings[self.settings["spec_prefix"]+"/fsops"]
+			if self.settings["spec_prefix"] + "/fsops" in self.settings:
+				self.settings["fsops"] = \
+					self.settings[self.settings["spec_prefix"] + "/fsops"]
+				del self.settings[self.settings["spec_prefix"] + "/fsops"]
 
 	def set_source_path(self):
 		if "seedcache" in self.settings["options"]\
-			and os.path.isdir(normpath(self.settings["storedir"]+"/tmp/"+\
-				self.settings["source_subpath"]+"/")):
+			and os.path.isdir(normpath(self.settings["storedir"] + "/tmp/" +
+				self.settings["source_subpath"] + "/")):
 			self.settings["source_path"] = normpath(self.settings["storedir"] +
 				"/tmp/" + self.settings["source_subpath"] + "/")
 		else:
@@ -433,23 +433,23 @@ class StageBase(TargetBase, ClearBase, GenBase):
 					self.settings["source_path_hash"] = \
 						self.settings["hash_map"].generate_hash(
 							self.settings["source_path"],
-							hash_=self.settings["hash_function"])
+							hash_ = self.settings["hash_function"])
 		log.notice('Source path set to %s', self.settings['source_path'])
 
 	def set_dest_path(self):
 		if "root_path" in self.settings:
-			self.settings["destpath"]=normpath(self.settings["chroot_path"]+\
+			self.settings["destpath"] = normpath(self.settings["chroot_path"] +
 				self.settings["root_path"])
 		else:
-			self.settings["destpath"]=normpath(self.settings["chroot_path"])
+			self.settings["destpath"] = normpath(self.settings["chroot_path"])
 
 	def set_cleanables(self):
-		self.settings["cleanables"]=["/etc/resolv.conf","/var/tmp/*","/tmp/*",\
+		self.settings["cleanables"] = ["/etc/resolv.conf", "/var/tmp/*", "/tmp/*",
 			"/root/*", self.settings["portdir"]]
 
 	def set_snapshot_path(self):
-		self.settings["snapshot_path"]= file_check(
-			normpath(self.settings["storedir"]+\
+		self.settings["snapshot_path"] = file_check(
+			normpath(self.settings["storedir"] +
 				"/snapshots/" + self.settings["snapshot_name"] +
 				self.settings["snapshot"]),
 			self.accepted_extensions,
@@ -459,17 +459,17 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		self.settings["snapshot_path_hash"] = \
 			self.settings["hash_map"].generate_hash(
 				self.settings["snapshot_path"],
-				hash_=self.settings["hash_function"])
+				hash_ = self.settings["hash_function"])
 
 	def set_snapcache_path(self):
-		self.settings["snapshot_cache_path"]=\
+		self.settings["snapshot_cache_path"] = \
 			normpath(pjoin(self.settings["snapshot_cache"],
 				self.settings["snapshot"]))
 		if "snapcache" in self.settings["options"]:
 			self.settings["snapshot_cache_path"] = \
 				normpath(pjoin(self.settings["snapshot_cache"],
 					self.settings["snapshot"]))
-			self.snapcache_lock=\
+			self.snapcache_lock = \
 				LockDir(self.settings["snapshot_cache_path"])
 			log.info('Setting snapshot cache to %s', self.settings['snapshot_cache_path'])
 
@@ -478,9 +478,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		NOTE: the trailing slash has been removed
 		Things *could* break if you don't use a proper join()
 		"""
-		self.settings["chroot_path"]=normpath(self.settings["storedir"]+\
-			"/tmp/"+self.settings["target_subpath"].rstrip('/'))
-		self.chroot_lock=LockDir(self.settings["chroot_path"])
+		self.settings["chroot_path"] = normpath(self.settings["storedir"] +
+			"/tmp/" + self.settings["target_subpath"].rstrip('/'))
+		self.chroot_lock = LockDir(self.settings["chroot_path"])
 
 	def set_autoresume_path(self):
 		self.settings["autoresume_path"] = normpath(pjoin(
@@ -494,19 +494,19 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		self.resume = AutoResume(self.settings["autoresume_path"], mode=0o755)
 
 	def set_controller_file(self):
-		self.settings["controller_file"]=normpath(self.settings["sharedir"]+\
-			"/targets/"+self.settings["target"]+"/"+self.settings["target"]+\
-			"-controller.sh")
+		self.settings["controller_file"] = normpath(self.settings["sharedir"] +
+			"/targets/" + self.settings["target"] + "/" + self.settings["target"]
+			+ "-controller.sh")
 
 	def set_iso_volume_id(self):
-		if self.settings["spec_prefix"]+"/volid" in self.settings:
-			self.settings["iso_volume_id"]=\
-				self.settings[self.settings["spec_prefix"]+"/volid"]
-			if len(self.settings["iso_volume_id"])>32:
+		if self.settings["spec_prefix"] + "/volid" in self.settings:
+			self.settings["iso_volume_id"] = \
+				self.settings[self.settings["spec_prefix"] + "/volid"]
+			if len(self.settings["iso_volume_id"]) > 32:
 				raise CatalystError(
 					"ISO volume ID must not exceed 32 characters.")
 		else:
-			self.settings["iso_volume_id"]="catalyst "+self.settings["snapshot"]
+			self.settings["iso_volume_id"] = "catalyst "+self.settings["snapshot"]
 
 	def set_default_action_sequence(self):
 		""" Default action sequence for run method.
@@ -521,10 +521,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 	def set_action_sequence(self):
 		"""Set basic stage1, 2, 3 action sequences"""
-		self.settings["action_sequence"]=["unpack","unpack_snapshot",\
-				"setup_confdir","portage_overlay",\
-				"base_dirs","bind","chroot_setup","setup_environment",\
-				"run_local","preclean","unbind","clean"]
+		self.settings["action_sequence"] = ["unpack", "unpack_snapshot",
+				"setup_confdir", "portage_overlay",
+				"base_dirs", "bind", "chroot_setup", "setup_environment",
+				"run_local", "preclean", "unbind", "clean"]
 		self.set_completion_action_sequences()
 
 	def set_completion_action_sequences(self):
@@ -540,21 +540,21 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		return
 
 	def set_use(self):
-		if self.settings["spec_prefix"]+"/use" in self.settings:
-			self.settings["use"]=\
-				self.settings[self.settings["spec_prefix"]+"/use"]
-			del self.settings[self.settings["spec_prefix"]+"/use"]
+		if self.settings["spec_prefix"] + "/use" in self.settings:
+			self.settings["use"] = \
+				self.settings[self.settings["spec_prefix"] + "/use"]
+			del self.settings[self.settings["spec_prefix"] + "/use"]
 		if "use" not in self.settings:
-			self.settings["use"]=""
+			self.settings["use"] = ""
 		if isinstance(self.settings['use'], str):
-			self.settings["use"]=self.settings["use"].split()
+			self.settings["use"] = self.settings["use"].split()
 
 		# Force bindist when options ask for it
 		if "BINDIST" in self.settings:
 			self.settings["use"].append("bindist")
 
 	def set_stage_path(self):
-		self.settings["stage_path"]=normpath(self.settings["chroot_path"])
+		self.settings["stage_path"] = normpath(self.settings["chroot_path"])
 
 	def set_mounts(self):
 		pass
@@ -563,82 +563,82 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		pass
 
 	def set_rm(self):
-		if self.settings["spec_prefix"]+"/rm" in self.settings:
-			if isinstance(self.settings[self.settings['spec_prefix']+'/rm'], str):
-				self.settings[self.settings["spec_prefix"]+"/rm"]=\
-					self.settings[self.settings["spec_prefix"]+"/rm"].split()
+		if self.settings["spec_prefix"] + "/rm" in self.settings:
+			if isinstance(self.settings[self.settings['spec_prefix'] + '/rm'], str):
+				self.settings[self.settings["spec_prefix"] + "/rm"] = \
+					self.settings[self.settings["spec_prefix"] + "/rm"].split()
 
 	def set_linuxrc(self):
-		if self.settings["spec_prefix"]+"/linuxrc" in self.settings:
-			if isinstance(self.settings[self.settings['spec_prefix']+'/linuxrc'], str):
-				self.settings["linuxrc"]=\
-					self.settings[self.settings["spec_prefix"]+"/linuxrc"]
-				del self.settings[self.settings["spec_prefix"]+"/linuxrc"]
+		if self.settings["spec_prefix"] + "/linuxrc" in self.settings:
+			if isinstance(self.settings[self.settings['spec_prefix'] + '/linuxrc'], str):
+				self.settings["linuxrc"] = \
+					self.settings[self.settings["spec_prefix"] + "/linuxrc"]
+				del self.settings[self.settings["spec_prefix"] + "/linuxrc"]
 
 	def set_busybox_config(self):
-		if self.settings["spec_prefix"]+"/busybox_config" in self.settings:
-			if isinstance(self.settings[self.settings['spec_prefix']+'/busybox_config'], str):
-				self.settings["busybox_config"]=\
-					self.settings[self.settings["spec_prefix"]+"/busybox_config"]
-				del self.settings[self.settings["spec_prefix"]+"/busybox_config"]
+		if self.settings["spec_prefix"] + "/busybox_config" in self.settings:
+			if isinstance(self.settings[self.settings['spec_prefix'] + '/busybox_config'], str):
+				self.settings["busybox_config"] = \
+					self.settings[self.settings["spec_prefix"] + "/busybox_config"]
+				del self.settings[self.settings["spec_prefix"] + "/busybox_config"]
 
 	def set_portage_overlay(self):
 		if "portage_overlay" in self.settings:
 			if isinstance(self.settings['portage_overlay'], str):
-				self.settings["portage_overlay"]=\
+				self.settings["portage_overlay"] = \
 					self.settings["portage_overlay"].split()
 			log.info('portage_overlay directories are set to: %s',
 				' '.join(self.settings['portage_overlay']))
 
 	def set_overlay(self):
-		if self.settings["spec_prefix"]+"/overlay" in self.settings:
-			if isinstance(self.settings[self.settings['spec_prefix']+'/overlay'], str):
-				self.settings[self.settings["spec_prefix"]+"/overlay"]=\
-					self.settings[self.settings["spec_prefix"]+\
+		if self.settings["spec_prefix"] + "/overlay" in self.settings:
+			if isinstance(self.settings[self.settings['spec_prefix'] + '/overlay'], str):
+				self.settings[self.settings["spec_prefix"] + "/overlay"] = \
+					self.settings[self.settings["spec_prefix"] + \
 					"/overlay"].split()
 
 	def set_root_overlay(self):
-		if self.settings["spec_prefix"]+"/root_overlay" in self.settings:
-			if isinstance(self.settings[self.settings['spec_prefix']+'/root_overlay'], str):
-				self.settings[self.settings["spec_prefix"]+"/root_overlay"]=\
-					self.settings[self.settings["spec_prefix"]+\
+		if self.settings["spec_prefix"] + "/root_overlay" in self.settings:
+			if isinstance(self.settings[self.settings['spec_prefix'] + '/root_overlay'], str):
+				self.settings[self.settings["spec_prefix"] + "/root_overlay"] = \
+					self.settings[self.settings["spec_prefix"] + \
 					"/root_overlay"].split()
 
 	def set_root_path(self):
 		""" ROOT= variable for emerges """
-		self.settings["root_path"]="/"
+		self.settings["root_path"] = "/"
 
 	def set_valid_build_kernel_vars(self,addlargs):
 		if "boot/kernel" in addlargs:
 			if isinstance(addlargs['boot/kernel'], str):
-				loopy=[addlargs["boot/kernel"]]
+				loopy = [addlargs["boot/kernel"]]
 			else:
-				loopy=addlargs["boot/kernel"]
+				loopy = addlargs["boot/kernel"]
 
 			for x in loopy:
-				self.valid_values.append("boot/kernel/"+x+"/aliases")
-				self.valid_values.append("boot/kernel/"+x+"/config")
-				self.valid_values.append("boot/kernel/"+x+"/console")
-				self.valid_values.append("boot/kernel/"+x+"/extraversion")
-				self.valid_values.append("boot/kernel/"+x+"/gk_action")
-				self.valid_values.append("boot/kernel/"+x+"/gk_kernargs")
-				self.valid_values.append("boot/kernel/"+x+"/initramfs_overlay")
-				self.valid_values.append("boot/kernel/"+x+"/machine_type")
-				self.valid_values.append("boot/kernel/"+x+"/sources")
-				self.valid_values.append("boot/kernel/"+x+"/softlevel")
-				self.valid_values.append("boot/kernel/"+x+"/use")
-				self.valid_values.append("boot/kernel/"+x+"/packages")
-				self.valid_values.append("boot/kernel/"+x+"/kernelopts")
-				if "boot/kernel/"+x+"/packages" in addlargs:
-					if isinstance(addlargs['boot/kernel/'+x+'/packages'], str):
-						addlargs["boot/kernel/"+x+"/packages"]=\
-							[addlargs["boot/kernel/"+x+"/packages"]]
+				self.valid_values.append("boot/kernel/" + x + "/aliases")
+				self.valid_values.append("boot/kernel/" + x + "/config")
+				self.valid_values.append("boot/kernel/" + x + "/console")
+				self.valid_values.append("boot/kernel/" + x + "/extraversion")
+				self.valid_values.append("boot/kernel/" + x + "/gk_action")
+				self.valid_values.append("boot/kernel/" + x + "/gk_kernargs")
+				self.valid_values.append("boot/kernel/" + x + "/initramfs_overlay")
+				self.valid_values.append("boot/kernel/" + x + "/machine_type")
+				self.valid_values.append("boot/kernel/" + x + "/sources")
+				self.valid_values.append("boot/kernel/" + x + "/softlevel")
+				self.valid_values.append("boot/kernel/" + x + "/use")
+				self.valid_values.append("boot/kernel/" + x + "/packages")
+				self.valid_values.append("boot/kernel/" + x + "/kernelopts")
+				if "boot/kernel/" + x + "/packages" in addlargs:
+					if isinstance(addlargs['boot/kernel/' + x + '/packages'], str):
+						addlargs["boot/kernel/" + x + "/packages"] = \
+							[addlargs["boot/kernel/" + x + "/packages"]]
 
 	def set_build_kernel_vars(self):
-		if self.settings["spec_prefix"]+"/gk_mainargs" in self.settings:
-			self.settings["gk_mainargs"]=\
-				self.settings[self.settings["spec_prefix"]+"/gk_mainargs"]
-			del self.settings[self.settings["spec_prefix"]+"/gk_mainargs"]
+		if self.settings["spec_prefix"] + "/gk_mainargs" in self.settings:
+			self.settings["gk_mainargs"] = \
+				self.settings[self.settings["spec_prefix"] + "/gk_mainargs"]
+			del self.settings[self.settings["spec_prefix"] + "/gk_mainargs"]
 
 	def kill_chroot_pids(self):
 		log.info('Checking for processes running in chroot and killing them.')
@@ -649,7 +649,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		killcmd = normpath(self.settings["sharedir"] +
 			self.settings["shdir"] + "/support/kill-chroot-pids.sh")
 		if os.path.exists(killcmd):
-			cmd([killcmd], env=self.env)
+			cmd([killcmd], env = self.env)
 
 	def mount_safety_check(self):
 		"""
@@ -682,22 +682,22 @@ class StageBase(TargetBase, ClearBase, GenBase):
 					raise CatalystError("Unable to auto-unbind " + target)
 
 	def unpack(self):
-		_unpack=True
+		_unpack = True
 
 		clst_unpack_hash = self.resume.get("unpack")
 
 		unpack_info = self.decompressor.create_infodict(
-			source=self.settings["source_path"],
-			destination=self.settings["chroot_path"],
-			arch=self.settings["compressor_arch"],
-			other_options=self.settings["compressor_options"],
+			source = self.settings["source_path"],
+			destination = self.settings["chroot_path"],
+			arch = self.settings["compressor_arch"],
+			other_options = self.settings["compressor_options"],
 			)
 
 		display_msg = (
 			'Starting %(mode)s from %(source)s\nto '
 			'%(destination)s (this may take some time) ..')
 
-		error_msg="'%(mode)s' extraction of %(source)s to %(destination)s failed."
+		error_msg = "'%(mode)s' extraction of %(source)s to %(destination)s failed."
 
 		if "seedcache" in self.settings["options"]:
 			if os.path.isdir(unpack_info["source"]):
@@ -716,26 +716,26 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			if os.path.isdir(self.settings["source_path"]) \
 				and self.resume.is_enabled("unpack"):
 				# Autoresume is valid, SEEDCACHE is valid
-				_unpack=False
-				invalid_snapshot=False
+				_unpack = False
+				invalid_snapshot = False
 
 			elif os.path.isfile(self.settings["source_path"]) \
-				and self.settings["source_path_hash"]==clst_unpack_hash:
+				and self.settings["source_path_hash"] == clst_unpack_hash:
 				# Autoresume is valid, tarball is valid
-				_unpack=False
-				invalid_snapshot=False
+				_unpack = False
+				invalid_snapshot = False
 
 			elif os.path.isdir(self.settings["source_path"]) \
 				and self.resume.is_disabled("unpack"):
 				# Autoresume is invalid, SEEDCACHE
-				_unpack=True
-				invalid_snapshot=True
+				_unpack = True
+				invalid_snapshot = True
 
 			elif os.path.isfile(self.settings["source_path"]) \
-				and self.settings["source_path_hash"]!=clst_unpack_hash:
+				and self.settings["source_path_hash"] != clst_unpack_hash:
 				# Autoresume is invalid, tarball
-				_unpack=True
-				invalid_snapshot=True
+				_unpack = True
+				invalid_snapshot = True
 				unpack_info['source'] = file_check(unpack_info['source'])
 
 		else:
@@ -743,18 +743,18 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			if "seedcache" in self.settings["options"]:
 				# SEEDCACHE so let's run rsync and let it clean up
 				if os.path.isdir(self.settings["source_path"]):
-					_unpack=True
-					invalid_snapshot=False
+					_unpack = True
+					invalid_snapshot = False
 				elif os.path.isfile(self.settings["source_path"]):
 					# Tarball so unpack and remove anything already there
-					_unpack=True
-					invalid_snapshot=True
+					_unpack = True
+					invalid_snapshot = True
 				# No autoresume, no SEEDCACHE
 			else:
 				# Tarball so unpack and remove anything already there
 				if os.path.isfile(self.settings["source_path"]):
-					_unpack=True
-					invalid_snapshot=True
+					_unpack = True
+					invalid_snapshot = True
 				elif os.path.isdir(self.settings["source_path"]):
 					# We should never reach this, so something is very wrong
 					raise CatalystError(
@@ -773,13 +773,13 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 			ensure_dirs(self.settings["chroot_path"])
 
-			ensure_dirs(self.settings["chroot_path"]+"/tmp",mode=1777)
+			ensure_dirs(self.settings["chroot_path"] + "/tmp", mode=1777)
 
 			if "pkgcache" in self.settings["options"]:
-				ensure_dirs(self.settings["pkgcache_path"],mode=0o755)
+				ensure_dirs(self.settings["pkgcache_path"], mode=0o755)
 
 			if "kerncache" in self.settings["options"]:
-				ensure_dirs(self.settings["kerncache_path"],mode=0o755)
+				ensure_dirs(self.settings["kerncache_path"], mode=0o755)
 
 			log.notice('%s', display_msg % unpack_info)
 
@@ -789,23 +789,23 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 			if "source_path_hash" in self.settings:
 				self.resume.enable("unpack",
-					data=self.settings["source_path_hash"])
+					data = self.settings["source_path_hash"])
 			else:
 				self.resume.enable("unpack")
 		else:
 			log.notice('Resume point detected, skipping unpack operation...')
 
 	def unpack_snapshot(self):
-		unpack=True
+		unpack = True
 		snapshot_hash = self.resume.get("unpack_portage")
 
-		unpack_errmsg="Error unpacking snapshot using mode %(mode)s"
+		unpack_errmsg = "Error unpacking snapshot using mode %(mode)s"
 
 		unpack_info = self.decompressor.create_infodict(
-			source=self.settings["snapshot_path"],
-			destination=self.settings["snapshot_cache_path"],
-			arch=self.settings["compressor_arch"],
-			other_options=self.settings["compressor_options"],
+			source = self.settings["snapshot_path"],
+			destination = self.settings["snapshot_cache_path"],
+			arch = self.settings["compressor_arch"],
+			other_options = self.settings["compressor_options"],
 			)
 
 		target_portdir = normpath(self.settings["chroot_path"] +
@@ -819,15 +819,15 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			unpack_info['mode'] = self.decompressor.determine_mode(
 				unpack_info['source'])
 
-			cleanup_msg="Cleaning up invalid snapshot cache at \n\t"+\
-				self.settings["snapshot_cache_path"]+\
+			cleanup_msg = "Cleaning up invalid snapshot cache at \n\t" + \
+				self.settings["snapshot_cache_path"] + \
 				" (this can take a long time)..."
 
-			if self.settings["snapshot_path_hash"]==snapshot_cache_hash:
+			if self.settings["snapshot_path_hash"] == snapshot_cache_hash:
 				log.info('Valid snapshot cache, skipping unpack of portage tree...')
-				unpack=False
+				unpack = False
 		else:
-			cleanup_msg=\
+			cleanup_msg = \
 				'Cleaning up existing portage tree (this can take a long time)...'
 			unpack_info['destination'] = normpath(
 				self.settings["chroot_path"] + self.settings["repo_basedir"])
@@ -858,7 +858,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			else:
 				log.info('Setting snapshot autoresume point')
 				self.resume.enable("unpack_portage",
-					data=self.settings["snapshot_path_hash"])
+					data = self.settings["snapshot_path_hash"])
 
 			if "snapcache" in self.settings["options"]:
 				self.snapcache_lock.unlock()
@@ -871,7 +871,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			# TODO: zmedico and I discussed making this a directory and pushing
 			# in a parent file, as well as other user-specified configuration.
 			log.info('Configuring profile link...')
-			clear_path(self.settings['chroot_path'] +
+			clear_path(self.settings['chroot_path'] + \
 				self.settings['port_conf'] + '/make.profile')
 			ensure_dirs(self.settings['chroot_path'] + self.settings['port_conf'])
 			cmd(['ln', '-sf',
@@ -903,15 +903,15 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				if os.path.exists(x):
 					log.info('Copying overlay dir %s', x)
 					ensure_dirs(self.settings['chroot_path'] + self.settings['local_overlay'])
-					cmd("cp -a "+x+"/* "+self.settings["chroot_path"]+\
-						self.settings["local_overlay"],\
+					cmd("cp -a " + x + "/* " + self.settings["chroot_path"] +
+						self.settings["local_overlay"],
 						env=self.env)
 
 	def root_overlay(self):
 		""" Copy over the root_overlay """
-		if self.settings["spec_prefix"]+"/root_overlay" in self.settings:
-			for x in self.settings[self.settings["spec_prefix"]+\
-				"/root_overlay"]:
+		if self.settings["spec_prefix"] + "/root_overlay" in self.settings:
+			for x in self.settings[self.settings["spec_prefix"] +
+					"/root_overlay"]:
 				if os.path.exists(x):
 					log.info('Copying root_overlay: %s', x)
 					cmd(['rsync', '-a', x + '/', self.settings['chroot_path']],
@@ -930,7 +930,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				if self.mountmap[x] not in ["tmpfs", "shmfs"]:
 					ensure_dirs(self.mountmap[x], mode=0o755)
 
-			src=self.mountmap[x]
+			src = self.mountmap[x]
 			log.debug('bind(); src = %s', src)
 			if "snapcache" in self.settings["options"] and x == "portdir":
 				self.snapcache_lock.read_lock()
@@ -956,9 +956,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		log.debug('bind(); finished :D')
 
 	def unbind(self):
-		ouch=0
-		mypath=self.settings["chroot_path"]
-		myrevmounts=self.mounts[:]
+		ouch = 0
+		mypath = self.settings["chroot_path"]
+		myrevmounts = self.mounts[:]
 		myrevmounts.reverse()
 		# Unmount in reverse order for nested bind-mounts
 		for x in myrevmounts:
@@ -980,7 +980,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				try:
 					cmd(['umount', target])
 				except CatalystError:
-					ouch=1
+					ouch = 1
 					log.warning("Couldn't umount bind mount: %s", target)
 
 			if "snapcache" in self.settings["options"] and x == "/usr/portage":
@@ -999,7 +999,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				"Couldn't umount one or more bind-mounts; aborting for safety.")
 
 	def chroot_setup(self):
-		self.makeconf=read_makeconf(normpath(self.settings["chroot_path"]+
+		self.makeconf = read_makeconf(normpath(self.settings["chroot_path"] +
 			self.settings["make_conf"]))
 		self.override_cbuild()
 		self.override_chost()
@@ -1045,7 +1045,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			makepath = normpath(self.settings["chroot_path"] +
 				self.settings["make_conf"])
 			clear_path(makepath)
-			myf=open(makepath, "w")
+			myf = open(makepath, "w")
 			myf.write("# These settings were set by the catalyst build script "
 					"that automatically\n# built this stage.\n")
 			myf.write("# Please consult "
@@ -1073,17 +1073,17 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				myf.write("# This should not be changed unless you know exactly"
 					" what you are doing.  You\n# should probably be "
 					"using a different stage, instead.\n")
-				myf.write('CBUILD="'+self.settings["CBUILD"]+'"\n')
+				myf.write('CBUILD="' + self.settings["CBUILD"] + '"\n')
 
 			if "CHOST" in self.settings:
 				myf.write("# WARNING: Changing your CHOST is not something "
 					"that should be done lightly.\n# Please consult "
 					"https://wiki.gentoo.org/wiki/Changing_the_CHOST_variable "
 					"before changing.\n")
-				myf.write('CHOST="'+self.settings["CHOST"]+'"\n')
+				myf.write('CHOST="' + self.settings["CHOST"] + '"\n')
 
 			# Figure out what our USE vars are for building
-			myusevars=[]
+			myusevars = []
 			if "HOSTUSE" in self.settings:
 				myusevars.extend(self.settings["HOSTUSE"])
 
@@ -1102,14 +1102,16 @@ class StageBase(TargetBase, ClearBase, GenBase):
 						'package.use in the profile and portage_confdir.\n'
 						"You've been warned!", self.settings['spec_prefix'])
 
-			myuseexpandvars={}
+			myuseexpandvars = {}
 			if "HOSTUSEEXPAND" in self.settings:
 				for hostuseexpand in self.settings["HOSTUSEEXPAND"]:
-					myuseexpandvars.update({hostuseexpand:self.settings["HOSTUSEEXPAND"][hostuseexpand]})
+					myuseexpandvars.update(
+						{hostuseexpand:self.settings["HOSTUSEEXPAND"][hostuseexpand]})
 
 			if myuseexpandvars:
 				for hostuseexpand in myuseexpandvars:
-					myf.write(hostuseexpand + '="' + ' '.join(myuseexpandvars[hostuseexpand]) + '"\n')
+					myf.write(hostuseexpand + '="' +
+						' '.join(myuseexpandvars[hostuseexpand]) + '"\n')
 
 			myf.write('PORTDIR="%s"\n' % self.settings['portdir'])
 			myf.write('DISTDIR="%s"\n' % self.settings['distdir'])
@@ -1172,7 +1174,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			try:
 				with open(make_conf) as f:
 					data = f.readlines()
-				data = ''.join(x for x in data if not x.startswith('PORTDIR_OVERLAY'))
+				data = ''.join(x for x in data
+						if not x.startswith('PORTDIR_OVERLAY'))
 				with open(make_conf, 'w') as f:
 					f.write(data)
 			except OSError as e:
@@ -1193,15 +1196,18 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			and self.resume.is_enabled("empty"):
 			log.notice('Resume point detected, skipping empty operation...')
 		else:
-			if self.settings["spec_prefix"]+"/empty" in self.settings:
-				if isinstance(self.settings[self.settings['spec_prefix']+'/empty'], str):
-					self.settings[self.settings["spec_prefix"]+"/empty"]=\
-						self.settings[self.settings["spec_prefix"]+\
+			if self.settings["spec_prefix"] + "/empty" in self.settings:
+				if isinstance(
+						self.settings[self.settings['spec_prefix'] + '/empty'],
+						str):
+					self.settings[self.settings["spec_prefix"] + "/empty"] = \
+						self.settings[self.settings["spec_prefix"] + \
 						"/empty"].split()
-				for x in self.settings[self.settings["spec_prefix"]+"/empty"]:
-					myemp=self.settings["destpath"]+x
+				for x in self.settings[self.settings["spec_prefix"] + "/empty"]:
+					myemp = self.settings["destpath"] + x
 					if not os.path.isdir(myemp) or os.path.islink(myemp):
-						log.warning('not a directory or does not exist, skipping "empty" operation: %s', x)
+						log.warning('not a directory or does not exist, '
+							'skipping "empty" operation: %s', x)
 						continue
 					log.info('Emptying directory %s', x)
 					clear_dir(myemp)
@@ -1212,8 +1218,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			and self.resume.is_enabled("remove"):
 			log.notice('Resume point detected, skipping remove operation...')
 		else:
-			if self.settings["spec_prefix"]+"/rm" in self.settings:
-				for x in self.settings[self.settings["spec_prefix"]+"/rm"]:
+			if self.settings["spec_prefix"] + "/rm" in self.settings:
+				for x in self.settings[self.settings["spec_prefix"] + "/rm"]:
 					# We're going to shell out for all these cleaning
 					# operations, so we get easy glob handling.
 					log.notice('livecd: removing %s', x)
@@ -1360,7 +1366,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 							self.env[varname] = "false"
 
 		if "makeopts" in self.settings:
-			self.env["MAKEOPTS"]=self.settings["makeopts"]
+			self.env["MAKEOPTS"] = self.settings["makeopts"]
 		log.debug('setup_environment(); env = %r', self.env)
 
 	def run(self):
@@ -1414,10 +1420,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			and self.resume.is_enabled("unmerge"):
 			log.notice('Resume point detected, skipping unmerge operation...')
 		else:
-			if self.settings["spec_prefix"]+"/unmerge" in self.settings:
-				if isinstance(self.settings[self.settings['spec_prefix']+'/unmerge'], str):
-					self.settings[self.settings["spec_prefix"]+"/unmerge"]=\
-						[self.settings[self.settings["spec_prefix"]+"/unmerge"]]
+			if self.settings["spec_prefix"] + "/unmerge" in self.settings:
+				if isinstance(self.settings[self.settings['spec_prefix'] + '/unmerge'], str):
+					self.settings[self.settings["spec_prefix"] + "/unmerge"] = \
+						[self.settings[self.settings["spec_prefix"] + "/unmerge"]]
 
 				# Before cleaning, unmerge stuff
 				try:
@@ -1445,8 +1451,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		and self.resume.is_enabled("setup_overlay"):
 			log.notice('Resume point detected, skipping setup_overlay operation...')
 		else:
-			if self.settings["spec_prefix"]+"/overlay" in self.settings:
-				for x in self.settings[self.settings["spec_prefix"]+"/overlay"]:
+			if self.settings["spec_prefix"] + "/overlay" in self.settings:
+				for x in self.settings[self.settings["spec_prefix"] + "/overlay"]:
 					if os.path.exists(x):
 						cmd(['rsync', '-a', x + '/', self.settings['target_path']],
 							env=self.env)
@@ -1465,7 +1471,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				self.gen_digest_file(self.settings["iso"])
 				self.resume.enable("create_iso")
 			else:
-				log.warning('livecd/iso was not defined.  An ISO Image will not be created.')
+				log.warning('livecd/iso was not defined.  '
+					'An ISO Image will not be created.')
 
 	def build_packages(self):
 		build_packages_resume = pjoin(self.settings["autoresume_path"],
@@ -1474,11 +1481,12 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			and self.resume.is_enabled("build_packages"):
 			log.notice('Resume point detected, skipping build_packages operation...')
 		else:
-			if self.settings["spec_prefix"]+"/packages" in self.settings:
+			if self.settings["spec_prefix"] + "/packages" in self.settings:
 				target_pkgs = self.settings["spec_prefix"] + '/packages'
 				if "autoresume" in self.settings["options"] \
 					and self.resume.is_enabled("build_packages"):
-					log.notice('Resume point detected, skipping build_packages operation...')
+					log.notice('Resume point detected, skipping build_packages '
+						'operation...')
 				else:
 					command = [self.settings['controller_file'], 'build_packages']
 					if isinstance(self.settings[target_pkgs], str):
@@ -1491,7 +1499,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
 						self.resume.enable("build_packages")
 					except CatalystError:
 						self.unbind()
-						raise CatalystError(self.settings["spec_prefix"]+\
+						raise CatalystError(
+							self.settings["spec_prefix"] +
 							"build aborting due to error.")
 
 	def build_kernel(self):
@@ -1502,14 +1511,14 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		else:
 			if "boot/kernel" in self.settings:
 				try:
-					mynames=self.settings["boot/kernel"]
+					mynames = self.settings["boot/kernel"]
 					if isinstance(mynames, str):
-						mynames=[mynames]
+						mynames = [mynames]
 					# Execute the script that sets up the kernel build environment
 					cmd([self.settings['controller_file'], 'pre-kmerge'],
 						env=self.env)
 					for kname in mynames:
-						self._build_kernel(kname=kname)
+						self._build_kernel(kname = kname)
 					self.resume.enable("build_kernel")
 				except CatalystError:
 					self.unbind()
@@ -1520,8 +1529,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
 	def _build_kernel(self, kname):
 		"Build a single configured kernel by name"
 		if "autoresume" in self.settings["options"] \
-			and self.resume.is_enabled("build_kernel_"+kname):
-			log.notice('Resume point detected, skipping build_kernel for %s operation...', kname)
+			and self.resume.is_enabled("build_kernel_" + kname):
+			log.notice('Resume point detected, skipping build_kernel '
+				'for %s operation...', kname)
 			return
 		self._copy_kernel_config(kname=kname)
 
@@ -1533,9 +1543,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 			if not isinstance(myopts, str):
 				myopts = ' '.join(myopts)
-				self.env[kname+"_kernelopts"]=myopts
+				self.env[kname + "_kernelopts"] = myopts
 			else:
-				self.env[kname+"_kernelopts"]=""
+				self.env[kname + "_kernelopts"] = ""
 
 		key = 'boot/kernel/' + kname + '/extraversion'
 		self.settings.setdefault(key, '')
@@ -1547,11 +1557,11 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		cmd([self.settings['controller_file'], 'kernel', kname],
 			env=self.env)
 
-		if "boot/kernel/"+kname+"/initramfs_overlay" in self.settings:
+		if "boot/kernel/" + kname + "/initramfs_overlay" in self.settings:
 			log.notice('Cleaning up temporary overlay dir')
 			clear_dir(self.settings['chroot_path'] + '/tmp/initramfs_overlay/')
 
-		self.resume.is_enabled("build_kernel_"+kname)
+		self.resume.is_enabled("build_kernel_" + kname)
 
 		# Execute the script that cleans up the kernel build environment
 		cmd([self.settings['controller_file'], 'post-kmerge'],


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2017-03-08 23:16 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2017-03-08 23:16 UTC (permalink / raw
  To: gentoo-commits

commit:     faa1349963f41c39c4fbf5da5445c526fab3430f
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  8 23:13:59 2017 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Wed Mar  8 23:14:50 2017 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=faa13499

base/stagebase.py: Add additional log messages for autoresume point invalidation

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 0d36e33..a6233b2 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -729,24 +729,28 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				# Autoresume is valid, SEEDCACHE is valid
 				_unpack = False
 				invalid_snapshot = False
+				log.notice('Resume point "unpack" valid...')
 
 			elif os.path.isfile(self.settings["source_path"]) \
 				and self.settings["source_path_hash"] == clst_unpack_hash:
 				# Autoresume is valid, tarball is valid
 				_unpack = False
 				invalid_snapshot = False
+				log.notice('Resume point "source_path_hash" valid...')
 
 			elif os.path.isdir(self.settings["source_path"]) \
 				and self.resume.is_disabled("unpack"):
 				# Autoresume is invalid, SEEDCACHE
 				_unpack = True
 				invalid_snapshot = True
+				log.notice('Resume point "unpack is disabled" is True, invalidating snapshot... :(')
 
 			elif os.path.isfile(self.settings["source_path"]) \
 				and self.settings["source_path_hash"] != clst_unpack_hash:
 				# Autoresume is invalid, tarball
 				_unpack = True
 				invalid_snapshot = True
+				log.notice('Resume point "source_path_hash" is invalid... :(')
 				unpack_info['source'] = file_check(unpack_info['source'])
 
 		else:


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2016-09-19  3:27 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2016-09-19  3:27 UTC (permalink / raw
  To: gentoo-commits

commit:     6b4f6861ad9847fe5c1be5c60167578f2404e11d
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 19 03:27:14 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Mon Sep 19 03:27:14 2016 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=6b4f6861

base/stagebase.py: Add 2 more debug logs for arch loading modules.

 catalyst/base/stagebase.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 904103f..68ccb79 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -74,6 +74,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		machinemap = {}
 		arch_dir = self.settings["archdir"] + "/"
 		for x in [x[:-3] for x in os.listdir(arch_dir) if x.endswith(".py") and x != "__init__.py"]:
+			log.debug("Begin loading arch modules...")
 			try:
 				fh=open(arch_dir + x + ".py")
 				# This next line loads the plugin as a module and assigns it to
@@ -94,6 +95,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				# the dir should load just fine. If it doesn't, it's probably a
 				# syntax error in the module
 				log.warning("Can't find/load %s.py plugin in %s", x, arch_dir)
+			log.debug("Loaded arch module: %s", self.archmap[x])
 
 		if "chost" in self.settings:
 			hostmachine = self.settings["chost"].split("-")[0]


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2016-06-25 15:46 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2016-06-25 15:46 UTC (permalink / raw
  To: gentoo-commits

commit:     8cf9e10774576c75777633e79bd2173c291e95cc
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 25 14:59:20 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Jun 25 14:59:20 2016 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=8cf9e107

stagebase.py: Add support for a single pkg to be listed in the specs stage?/packages

The code previously only supported packages as a list, but teh spec parser always makes a 
single item into a string, only multiple entries were a list.
This allows the packages list to be either a single string or a list of strings.

 catalyst/base/stagebase.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 6695ac4..904103f 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1473,14 +1473,18 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			log.notice('Resume point detected, skipping build_packages operation...')
 		else:
 			if self.settings["spec_prefix"]+"/packages" in self.settings:
+				target_pkgs = self.settings["spec_prefix"] + '/packages'
 				if "autoresume" in self.settings["options"] \
 					and self.resume.is_enabled("build_packages"):
 					log.notice('Resume point detected, skipping build_packages operation...')
 				else:
+					command = [self.settings['controller_file'], 'build_packages']
+					if isinstance(self.settings[target_pkgs], str):
+						command.append(self.settings[target_pkgs])
+					else:
+						command.extend(self.settings[target_pkgs])
 					try:
-						cmd([self.settings['controller_file'], 'build_packages'] +
-							self.settings[self.settings["spec_prefix"] + '/packages'],
-							env=self.env)
+						cmd(command, env=self.env)
 						fileutils.touch(build_packages_resume)
 						self.resume.enable("build_packages")
 					except CatalystError:


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2016-05-22  3:34 Mike Frysinger
  0 siblings, 0 replies; 144+ messages in thread
From: Mike Frysinger @ 2016-05-22  3:34 UTC (permalink / raw
  To: gentoo-commits

commit:     64255565bf45bd07a66405d876bbbe58b7a0c441
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Fri May 20 05:03:34 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Fri May 20 05:31:57 2016 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=64255565

use native code in more places for file ops

Rather than shell out to cp/rm/mv, use python native code to do things.

 catalyst/base/stagebase.py | 39 +++++++++++++++------------------------
 1 file changed, 15 insertions(+), 24 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 2009ab6..0b25516 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1013,8 +1013,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		else:
 			log.notice('Setting up chroot...')
 
-			cmd("cp /etc/resolv.conf " + self.settings["chroot_path"] + "/etc/",
-				env=self.env)
+			shutil.copy('/etc/resolv.conf', self.settings['chroot_path'] + '/etc/')
 
 			# Copy over the envscript, if applicable
 			if "envscript" in self.settings:
@@ -1030,18 +1029,15 @@ class StageBase(TargetBase, ClearBase, GenBase):
 					'Catalyst Maintainers use VERY minimal envscripts, if used at all.\n'
 					'You have been warned.')
 
-				cmd("cp "+self.settings["envscript"]+" "+\
-					self.settings["chroot_path"]+"/tmp/envscript",\
-					env=self.env)
+				shutil.copy(self.settings['envscript'],
+					self.settings['chroot_path'] + '/tmp/envscript')
 
 			# Copy over /etc/hosts from the host in case there are any
 			# specialties in there
-			if os.path.exists(self.settings["chroot_path"]+"/etc/hosts"):
-				cmd("mv "+self.settings["chroot_path"]+"/etc/hosts "+\
-					self.settings["chroot_path"]+"/etc/hosts.catalyst",\
-					env=self.env)
-				cmd("cp /etc/hosts "+self.settings["chroot_path"]+"/etc/hosts",\
-					env=self.env)
+			hosts_file = self.settings['chroot_path'] + '/etc/hosts'
+			if os.path.exists(hosts_file):
+				os.rename(hosts_file, hosts_file + '.catalyst')
+				shutil.copy('/etc/hosts', hosts_file)
 
 			# Modify and write out make.conf (for the chroot)
 			makepath = normpath(self.settings["chroot_path"] +
@@ -1162,10 +1158,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				clear_path(self.settings["destpath"] + x)
 
 		# Put /etc/hosts back into place
-		if os.path.exists(self.settings["chroot_path"]+"/etc/hosts.catalyst"):
-			cmd("mv -f "+self.settings["chroot_path"]+"/etc/hosts.catalyst "+\
-				self.settings["chroot_path"]+"/etc/hosts",\
-				env=self.env)
+		hosts_file = self.settings['chroot_path'] + '/etc/hosts'
+		if os.path.exists(hosts_file + '.catalyst'):
+			os.rename(hosts_file + '.catalyst', hosts_file)
 
 		# Remove our overlay
 		if os.path.exists(self.settings["chroot_path"] + self.settings["local_overlay"]):
@@ -1565,11 +1560,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			env=self.env)
 
 		if "boot/kernel/"+kname+"/initramfs_overlay" in self.settings:
-			if os.path.exists(self.settings["chroot_path"]+\
-				"/tmp/initramfs_overlay/"):
-				log.notice('Cleaning up temporary overlay dir')
-				cmd("rm -R "+self.settings["chroot_path"]+\
-					"/tmp/initramfs_overlay/",env=self.env)
+			log.notice('Cleaning up temporary overlay dir')
+			clear_dir(self.settings['chroot_path'] + '/tmp/initramfs_overlay/')
 
 		self.resume.is_enabled("build_kernel_"+kname)
 
@@ -1586,11 +1578,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 					self.settings[key])
 
 			try:
-				cmd('cp ' + self.settings[key] + ' ' +
-					self.settings['chroot_path'] + '/var/tmp/' + kname + '.config',
-					env=self.env)
+				shutil.copy(self.settings[key],
+					self.settings['chroot_path'] + '/var/tmp/' + kname + '.config')
 
-			except CatalystError:
+			except IOError:
 				self.unbind()
 
 	def _copy_initramfs_overlay(self, kname):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2016-05-20  3:03 Mike Frysinger
  0 siblings, 0 replies; 144+ messages in thread
From: Mike Frysinger @ 2016-05-20  3:03 UTC (permalink / raw
  To: gentoo-commits

commit:     d8c463e167f5be77bedf767646d9485a9a8f4f8f
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu May 19 19:22:13 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu May 19 19:39:22 2016 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d8c463e1

clear_dir: use kwargs everywhere

Don't pass args by position when clear_args uses optional args.
This makes it easy to screw up the calls when changing the API.

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

diff --git a/catalyst/base/clearbase.py b/catalyst/base/clearbase.py
index 9a4c625..644a385 100644
--- a/catalyst/base/clearbase.py
+++ b/catalyst/base/clearbase.py
@@ -30,13 +30,13 @@ class ClearBase(object):
 	def clear_chroot(self):
 		self.chroot_lock.unlock()
 		log.notice('Clearing the chroot path ...')
-		clear_dir(self.settings["chroot_path"], 0o755, True)
+		clear_dir(self.settings["chroot_path"], mode=0o755, chg_flags=True)
 
 
 	def remove_chroot(self):
 		self.chroot_lock.unlock()
 		log.notice('Removing the chroot path ...')
-		clear_dir(self.settings["chroot_path"], 0o755, True, remove=True)
+		clear_dir(self.settings["chroot_path"], mode=0o755, chg_flags=True, remove=True)
 
 
 	def clear_packages(self, remove=False):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2016-03-24 14:37 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2016-03-24 14:37 UTC (permalink / raw
  To: gentoo-commits

commit:     558064f6752e8446414f2e9aaad83b15660cb84a
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 24 14:35:57 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Mar 24 14:35:57 2016 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=558064f6

stagebase.py: Change a second unpack_info to use the decompressor.create_infodict()

I missed one of the unpack_info definitions in the previous commit.
This eliminates the need to manually add in CompressMap global variables which are
automatically added to the info_dict.
Fixes commit: 966bff4dae7ed88aa807282ae299c3c0da1f966d

 catalyst/base/stagebase.py | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index b7fefb5..b6dd08d 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -800,13 +800,12 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 		unpack_errmsg="Error unpacking snapshot using mode %(mode)s"
 
-		unpack_info = {
-			'source': self.settings["snapshot_path"],
-			'destination': self.settings["snapshot_cache_path"],
-			'mode': None,
-			'auto-ext': False,
-			'other_options': self.settings["compressor_options"],
-			}
+		unpack_info = self.decompressor.create_infodict(
+			source=self.settings["snapshot_path"],
+			destination=self.settings["snapshot_cache_path"],
+			arch=self.settings["compressor_arch"],
+			other_options=self.settings["compressor_options"],
+			)
 
 		target_portdir = normpath(self.settings["chroot_path"] +
 			self.settings["repo_basedir"] + "/" + self.settings["repo_name"])


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2016-03-23 21:15 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2016-03-23 21:15 UTC (permalink / raw
  To: gentoo-commits

commit:     70457ffd8cd98593510d4baeb3010aad2f209065
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 23 21:14:33 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Wed Mar 23 21:14:33 2016 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=70457ffd

stagebase.py: Change unpack_info to use the decompressor.create_infodict()

This eliminates the need to manually add in CompressMap global variables which are
automatically added to the info_dict.
Fixes commit: 966bff4dae7ed88aa807282ae299c3c0da1f966d

 catalyst/base/stagebase.py | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 5e87f44..b7fefb5 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -685,13 +685,12 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 		clst_unpack_hash = self.resume.get("unpack")
 
-		unpack_info = {
-			'source': self.settings["source_path"],
-			"destination": self.settings["chroot_path"],
-			'mode': None,
-			'auto-ext': False,
-			'other_options': self.settings["compressor_options"],
-			}
+		unpack_info = self.decompressor.create_infodict(
+			source=self.settings["source_path"],
+			destination=self.settings["chroot_path"],
+			arch=self.settings["compressor_arch"],
+			other_options=self.settings["compressor_options"],
+			)
 
 		display_msg = (
 			'Starting %(mode)s from %(source)s\nto '


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2016-03-21  4:55 Mike Frysinger
  0 siblings, 0 replies; 144+ messages in thread
From: Mike Frysinger @ 2016-03-21  4:55 UTC (permalink / raw
  To: gentoo-commits

commit:     ff4449cbfc251707c573ec9e430dd04bdaa1424a
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 21 04:54:35 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Mar 21 04:54:35 2016 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ff4449cb

stagebase: clean up some redundant key lookups

A bunch of places copy & paste the key used to index dicts.
Use a variable instead to simplify the code a bit.

 catalyst/base/stagebase.py | 62 ++++++++++++++++++----------------------------
 1 file changed, 24 insertions(+), 38 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index eeaea6c..98c4959 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1565,24 +1565,19 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 		# If we need to pass special options to the bootloader
 		# for this kernel put them into the environment
-		if "boot/kernel/"+kname+"/kernelopts" in self.settings:
-			myopts=self.settings["boot/kernel/"+kname+\
-				"/kernelopts"]
+		key = 'boot/kernel/' + kname + '/kernelopts'
+		if key in self.settings:
+			myopts = self.settings[key]
 
 			if not isinstance(myopts, str):
 				myopts = ' '.join(myopts)
 				self.env[kname+"_kernelopts"]=myopts
-
 			else:
 				self.env[kname+"_kernelopts"]=""
 
-		if "boot/kernel/"+kname+"/extraversion" not in self.settings:
-			self.settings["boot/kernel/"+kname+\
-				"/extraversion"]=""
-
-		self.env["clst_kextraversion"]=\
-			self.settings["boot/kernel/"+kname+\
-			"/extraversion"]
+		key = 'boot/kernel/' + kname + '/extraversion'
+		self.settings.setdefault(key, '')
+		self.env["clst_kextraversion"] = self.settings[key]
 
 		self._copy_initramfs_overlay(kname=kname)
 
@@ -1606,44 +1601,35 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			"Runscript post-kmerge failed",env=self.env)
 
 	def _copy_kernel_config(self, kname):
-		if "boot/kernel/"+kname+"/config" in self.settings:
-			if not os.path.exists(self.settings["boot/kernel/"+kname+"/config"]):
+		key = 'boot/kernel/' + kname + '/config'
+		if key in self.settings:
+			if not os.path.exists(self.settings[key]):
 				self.unbind()
-				raise CatalystError(
-					"Can't find kernel config: "+\
-					self.settings["boot/kernel/"+kname+\
-					"/config"])
+				raise CatalystError("Can't find kernel config: %s" %
+					self.settings[key])
 
 			try:
-				cmd("cp "+self.settings["boot/kernel/"+kname+\
-					"/config"]+" "+\
-					self.settings["chroot_path"]+"/var/tmp/"+\
-					kname+".config",\
-					"Couldn't copy kernel config: "+\
-					self.settings["boot/kernel/"+kname+\
-					"/config"],env=self.env)
+				cmd('cp ' + self.settings[key] + ' ' +
+					self.settings['chroot_path'] + '/var/tmp/' + kname + '.config',
+					"Couldn't copy kernel config: %s" % self.settings[key],
+					env=self.env)
 
 			except CatalystError:
 				self.unbind()
 
 	def _copy_initramfs_overlay(self, kname):
-		if "boot/kernel/"+kname+"/initramfs_overlay" in self.settings:
-			if os.path.exists(self.settings["boot/kernel/"+\
-				kname+"/initramfs_overlay"]):
-				log.notice('Copying initramfs_overlay dir %s',
-					self.settings['boot/kernel/' + kname + '/initramfs_overlay'])
+		key = 'boot/kernel/' + kname + '/initramfs_overlay'
+		if key in self.settings:
+			if os.path.exists(self.settings[key]):
+				log.notice('Copying initramfs_overlay dir %s', self.settings[key])
 
 				ensure_dirs(
 					self.settings['chroot_path'] +
-					'/tmp/initramfs_overlay/' +
-					self.settings['boot/kernel/'+kname+'/initramfs_overlay'])
-
-				cmd("cp -R "+self.settings["boot/kernel/"+\
-					kname+"/initramfs_overlay"]+"/* "+\
-					self.settings["chroot_path"]+\
-					"/tmp/initramfs_overlay/"+\
-					self.settings["boot/kernel/"+kname+\
-					"/initramfs_overlay"],env=self.env)
+					'/tmp/initramfs_overlay/' + self.settings[key])
+
+				cmd('cp -R ' + self.settings[key] + '/* ' +
+					self.settings['chroot_path'] +
+					'/tmp/initramfs_overlay/' + self.settings[key], env=self.env)
 
 	def bootloader(self):
 		if "autoresume" in self.settings["options"] \


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2016-03-17  5:04 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2016-03-17  5:04 UTC (permalink / raw
  To: gentoo-commits

commit:     a92e16b6f5be895cc62d9eee404efa78b4e14c59
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 17 04:51:58 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Mar 17 05:03:09 2016 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=a92e16b6

stagebase.py: Fix missed hard coded overlay path

Credit goes to: Colton McInroy <nam <AT> thelinuxplace.com>
For testing overlay relocation from the original path and finding it.

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 98e0477..8d326ea 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1130,7 +1130,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 			# Setup the portage overlay
 			if "portage_overlay" in self.settings:
-				myf.write('PORTDIR_OVERLAY="/usr/local/portage"\n')
+				myf.write('PORTDIR_OVERLAY="%s"\n' %  self.settings["local_overlay"])
 
 			# Set default locale for system responses. #478382
 			myf.write(


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2016-02-17  8:17 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2016-02-17  8:17 UTC (permalink / raw
  To: gentoo-commits

commit:     b663d505e734a0ad0c931f20637832546da413f3
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 17 08:12:31 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Wed Feb 17 08:12:31 2016 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=b663d505

catalyst/base/stagebase.py: Fix commit 7536857c1a seedcache handling

I mistakenly added the file_check() use in this if block breaking seedcache use.

SHA: 7536857c1a14d2eec224e80ba96ab9f3091e0d1c
Subject: Make the new compress code handling compatible with existing specs
Author: Brian Dolbec <dolsen <AT> gentoo.org> (Mon 07 Sep 2015 05:35:41 PM PDT)

 catalyst/base/stagebase.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 002839e..98e0477 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -730,8 +730,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				# Autoresume is invalid, SEEDCACHE
 				_unpack=True
 				invalid_snapshot=True
-				# check and reset the unpack_info['source']
-				unpack_info['source'] = file_check(unpack_info['source'])
 
 			elif os.path.isfile(self.settings["source_path"]) \
 				and self.settings["source_path_hash"]!=clst_unpack_hash:


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2016-02-11 16:43 Mike Frysinger
  0 siblings, 0 replies; 144+ messages in thread
From: Mike Frysinger @ 2016-02-11 16:43 UTC (permalink / raw
  To: gentoo-commits

commit:     571fd55b3424a9f86e2d1f6a1af5ec1ac25fc7f4
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 11 13:47:26 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Feb 11 13:47:26 2016 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=571fd55b

stagebase: use ensure_dirs instead of cmd(mkdir -p)

 catalyst/base/stagebase.py | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index e291c30..002839e 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -881,8 +881,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			cmd("rm -f " + self.settings["chroot_path"] +
 				self.settings["port_conf"] + "/make.profile",
 				"Error zapping profile link",env=self.env)
-			cmd("mkdir -p " + self.settings["chroot_path"] +
-				self.settings["port_conf"])
+			ensure_dirs(self.settings['chroot_path'] + self.settings['port_conf'])
 			cmd("ln -sf ../.." + self.settings["portdir"] + "/profiles/" +
 				self.settings["target_profile"] + " " +
 				self.settings["chroot_path"] +
@@ -913,9 +912,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			for x in self.settings["portage_overlay"]:
 				if os.path.exists(x):
 					log.info('Copying overlay dir %s', x)
-					cmd("mkdir -p "+self.settings["chroot_path"]+\
-						self.settings["local_overlay"],\
-						"Could not make portage_overlay dir",env=self.env)
+					ensure_dirs(self.settings['chroot_path'] + self.settings['local_overlay'])
 					cmd("cp -a "+x+"/* "+self.settings["chroot_path"]+\
 						self.settings["local_overlay"],\
 						"Could not copy portage_overlay",env=self.env)
@@ -1632,11 +1629,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				log.notice('Copying initramfs_overlay dir %s',
 					self.settings['boot/kernel/' + kname + '/initramfs_overlay'])
 
-				cmd("mkdir -p "+\
-					self.settings["chroot_path"]+\
-					"/tmp/initramfs_overlay/"+\
-					self.settings["boot/kernel/"+kname+\
-					"/initramfs_overlay"],env=self.env)
+				ensure_dirs(
+					self.settings['chroot_path'] +
+					'/tmp/initramfs_overlay/' +
+					self.settings['boot/kernel/'+kname+'/initramfs_overlay'])
 
 				cmd("cp -R "+self.settings["boot/kernel/"+\
 					kname+"/initramfs_overlay"]+"/* "+\


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2016-02-11 13:59 Mike Frysinger
  0 siblings, 0 replies; 144+ messages in thread
From: Mike Frysinger @ 2016-02-11 13:59 UTC (permalink / raw
  To: gentoo-commits

commit:     d8b2a96f1d96d1c64b10c3c9607fd8ebf2a983a5
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 11 13:11:36 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Feb 11 13:11:36 2016 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d8b2a96f

stagebase: avoid using `sed`

The `sed -i` command is not portable, so rewrite the logic in pure
python.  This is faster anyways.

Bugzilla: https://bugs.gentoo.org/363577
Reported-by: Yuta SATOH <nigoro.dev <AT> gmail.com>

 catalyst/base/stagebase.py | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 8891b3f..e291c30 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1188,9 +1188,16 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		if os.path.exists(self.settings["chroot_path"] + self.settings["local_overlay"]):
 			cmd("rm -rf " + self.settings["chroot_path"] + self.settings["local_overlay"],
 				"Could not remove " + self.settings["local_overlay"], env=self.env)
-			cmd("sed -i '/^PORTDIR_OVERLAY/d' "+self.settings["chroot_path"]+\
-				self.settings["make_conf"],\
-				"Could not remove PORTDIR_OVERLAY from make.conf",env=self.env)
+
+			make_conf = self.settings['chroot_path'] + self.settings['make_conf']
+			try:
+				with open(make_conf) as f:
+					data = f.readlines()
+				data = ''.join(x for x in data if not x.startswith('PORTDIR_OVERLAY'))
+				with open(make_conf, 'w') as f:
+					f.write(data)
+			except OSError as e:
+				raise CatalystError('Could not update %s: %s' % (make_conf, e))
 
 		# Clean up old and obsoleted files in /etc
 		if os.path.exists(self.settings["stage_path"]+"/etc"):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-12-23  4:30 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2015-12-23  4:30 UTC (permalink / raw
  To: gentoo-commits

commit:     c607e85594e5db23e0a064fb6c9ac08fb0f5a811
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 23 04:28:42 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Wed Dec 23 04:28:42 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=c607e855

base/stagebase.py: Clear up some additional trailing slash issues

Since the target_subpath's trailing slash is neded for several operations.
This code removes that trailing slash for operations outside the python codebase.

 catalyst/base/stagebase.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 67b6653..c800c34 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1330,8 +1330,11 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			varname = varname.replace(".", "_")
 			if isinstance(self.settings[x], str):
 				# Prefix to prevent namespace clashes
-				#os.environ[varname]=self.settings[x]
-				self.env[varname]=self.settings[x]
+				#os.environ[varname] = self.settings[x]
+				if "path" in x:
+					self.env[varname] = self.settings[x].rstrip("/")
+				else:
+					self.env[varname] = self.settings[x]
 			elif isinstance(self.settings[x], list):
 				#os.environ[varname] = ' '.join(self.settings[x])
 				self.env[varname] = ' '.join(self.settings[x])
@@ -1631,7 +1634,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		else:
 			try:
 				cmd(self.settings["controller_file"]+\
-					" bootloader " + self.settings["target_path"],\
+					" bootloader " + self.settings["target_path"].rstrip('/'),\
 					"Bootloader script failed.",env=self.env)
 				self.resume.enable("bootloader")
 			except CatalystError:


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-12-20  4:47 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2015-12-20  4:47 UTC (permalink / raw
  To: gentoo-commits

commit:     0c350da62bc96d278c2630fecad9996ecd28cf55
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 20 04:46:14 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sun Dec 20 04:46:14 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=0c350da6

stagebase.py: Create correct docstrings for the set*action_sequence methods

 catalyst/base/stagebase.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index c2902ed..67b6653 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -498,13 +498,18 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			self.settings["iso_volume_id"]="catalyst "+self.settings["snapshot"]
 
 	def set_default_action_sequence(self):
-		""" Default action sequence for run method """
+		""" Default action sequence for run method.
+
+		This method sets the optional purgeonly action sequence and returns.
+		Or it calls the normal set_action_sequence() for the target stage.
+		"""
 		if "purgeonly" in self.settings["options"]:
 			self.settings["action_sequence"] = ["remove_chroot"]
 			return
 		self.set_action_sequence()
 
 	def set_action_sequence(self):
+		"""Set basic stage1, 2, 3 action sequences"""
 		self.settings["action_sequence"]=["unpack","unpack_snapshot",\
 				"setup_confdir","portage_overlay",\
 				"base_dirs","bind","chroot_setup","setup_environment",\


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-12-20  1:13 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2015-12-20  1:13 UTC (permalink / raw
  To: gentoo-commits

commit:     208ad850b52416b80844a553836bdd76f092692c
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 20 01:08:29 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sun Dec 20 01:11:45 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=208ad850

stagebase.py: Fix -P action for stages beyond stage3

Since commit f2afd7ff03e6e8453e86be938bd21c2cd33d3996 it removed the return after calling purge().  Since the remove_chroot operation was separated and that return removed, any target stage that overrode the set_action_sequence no longer did the ful purgeonly step, but continued to add the normal action_sequences for that stage.

 catalyst/base/stagebase.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index a880249..c2902ed 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -160,7 +160,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		self.set_target_path()
 
 		self.set_controller_file()
-		self.set_action_sequence()
+		self.set_default_action_sequence()
 		self.set_use()
 		self.set_cleanables()
 		self.set_iso_volume_id()
@@ -497,11 +497,14 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		else:
 			self.settings["iso_volume_id"]="catalyst "+self.settings["snapshot"]
 
-	def set_action_sequence(self):
+	def set_default_action_sequence(self):
 		""" Default action sequence for run method """
 		if "purgeonly" in self.settings["options"]:
 			self.settings["action_sequence"] = ["remove_chroot"]
 			return
+		self.set_action_sequence()
+
+	def set_action_sequence(self):
 		self.settings["action_sequence"]=["unpack","unpack_snapshot",\
 				"setup_confdir","portage_overlay",\
 				"base_dirs","bind","chroot_setup","setup_environment",\


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-12-15 17:13 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2015-12-15 17:13 UTC (permalink / raw
  To: gentoo-commits

commit:     4536a30781c9b3ca7245a39634093e93ccd5344c
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 15 16:44:18 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue Dec 15 16:44:18 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4536a307

stagebase.py: Clean out some dead set_target_path() code

 catalyst/base/stagebase.py | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 62950b5..92f300e 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -343,16 +343,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			and self.resume.is_enabled("setup_target_path"):
 			log.notice('Resume point detected, skipping target path setup operation...')
 		else:
-			# First clean up any existing target stuff
-			# XXX WTF are we removing the old tarball before we start building the
-			# XXX new one? If the build fails, you don't want to be left with
-			# XXX nothing at all
-#			if os.path.isfile(self.settings["target_path"]):
-#				cmd("rm -f "+self.settings["target_path"],\
-#					"Could not remove existing file: "\
-#					+self.settings["target_path"],env=self.env)
 			self.resume.enable("setup_target_path")
-
 			ensure_dirs(self.settings["storedir"] + "/builds")
 
 	def set_fsscript(self):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:pending commit in: catalyst/base/
@ 2015-11-21  1:33 Brian Dolbec
  2015-11-10  6:42 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
  0 siblings, 1 reply; 144+ messages in thread
From: Brian Dolbec @ 2015-11-21  1:33 UTC (permalink / raw
  To: gentoo-commits

commit:     d174bfbeb410f07a34a81c8d56b02df5b53f76ae
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 10 06:36:23 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue Nov 10 06:37:16 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d174bfbe

genbase.py: Switch  from codecs.open to io.open

io.open is the builtin open() in py3

 catalyst/base/genbase.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/catalyst/base/genbase.py b/catalyst/base/genbase.py
index 0c8dbb9..8af3b97 100644
--- a/catalyst/base/genbase.py
+++ b/catalyst/base/genbase.py
@@ -1,5 +1,5 @@
 
-import codecs
+import io
 import os
 
 
@@ -18,7 +18,7 @@ class GenBase(object):
 		if "contents" in self.settings:
 			contents_map = self.settings["contents_map"]
 			if os.path.exists(path):
-				with codecs.open(contents, "w", encoding='utf-8') as myf:
+				with io.open(contents, "w", encoding='utf-8') as myf:
 					keys={}
 					for i in self.settings["contents"].split():
 						keys[i]=1
@@ -36,7 +36,7 @@ class GenBase(object):
 		if "digests" in self.settings:
 			hash_map = self.settings["hash_map"]
 			if os.path.exists(path):
-				with codecs.open(digests, "w", encoding='utf-8') as myf:
+				with io.open(digests, "w", encoding='utf-8') as myf:
 					keys={}
 					for i in self.settings["digests"].split():
 						keys[i]=1


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-11-20 21:26 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2015-11-20 21:26 UTC (permalink / raw
  To: gentoo-commits

commit:     20f6cd7ab2662ec23031b5a843a175a1236e83d3
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 20 21:23:59 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Fri Nov 20 21:24:31 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=20f6cd7a

stagebase.py: Fix the empty .../build/default/stage* directory creation

self.settings["target_path"] contained a trailing slash.
This made the os.path.dirname() operation on it only drop the trailing slash.
What was desired was the for the .../build/default  path.

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 69b7b0d..62950b5 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1263,7 +1263,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		else:
 			log.notice('Capture target in a tarball')
 			# Remove filename from path
-			mypath = os.path.dirname(self.settings["target_path"])
+			mypath = os.path.dirname(self.settings["target_path"].rstrip('/'))
 
 			# Now make sure path exists
 			ensure_dirs(mypath)


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-11-09  4:47 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2015-11-09  4:47 UTC (permalink / raw
  To: gentoo-commits

commit:     fb7d86366df544a024cbb40edbf693538432cc9e
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  9 04:45:10 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Mon Nov  9 04:45:10 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=fb7d8636

genbase.py: Fix py3 compatibilty issue for contents saving

Convert to using the with statement as well.

 catalyst/base/genbase.py | 54 +++++++++++++++++++++++-------------------------
 1 file changed, 26 insertions(+), 28 deletions(-)

diff --git a/catalyst/base/genbase.py b/catalyst/base/genbase.py
index 8a1af8d..4214b45 100644
--- a/catalyst/base/genbase.py
+++ b/catalyst/base/genbase.py
@@ -1,5 +1,5 @@
 
-
+import codecs
 import os
 
 
@@ -18,17 +18,16 @@ class GenBase(object):
 		if "contents" in self.settings:
 			contents_map = self.settings["contents_map"]
 			if os.path.exists(path):
-				myf = open(contents, "w")
-				keys={}
-				for i in self.settings["contents"].split():
-					keys[i]=1
-					array = sorted(keys.keys())
-				for j in array:
-					contents = contents_map.contents(path, j,
-						verbose=self.settings["VERBOSE"])
-					if contents:
-						myf.write(contents)
-				myf.close()
+				with codecs.open(contents, "w", encoding='utf-8') as myf:
+					keys={}
+					for i in self.settings["contents"].split():
+						keys[i]=1
+						array = sorted(keys.keys())
+					for j in array:
+						contents = contents_map.contents(path, j,
+							verbose=self.settings["VERBOSE"])
+						if contents:
+							myf.write(contents)
 
 	def gen_digest_file(self, path):
 		digests = path + ".DIGESTS"
@@ -37,20 +36,19 @@ class GenBase(object):
 		if "digests" in self.settings:
 			hash_map = self.settings["hash_map"]
 			if os.path.exists(path):
-				myf=open(digests, "w")
-				keys={}
-				for i in self.settings["digests"].split():
-					keys[i]=1
-					array = sorted(keys.keys())
-				for f in [path, path + '.CONTENTS']:
-					if os.path.exists(f):
-						if "all" in array:
-							for k in list(hash_map.hash_map):
-								digest = hash_map.generate_hash(f, hash_=k)
-								myf.write(digest)
-						else:
-							for j in array:
-								digest = hash_map.generate_hash(f, hash_=j)
-								myf.write(digest)
-				myf.close()
+				with codecs.open(digests, "w", encoding='utf-8') as myf:
+					keys={}
+					for i in self.settings["digests"].split():
+						keys[i]=1
+						array = sorted(keys.keys())
+					for f in [path, path + '.CONTENTS']:
+						if os.path.exists(f):
+							if "all" in array:
+								for k in list(hash_map.hash_map):
+									digest = hash_map.generate_hash(f, hash_=k)
+									myf.write(digest)
+							else:
+								for j in array:
+									digest = hash_map.generate_hash(f, hash_=j)
+									myf.write(digest)
 


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-10-31 20:35 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2015-10-31 20:35 UTC (permalink / raw
  To: gentoo-commits

commit:     b409bd9bb4b50f69a555e4e148057ade86a7ed16
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 31 20:26:40 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Oct 31 20:26:40 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=b409bd9b

stagebase.py: Refactor the *FLAGS handling code in chroot_setup()

*FLAGS settings in spec files are loaded as a list.
Although the config loading code has not changed in quite some time, the code was still
treating these settings as strings.  I don't know why the error was not triggered long ago.
The code now handle 

 catalyst/base/stagebase.py | 46 +++++++++++++++++-----------------------------
 1 file changed, 17 insertions(+), 29 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 0e4d8c2..5ba9cfc 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1055,36 +1055,24 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			myf=open(makepath, "w")
 			myf.write("# These settings were set by the catalyst build script that automatically\n# built this stage.\n")
 			myf.write("# Please consult /usr/share/portage/config/make.conf.example for a more\n# detailed example.\n")
-			if "CFLAGS" in self.settings:
-				myf.write('CFLAGS="'+self.settings["CFLAGS"]+'"\n')
-			if "CXXFLAGS" in self.settings:
-				if self.settings["CXXFLAGS"]!=self.settings["CFLAGS"]:
-					myf.write('CXXFLAGS="'+self.settings["CXXFLAGS"]+'"\n')
-				else:
-					myf.write('CXXFLAGS="${CFLAGS}"\n')
-			else:
-				myf.write('CXXFLAGS="${CFLAGS}"\n')
-			if "FCFLAGS" in self.settings:
-				if self.settings["FCFLAGS"]!=self.settings["CFLAGS"]:
-					myf.write('FCFLAGS="'+self.settings["FCFLAGS"]+'"\n')
-				else:
-					myf.write('FCFLAGS="${CFLAGS}"\n')
-			else:
-				myf.write('FCFLAGS="${CFLAGS}"\n')
-			if "FFLAGS" in self.settings:
-				if self.settings["FFLAGS"]!=self.settings["CFLAGS"]:
-					myf.write('FFLAGS="'+self.settings["FFLAGS"]+'"\n')
+
+			for flags in ["CFLAGS", "CXXFLAGS", "FCFLAGS", "FFLAGS", "LDFLAGS",
+						"ASFLAGS"]:
+				if not flags in self.settings:
+					continue
+				if flags in ["LDFLAGS", "ASFLAGS"]:
+					myf.write("# %s is unsupported.  USE AT YOUR OWN RISK!\n"
+							% flags)
+				if (flags is not "CFLAGS" and
+					self.settings[flags] == self.settings["CFLAGS"]):
+						myf.write('%s="${CFLAGS}"\n' % flags)
+				elif isinstance(self.settings[flags], list):
+					myf.write('%s="%s"\n'
+							% (flags, ' '.join(self.settings[flags])))
 				else:
-					myf.write('FFLAGS="${CFLAGS}"\n')
-			else:
-				myf.write('FFLAGS="${CFLAGS}"\n')
-
-			if "LDFLAGS" in self.settings:
-				myf.write("# LDFLAGS is unsupported.  USE AT YOUR OWN RISK!\n")
-				myf.write('LDFLAGS="'+self.settings["LDFLAGS"]+'"\n')
-			if "ASFLAGS" in self.settings:
-				myf.write("# ASFLAGS is unsupported.  USE AT YOUR OWN RISK!\n")
-				myf.write('ASFLAGS="'+self.settings["ASFLAGS"]+'"\n')
+					myf.write('%s="%s"\n'
+							% (flags, self.settings[flags]))
+
 			if "CBUILD" in self.settings:
 				myf.write("# This should not be changed unless you know exactly what you are doing.  You\n# should probably be using a different stage, instead.\n")
 				myf.write('CBUILD="'+self.settings["CBUILD"]+'"\n')


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-10-31 20:35 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2015-10-31 20:35 UTC (permalink / raw
  To: gentoo-commits

commit:     bed0a9c2c1585a50738ceb49561d73d37bc6e050
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 31 20:30:35 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Oct 31 20:30:35 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=bed0a9c2

stagebase.py: Clean up some long lines 

While I was changing code nearby, shorten some overly long lines.

 catalyst/base/stagebase.py | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 5ba9cfc..ffd84de 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1053,8 +1053,11 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			cmd("rm -f " + makepath,\
 				"Could not remove " + makepath, env=self.env)
 			myf=open(makepath, "w")
-			myf.write("# These settings were set by the catalyst build script that automatically\n# built this stage.\n")
-			myf.write("# Please consult /usr/share/portage/config/make.conf.example for a more\n# detailed example.\n")
+			myf.write("# These settings were set by the catalyst build script "
+					"that automatically\n# built this stage.\n")
+			myf.write("# Please consult "
+					"/usr/share/portage/config/make.conf.example "
+					"for a more\n# detailed example.\n")
 
 			for flags in ["CFLAGS", "CXXFLAGS", "FCFLAGS", "FFLAGS", "LDFLAGS",
 						"ASFLAGS"]:
@@ -1074,11 +1077,16 @@ class StageBase(TargetBase, ClearBase, GenBase):
 							% (flags, self.settings[flags]))
 
 			if "CBUILD" in self.settings:
-				myf.write("# This should not be changed unless you know exactly what you are doing.  You\n# should probably be using a different stage, instead.\n")
+				myf.write("# This should not be changed unless you know exactly"
+					" what you are doing.  You\n# should probably be "
+					"using a different stage, instead.\n")
 				myf.write('CBUILD="'+self.settings["CBUILD"]+'"\n')
 
 			if "CHOST" in self.settings:
-				myf.write("# WARNING: Changing your CHOST is not something that should be done lightly.\n# Please consult https://wiki.gentoo.org/wiki/Changing_the_CHOST_variable before changing.\n")
+				myf.write("# WARNING: Changing your CHOST is not something "
+					"that should be done lightly.\n# Please consult "
+					"https://wiki.gentoo.org/wiki/Changing_the_CHOST_variable "
+					"before changing.\n")
 				myf.write('CHOST="'+self.settings["CHOST"]+'"\n')
 
 			# Figure out what our USE vars are for building
@@ -1090,7 +1098,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				myusevars.extend(self.settings["use"])
 
 			if myusevars:
-				myf.write("# These are the USE and USE_EXPAND flags that were used for\n# building in addition to what is provided by the profile.\n")
+				myf.write("# These are the USE and USE_EXPAND flags that were "
+						"used for\n# building in addition to what is provided "
+						"by the profile.\n")
 				myusevars = sorted(set(myusevars))
 				myf.write('USE="' + ' '.join(myusevars) + '"\n')
 				if '-*' in myusevars:


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-10-28 16:50 Mike Frysinger
  0 siblings, 0 replies; 144+ messages in thread
From: Mike Frysinger @ 2015-10-28 16:50 UTC (permalink / raw
  To: gentoo-commits

commit:     06fd1a0cd1a957c14343d9c0440dd606a883ee12
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 11 18:23:26 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Oct 28 16:49:56 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=06fd1a0c

stagebase: robustify portage_confdir setup

When setting up the portage_confdir, we should make sure it exists,
and that we rsync it properly (regardless of the settings given by
the user).

Bugzilla: https://bugs.gentoo.org/538652
Reported-by: Joshua Kinard <kumba <AT> gentoo.org>

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 3c24dbd..6094109 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -893,8 +893,12 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		else:
 			if "portage_confdir" in self.settings:
 				log.info('Configuring %s...', self.settings['port_conf'])
-				cmd("rsync -a " + self.settings["portage_confdir"] + "/ " +
-					self.settings["chroot_path"] + self.settings["port_conf"],
+				dest = normpath(self.settings['chroot_path'] + '/' + self.settings['port_conf'])
+				ensure_dirs(dest)
+				# The trailing slashes on both paths are important:
+				# We want to make sure rsync copies the dirs into each
+				# other and not as subdirs.
+				cmd('rsync -a %s/ %s/' % (self.settings['portage_confdir'], dest),
 					"Error copying %s" % self.settings["port_conf"],
 					env=self.env)
 				self.resume.enable("setup_confdir")


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-10-27 21:43 Richard Farina
  0 siblings, 0 replies; 144+ messages in thread
From: Richard Farina @ 2015-10-27 21:43 UTC (permalink / raw
  To: gentoo-commits

commit:     e606f764a51f3cfa9e8810bc6018fb88f3f813c9
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 27 21:41:36 2015 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Tue Oct 27 21:41:36 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e606f764

use cp -a for portage_overlay

if makes sense to preserve things like time stamps when copying in
portage_overlay to avoid emerge thinking the files changed with every
new stage.  most other places in the code use cp -a or rsync -a

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 8ea1dc4..3c24dbd 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -908,7 +908,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 					cmd("mkdir -p "+self.settings["chroot_path"]+\
 						self.settings["local_overlay"],\
 						"Could not make portage_overlay dir",env=self.env)
-					cmd("cp -R "+x+"/* "+self.settings["chroot_path"]+\
+					cmd("cp -a "+x+"/* "+self.settings["chroot_path"]+\
 						self.settings["local_overlay"],\
 						"Could not copy portage_overlay",env=self.env)
 


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-10-24  6:58 Mike Frysinger
  0 siblings, 0 replies; 144+ messages in thread
From: Mike Frysinger @ 2015-10-24  6:58 UTC (permalink / raw
  To: gentoo-commits

commit:     986ef3f2a80c688059840d781d962bd3f3644538
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 12 02:18:17 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Oct 12 02:18:17 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=986ef3f2

genbase: use sorted() with dict keys

In py3, the dict keys func returns a view which doesn't have a sort
member.  Pass the result through sorted() which works with py2 and
py3.

 catalyst/base/genbase.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/catalyst/base/genbase.py b/catalyst/base/genbase.py
index a33f924..8a1af8d 100644
--- a/catalyst/base/genbase.py
+++ b/catalyst/base/genbase.py
@@ -22,8 +22,7 @@ class GenBase(object):
 				keys={}
 				for i in self.settings["contents"].split():
 					keys[i]=1
-					array=keys.keys()
-					array.sort()
+					array = sorted(keys.keys())
 				for j in array:
 					contents = contents_map.contents(path, j,
 						verbose=self.settings["VERBOSE"])
@@ -42,8 +41,7 @@ class GenBase(object):
 				keys={}
 				for i in self.settings["digests"].split():
 					keys[i]=1
-					array=keys.keys()
-					array.sort()
+					array = sorted(keys.keys())
 				for f in [path, path + '.CONTENTS']:
 					if os.path.exists(f):
 						if "all" in array:


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-10-24  6:58 Mike Frysinger
  0 siblings, 0 replies; 144+ messages in thread
From: Mike Frysinger @ 2015-10-24  6:58 UTC (permalink / raw
  To: gentoo-commits

commit:     e8ab33919dc2359da0b1922240d7a07de304596d
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 12 01:00:42 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Oct 12 01:00:42 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e8ab3391

stagebase: disable undefined-variable lint warning

raw_input doesn't exist w/py3, so pylint complains.  Disable
the warning for this one line since we know it's fine.

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 438e4d3..8ea1dc4 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -28,7 +28,7 @@ from catalyst.base.resume import AutoResume
 if sys.version_info[0] >= 3:
 	py_input = input
 else:
-	py_input = raw_input
+	py_input = raw_input  # pylint: disable=undefined-variable
 
 
 class StageBase(TargetBase, ClearBase, GenBase):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-10-11 18:03 Mike Frysinger
  0 siblings, 0 replies; 144+ messages in thread
From: Mike Frysinger @ 2015-10-11 18:03 UTC (permalink / raw
  To: gentoo-commits

commit:     d4405fd40c4316d41b111fc8c5497eeb4063a5d2
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 11 17:32:03 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Oct 11 17:32:03 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d4405fd4

stagebase: seed initial make.conf w/LC_MESSAGES=C

This sets up the messages from packages in english to ease bug reporting.

Bugzilla: https://bugs.gentoo.org/78382

 catalyst/base/stagebase.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index e7514e2..4a0b482 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1131,6 +1131,13 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			if "portage_overlay" in self.settings:
 				myf.write('PORTDIR_OVERLAY="/usr/local/portage"\n')
 
+			# Set default locale for system responses. #478382
+			myf.write(
+				'\n'
+				'# This sets the language of build output to English.\n'
+				'# Please keep this setting intact when reporting bugs.\n'
+				'LC_MESSAGES=C\n')
+
 			myf.close()
 			self.resume.enable("chroot_setup")
 


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-10-11 17:26 Mike Frysinger
  0 siblings, 0 replies; 144+ messages in thread
From: Mike Frysinger @ 2015-10-11 17:26 UTC (permalink / raw
  To: gentoo-commits

commit:     988f43379698cd76e8883a6bfffff0506a1b128d
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 10 05:59:09 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Oct 11 05:56:25 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=988f4337

resume: convert to log module

The AutoResumeError exception wasn't actually used as an exception --
it was never raised, only printed.  Throw it away in place of a plain
log message.

 catalyst/base/resume.py | 22 ++++------------------
 1 file changed, 4 insertions(+), 18 deletions(-)

diff --git a/catalyst/base/resume.py b/catalyst/base/resume.py
index 443b46d..99d8abc 100644
--- a/catalyst/base/resume.py
+++ b/catalyst/base/resume.py
@@ -12,27 +12,13 @@ set, unset, is_set, is_unset, enabled, clear_all
 '''
 
 import os
-import sys
-import traceback
 
 from snakeoil import fileutils
 
+from catalyst import log
 from catalyst.fileops import ensure_dirs, pjoin, listdir_files, clear_dir
 
 
-class AutoResumeError(Exception):
-	def __init__(self, message, print_traceback=False):
-		if message:
-			if print_traceback:
-				(_type, value) = sys.exc_info()[:2]
-				if value!=None:
-					print
-					print "Traceback values found.  listing..."
-					print traceback.print_exc(file=sys.stdout)
-			print "!!! catalyst: AutoResumeError " + message
-			print
-
-
 class AutoResume(object):
 	'''Class for tracking and handling all aspects of
 	the autoresume option and related files.
@@ -73,7 +59,7 @@ class AutoResume(object):
 				fileutils.touch(fname)
 				self._points[point] = fname
 			except Exception as e:
-				print AutoResumeError(str(e))
+				log.error('AutoResumeError: %s', e)
 				return False
 		return True
 
@@ -91,7 +77,7 @@ class AutoResume(object):
 				if data and no_lf:
 					data = data.replace('\n', '')
 			except OSError as e:
-				print AutoResumeError(str(e))
+				log.error('AutoResumeError: %s', e)
 				return None
 			return data
 		return None
@@ -109,7 +95,7 @@ class AutoResume(object):
 			os.unlink(self._points[point])
 			self._points.pop(point)
 		except Exception as e:
-			print AutoResumeError(str(e))
+			log.error('AutoResumeError: %s', e)
 			return False
 		return True
 


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-10-11 17:26 Mike Frysinger
  0 siblings, 0 replies; 144+ messages in thread
From: Mike Frysinger @ 2015-10-11 17:26 UTC (permalink / raw
  To: gentoo-commits

commit:     1f48a8c57804569b747da23e4603ba7a42dea51d
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Fri Oct  9 22:18:16 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Oct 10 23:54:36 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=1f48a8c5

stagebase: simplify lock calls a bit

We create self.snapcache_lock to hold the lock, then assign it to
self.snapshot_lock_object, and then operate on self.snapshot_lock_object.
There's no need for this indirection, so operate on self.snapcache_lock
directly instead.

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 88d71ba..3ce7dba 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -150,7 +150,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		self.set_source_subpath()
 
 		# Set paths
-		self.snapshot_lock_object = None
 		self.set_snapshot_path()
 		self.set_root_path()
 		self.set_source_path()
@@ -822,7 +821,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				self.settings["snapshot_cache_path"]+\
 				" (This can take a long time)..."
 			cleanup_errmsg="Error removing existing snapshot cache directory."
-			self.snapshot_lock_object=self.snapcache_lock
 
 			if self.settings["snapshot_path_hash"]==snapshot_cache_hash:
 				print "Valid snapshot cache, skipping unpack of portage tree..."
@@ -846,7 +844,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 		if unpack:
 			if "snapcache" in self.settings["options"]:
-				self.snapshot_lock_object.write_lock()
+				self.snapcache_lock.write_lock()
 			if os.path.exists(target_portdir):
 				print cleanup_msg
 				cleanup_cmd = "rm -rf " + target_portdir
@@ -868,7 +866,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 					data=self.settings["snapshot_path_hash"])
 
 			if "snapcache" in self.settings["options"]:
-				self.snapshot_lock_object.unlock()
+				self.snapcache_lock.unlock()
 
 	def config_profile_link(self):
 		if "autoresume" in self.settings["options"] \
@@ -946,7 +944,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			src=self.mountmap[x]
 			#print "bind(); src =", src
 			if "snapcache" in self.settings["options"] and x == "portdir":
-				self.snapshot_lock_object.read_lock()
+				self.snapcache_lock.read_lock()
 			if os.uname()[0] == "FreeBSD":
 				if src == "/dev":
 					_cmd = "mount -t devfs none " + target
@@ -998,7 +996,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 					# It's possible the snapshot lock object isn't created yet.
 					# This is because mount safety check calls unbind before the
 					# target is fully initialized
-					self.snapshot_lock_object.unlock()
+					self.snapcache_lock.unlock()
 				except Exception:
 					pass
 		if ouch:


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-10-11 17:26 Mike Frysinger
  0 siblings, 0 replies; 144+ messages in thread
From: Mike Frysinger @ 2015-10-11 17:26 UTC (permalink / raw
  To: gentoo-commits

commit:     4f358eec1331b8facdbdc7eb36bfd702fd31ad29
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 10 05:15:43 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Oct 10 23:54:37 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4f358eec

clearbase: convert to log module

 catalyst/base/clearbase.py | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/catalyst/base/clearbase.py b/catalyst/base/clearbase.py
index b2c1a11..3817196 100644
--- a/catalyst/base/clearbase.py
+++ b/catalyst/base/clearbase.py
@@ -1,5 +1,6 @@
 
 
+from catalyst import log
 from catalyst.support import countdown
 from catalyst.fileops import clear_dir
 
@@ -15,38 +16,38 @@ class ClearBase(object):
 	def clear_autoresume(self):
 		""" Clean resume points since they are no longer needed """
 		if "autoresume" in self.settings["options"]:
-			print "Removing AutoResume Points: ..."
+			log.notice('Removing AutoResume Points ...')
 			self.resume.clear_all()
 
 
 	def remove_autoresume(self):
 		""" Rmove all resume points since they are no longer needed """
 		if "autoresume" in self.settings["options"]:
-			print "Removing AutoResume: ..."
+			log.notice('Removing AutoResume ...')
 			self.resume.clear_all(remove=True)
 
 
 	def clear_chroot(self):
 		self.chroot_lock.unlock()
-		print 'Clearing the chroot path ...'
+		log.notice('Clearing the chroot path ...')
 		clear_dir(self.settings["chroot_path"], 0755, True)
 
 
 	def remove_chroot(self):
 		self.chroot_lock.unlock()
-		print 'Removing the chroot path ...'
+		log.notice('Removing the chroot path ...')
 		clear_dir(self.settings["chroot_path"], 0755, True, remove=True)
 
 
 	def clear_packages(self, remove=False):
 		if "pkgcache" in self.settings["options"]:
-			print "purging the pkgcache ..."
+			log.notice('purging the pkgcache ...')
 			clear_dir(self.settings["pkgcache_path"], remove=remove)
 
 
 	def clear_kerncache(self, remove=False):
 		if "kerncache" in self.settings["options"]:
-			print "purging the kerncache ..."
+			log.notice('purging the kerncache ...')
 			clear_dir(self.settings["kerncache_path"], remove=remove)
 
 
@@ -54,15 +55,15 @@ class ClearBase(object):
 		countdown(10,"Purging Caches ...")
 		if any(k in self.settings["options"] for k in ("purge",
 				"purgeonly", "purgetmponly")):
-			print "purge(); clearing autoresume ..."
+			log.notice('purge(); clearing autoresume ...')
 			self.clear_autoresume()
 
-			print "purge(); clearing chroot ..."
+			log.notice('purge(); clearing chroot ...')
 			self.clear_chroot()
 
 			if "purgetmponly" not in self.settings["options"]:
-				print "purge(); clearing package cache ..."
+				log.notice('purge(); clearing package cache ...')
 				self.clear_packages(remove)
 
-			print "purge(); clearing kerncache ..."
+			log.notice('purge(); clearing kerncache ...')
 			self.clear_kerncache(remove)


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-10-09  2:40 Mike Frysinger
  0 siblings, 0 replies; 144+ messages in thread
From: Mike Frysinger @ 2015-10-09  2:40 UTC (permalink / raw
  To: gentoo-commits

commit:     cd88eafe9567138fb8aaa2253df2160e40548d20
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu Oct  8 22:39:12 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Fri Oct  9 00:22:12 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=cd88eafe

stagebase: fix path to snapshot hash file

When we write the hash, we do so by using:
	snapshot_cache_path + / + catalyst-hash

But when we read it, we do so by:
	snapshot_cache_path + catalyst-hash

If the path lacks a trailing /, then we never read the correct hash
file.  The current helper returns -1 on missing file errors which is
compared against the existing hash.  In essence, we always trigger a
cache miss.

Clean up the code to properly create the path and use that var in both
places to prevent future breakage.

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index f81c51b..7d069fa 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -815,9 +815,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		print self.settings["chroot_path"]
 		print "unpack(), target_portdir = " + target_portdir
 		if "snapcache" in self.settings["options"]:
-			snapshot_cache_hash=\
-				read_from_clst(self.settings["snapshot_cache_path"]+\
-				"catalyst-hash")
+			snapshot_cache_hash_path = pjoin(
+				self.settings['snapshot_cache_path'], 'catalyst-hash')
+			snapshot_cache_hash = read_from_clst(snapshot_cache_hash_path)
 			unpack_info['mode'] = self.decompressor.determine_mode(
 				unpack_info['source'])
 
@@ -862,8 +862,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				print unpack_errmsg %(unpack_info)
 
 			if "snapcache" in self.settings["options"]:
-				myf=open(self.settings["snapshot_cache_path"] +
-					"/" + "catalyst-hash","w")
+				myf = open(snapshot_cache_hash_path, 'w')
 				myf.write(self.settings["snapshot_path_hash"])
 				myf.close()
 			else:


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-10-06 17:03 Mike Frysinger
  0 siblings, 0 replies; 144+ messages in thread
From: Mike Frysinger @ 2015-10-06 17:03 UTC (permalink / raw
  To: gentoo-commits

commit:     019eca4e09848978975284802913dee574c41c96
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  6 15:58:12 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Oct  6 15:58:12 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=019eca4e

lint: drop use of apply()

This builtin has been deprecated since python-2.3, so call the function
directly instead of via apply.

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 7bc7522..fcdf729 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1426,7 +1426,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			print "--- Running action sequence: "+x
 			sys.stdout.flush()
 			try:
-				apply(getattr(self,x))
+				getattr(self, x)()
 			except LockInUse:
 				print "Error, unable to aquire the lock..."
 				print " Catalyst aborting...."


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-10-06 15:31 Mike Frysinger
  0 siblings, 0 replies; 144+ messages in thread
From: Mike Frysinger @ 2015-10-06 15:31 UTC (permalink / raw
  To: gentoo-commits

commit:     92c6ce5ebfc159a717588e0770b8aa629e2c5b0e
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  6 14:15:49 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Oct  6 14:15:49 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=92c6ce5e

lint: revise wildcard import

We only need one function, so import it directly.

 catalyst/base/targetbase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/targetbase.py b/catalyst/base/targetbase.py
index e0c03df..4dcd88b 100644
--- a/catalyst/base/targetbase.py
+++ b/catalyst/base/targetbase.py
@@ -1,6 +1,6 @@
 import os
 
-from catalyst.support import *
+from catalyst.support import addl_arg_parse
 
 class TargetBase(object):
 	"""


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-10-06 13:46 Mike Frysinger
  0 siblings, 0 replies; 144+ messages in thread
From: Mike Frysinger @ 2015-10-06 13:46 UTC (permalink / raw
  To: gentoo-commits

commit:     f1385ffad018c9f1b5250dcfb514a8de16595f8e
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  6 03:38:28 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Oct  6 03:38:28 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f1385ffa

resume: fix missing sys import

This module uses the sys module but didn't actually import it.

 catalyst/base/resume.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/catalyst/base/resume.py b/catalyst/base/resume.py
index 2c006ab..a03adf3 100644
--- a/catalyst/base/resume.py
+++ b/catalyst/base/resume.py
@@ -14,6 +14,7 @@ set, unset, is_set, is_unset, enabled, clear_all
 import os
 import shutil
 from stat import ST_UID, ST_GID, ST_MODE
+import sys
 import traceback
 
 from catalyst.fileops import ensure_dirs, pjoin, listdir_files, clear_dir


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-09-08 14:21 Richard Farina
  0 siblings, 0 replies; 144+ messages in thread
From: Richard Farina @ 2015-09-08 14:21 UTC (permalink / raw
  To: gentoo-commits

commit:     53af887e40b1cd00ab640b3a4dd6198f0059347b
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  8 14:21:04 2015 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Tue Sep  8 14:21:20 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=53af887e

add asflags support per bug 538650 from Kumba

 catalyst/base/stagebase.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 17d88cd..5eb8fc9 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -41,7 +41,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 		self.valid_values.extend(["version_stamp","target","subarch",
 			"rel_type","profile","snapshot","source_subpath","portage_confdir",
-			"cflags","cxxflags","fcflags","fflags","ldflags","cbuild","hostuse","portage_overlay",
+			"cflags","cxxflags","fcflags","fflags","ldflags","asflags","cbuild","hostuse","portage_overlay",
 			"distcc_hosts","makeopts","pkgcache_path","kerncache_path",
 			"compression_mode", "decompression_mode"])
 
@@ -304,6 +304,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		if "LDFLAGS" in self.makeconf:
 			self.settings["LDFLAGS"]=self.makeconf["LDFLAGS"]
 
+	def override_asflags(self):
+		if "ASFLAGS" in self.makeconf:
+			self.settings["ASFLAGS"]=self.makeconf["ASFLAGS"]
+
 	def set_install_mask(self):
 		if "install_mask" in self.settings:
 			if type(self.settings["install_mask"])!=types.StringType:
@@ -1033,6 +1037,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		self.override_fcflags()
 		self.override_fflags()
 		self.override_ldflags()
+		self.override_asflags()
 		if "autoresume" in self.settings["options"] \
 			and self.resume.is_enabled("chroot_setup"):
 			print "Resume point detected, skipping chroot_setup operation..."
@@ -1107,6 +1112,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			if "LDFLAGS" in self.settings:
 				myf.write("# LDFLAGS is unsupported.  USE AT YOUR OWN RISK!\n")
 				myf.write('LDFLAGS="'+self.settings["LDFLAGS"]+'"\n')
+			if "ASFLAGS" in self.settings:
+				myf.write("# ASFLAGS is unsupported.  USE AT YOUR OWN RISK!\n")
+				myf.write('ASFLAGS="'+self.settings["ASFLAGS"]+'"\n')
 			if "CBUILD" in self.settings:
 				myf.write("# This should not be changed unless you know exactly what you are doing.  You\n# should probably be using a different stage, instead.\n")
 				myf.write('CBUILD="'+self.settings["CBUILD"]+'"\n')


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-09-08 14:17 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2015-09-08 14:17 UTC (permalink / raw
  To: gentoo-commits

commit:     36830d602086d0b5dc00e548dc10619a77d9b30f
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  8 06:34:06 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue Sep  8 14:11:48 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=36830d60

Fix snapshot setting print message

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 31fbe8b..17d88cd 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -483,7 +483,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 					self.settings["snapshot"]))
 			self.snapcache_lock=\
 				LockDir(self.settings["snapshot_cache_path"])
-			print "Caching snapshot to "+self.settings["snapshot_cache_path"]
+			print "Setting snapshot cache to "+self.settings["snapshot_cache_path"]
 
 	def set_chroot_path(self):
 		"""


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-09-08 14:17 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2015-09-08 14:17 UTC (permalink / raw
  To: gentoo-commits

commit:     85de4ce7be209e29ef661256293b6168bcadd1a0
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  8 06:35:17 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue Sep  8 14:11:48 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=85de4ce7

stagebase.py: run() Add in an exception trap to cleanup mounts

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index a6694e6..bd6938c 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1421,7 +1421,14 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		for x in self.settings["action_sequence"]:
 			print "--- Running action sequence: "+x
 			sys.stdout.flush()
-			apply(getattr(self,x))
+			try:
+				apply(getattr(self,x))
+			except Exception as error:
+				print "Exception running action sequence %s" % x
+				print "Error:", str(error)
+				print "Running unbind()"
+				self.unbind()
+				break
 
 
 	def unmerge(self):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:pending commit in: catalyst/base/
@ 2015-09-08 14:14 Brian Dolbec
  2015-09-08 14:17 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
  0 siblings, 1 reply; 144+ messages in thread
From: Brian Dolbec @ 2015-09-08 14:14 UTC (permalink / raw
  To: gentoo-commits

commit:     5de472ce61d13d242e185a9f6d88b26610fb014b
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  8 06:26:27 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue Sep  8 14:05:13 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5de472ce

stagebase.py: strip a trailing slash from the croot_path for consistency

target_subpath must have a trailing slash to prevent some failures.
See commit: 5b08b471611670b4cc996e45c387ecd951fb2142
Subject: Fix livecd source and target paths not ending with a slash
Author: Brian Dolbec <dolsen <AT> gentoo.org> (Wed 12 Jun 2013 07:40:12 AM PDT)

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 8f12ac6..a6694e6 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -500,7 +500,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		Things *could* break if you don't use a proper join()
 		"""
 		self.settings["chroot_path"]=normpath(self.settings["storedir"]+\
-			"/tmp/"+self.settings["target_subpath"])
+			"/tmp/"+self.settings["target_subpath"].rstrip('/'))
 		self.chroot_lock=LockDir(self.settings["chroot_path"])
 
 	def set_autoresume_path(self):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:pending commit in: catalyst/base/
@ 2015-09-06 21:18 Brian Dolbec
  2015-09-06 21:21 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
  0 siblings, 1 reply; 144+ messages in thread
From: Brian Dolbec @ 2015-09-06 21:18 UTC (permalink / raw
  To: gentoo-commits

commit:     16f6184fc18508fc4604d4ddc85624701bb15176
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 15 16:31:33 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sun Sep  6 21:18:00 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=16f6184f

catalyst/base/stagebase.py: Fix "Creating stage tarball..." print()

 catalyst/base/stagebase.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 655ea06..ea37591 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1307,7 +1307,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			target_filename = ".".join([self.settings["target_path"].rstrip('/'),
 				self.compressor.extension(pack_info['mode'])])
 
-			print "Creating stage tarball..."
+			print("Creating stage tarball... mode:",
+				self.settings["compression_mode"])
 
 			if self.compressor.compress(pack_info):
 				self.gen_contents_file(target_filename)


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:pending commit in: catalyst/base/
@ 2015-09-03 15:14 Brian Dolbec
  2015-09-02 21:00 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
  0 siblings, 1 reply; 144+ messages in thread
From: Brian Dolbec @ 2015-09-03 15:14 UTC (permalink / raw
  To: gentoo-commits

commit:     5d253b20dc206c3de4c9b96b01fc4dd507aaadf7
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Sep  2 20:59:51 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Wed Sep  2 20:59:51 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5d253b20

stagebase.py: Add  a _debub_pause_ finction 

It can then be inserted into the action_sequence assignments to do troubleshooting
and other debug snooping to determine where a problem is occuring.

eg:

  	def set_action_sequence(self):
		self.settings["action_sequence"]=["unpack","unpack_snapshot",\
			"config_profile_link","setup_confdir","portage_overlay",\
			"bind","chroot_setup", "_debug_pause_","setup_environment",
                        "_debug_pause_", "build_packages", ...]
 
  

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 25e5b6c..c0bafc2 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -21,6 +21,11 @@ from catalyst.lock import LockDir
 from catalyst.fileops import ensure_dirs, pjoin
 from catalyst.base.resume import AutoResume
 
+if sys.version_info[0] >= 3:
+    py_input = input
+else:
+    py_input = raw_input
+
 
 class StageBase(TargetBase, ClearBase, GenBase):
 	"""
@@ -1624,4 +1629,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				self.unbind()
 				raise CatalystError("build aborting due to livecd_update error.")
 
+	def _debug_pause_(self):
+		py_input("press any key to continue: ")
+
 # vim: ts=4 sw=4 sta et sts=4 ai


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-09-02 21:52 Richard Farina
  0 siblings, 0 replies; 144+ messages in thread
From: Richard Farina @ 2015-09-02 21:52 UTC (permalink / raw
  To: gentoo-commits

commit:     827a9cd7ea1863242920651752a8265acc8d57ad
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Wed Sep  2 21:52:48 2015 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Wed Sep  2 21:52:48 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=827a9cd7

support setting/overriding fcflags and fflags, specifically for use with CFLAGS=-frecord-gcc-switches

 catalyst/base/stagebase.py | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 23491aa..d898e95 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -38,7 +38,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 		self.valid_values.extend(["version_stamp","target","subarch",\
 			"rel_type","profile","snapshot","source_subpath","portage_confdir",\
-			"cflags","cxxflags","ldflags","cbuild","hostuse","portage_overlay",\
+			"cflags","cxxflags","fcflags","fflags","ldflags","cbuild","hostuse","portage_overlay",\
 			"distcc_hosts","makeopts","pkgcache_path","kerncache_path"])
 
 		self.set_valid_build_kernel_vars(addlargs)
@@ -280,6 +280,14 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		if "CXXFLAGS" in self.makeconf:
 			self.settings["CXXFLAGS"]=self.makeconf["CXXFLAGS"]
 
+	def override_fcflags(self):
+		if "FCFLAGS" in self.makeconf:
+			self.settings["FCFLAGS"]=self.makeconf["FCFLAGS"]
+
+	def override_fflags(self):
+		if "FFLAGS" in self.makeconf:
+			self.settings["FFLAGS"]=self.makeconf["FFLAGS"]
+
 	def override_ldflags(self):
 		if "LDFLAGS" in self.makeconf:
 			self.settings["LDFLAGS"]=self.makeconf["LDFLAGS"]
@@ -1020,6 +1028,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		self.override_chost()
 		self.override_cflags()
 		self.override_cxxflags()
+		self.override_fcflags()
+		self.override_fflags()
 		self.override_ldflags()
 		if "autoresume" in self.settings["options"] \
 			and self.resume.is_enabled("chroot_setup"):
@@ -1077,6 +1087,20 @@ class StageBase(TargetBase, ClearBase, GenBase):
 					myf.write('CXXFLAGS="${CFLAGS}"\n')
 			else:
 				myf.write('CXXFLAGS="${CFLAGS}"\n')
+			if "FCFLAGS" in self.settings:
+				if self.settings["FCFLAGS"]!=self.settings["CFLAGS"]:
+					myf.write('FCFLAGS="'+self.settings["FCFLAGS"]+'"\n')
+				else:
+					myf.write('FCFLAGS="${CFLAGS}"\n')
+			else:
+				myf.write('FCFLAGS="${CFLAGS}"\n')
+			if "FFLAGS" in self.settings:
+				if self.settings["FFLAGS"]!=self.settings["CFLAGS"]:
+					myf.write('FFLAGS="'+self.settings["FFLAGS"]+'"\n')
+				else:
+					myf.write('FFLAGS="${CFLAGS}"\n')
+			else:
+				myf.write('FFLAGS="${CFLAGS}"\n')
 
 			if "LDFLAGS" in self.settings:
 				myf.write("# LDFLAGS is unsupported.  USE AT YOUR OWN RISK!\n")


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-09-02 21:25 Richard Farina
  0 siblings, 0 replies; 144+ messages in thread
From: Richard Farina @ 2015-09-02 21:25 UTC (permalink / raw
  To: gentoo-commits

commit:     75cdef7e4593d3de0c407610ae2f3a55b1859336
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Wed Sep  2 21:23:10 2015 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Wed Sep  2 21:23:10 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=75cdef7e

fix minor typo

 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index c0bafc2..23491aa 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1097,7 +1097,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				myusevars.extend(self.settings["use"])
 
 			if myusevars:
-				myf.write("# These are the USE and USE_EXPAND flags that were used for\n# buidling in addition to what is provided by the profile.\n")
+				myf.write("# These are the USE and USE_EXPAND flags that were used for\n# building in addition to what is provided by the profile.\n")
 				myusevars = sorted(set(myusevars))
 				myf.write('USE="'+string.join(myusevars)+'"\n')
 				if '-*' in myusevars:


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-09-01 19:41 Richard Farina
  0 siblings, 0 replies; 144+ messages in thread
From: Richard Farina @ 2015-09-01 19:41 UTC (permalink / raw
  To: gentoo-commits

commit:     99fc43024db4be08fbfbff3a6a79c90db920e927
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  1 19:40:15 2015 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Tue Sep  1 19:40:15 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=99fc4302

drop --selinux switch from tar

tar --selinux isn't support unless you are on selinux, and in that case
things are still not likely to be right do to the dark magic that is selinux.
From the head of the selinux team:
<@SwifT> Zero_Chaos: let's not use tar --selinux right now until we have updated catalyst to create selinux-enabled chroots

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 6adc3b9..25e5b6c 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -696,10 +696,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 					self.settings["chroot_path"]+\
 						" (This may take some time) ...\n"
 				if "bz2" == self.settings["chroot_path"][-3:]:
-					unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
+					unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 						self.settings["chroot_path"]
 				else:
-					unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
+					unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 						self.settings["chroot_path"]
 				error_msg="Tarball extraction of "+\
 					self.settings["source_path"]+" to "+\
@@ -711,10 +711,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				self.settings["chroot_path"]+\
 				" (This may take some time) ...\n"
 			if "bz2" == self.settings["chroot_path"][-3:]:
-				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
+				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 					self.settings["chroot_path"]
 			else:
-				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
+				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 					self.settings["chroot_path"]
 			error_msg="Tarball extraction of "+self.settings["source_path"]+\
 				" to "+self.settings["chroot_path"]+" failed."
@@ -806,9 +806,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
 					"catalyst-hash")
 			destdir=self.settings["snapshot_cache_path"]
 			if "bz2" == self.settings["chroot_path"][-3:]:
-				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+destdir
+				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+destdir
 			else:
-				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -xpf "+self.settings["snapshot_path"]+" -C "+destdir
+				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags -xpf "+self.settings["snapshot_path"]+" -C "+destdir
 			unpack_errmsg="Error unpacking snapshot"
 			cleanup_msg="Cleaning up invalid snapshot cache at \n\t"+\
 				self.settings["snapshot_cache_path"]+\
@@ -825,10 +825,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			cleanup_msg=\
 				"Cleaning up existing portage tree (This can take a long time)..."
 			if "bz2" == self.settings["chroot_path"][-3:]:
-				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+\
+				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+\
 					self.settings["chroot_path"]+"/usr"
 			else:
-				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -xpf "+self.settings["snapshot_path"]+" -C "+\
+				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags -xpf "+self.settings["snapshot_path"]+" -C "+\
 					self.settings["chroot_path"]+"/usr"
 			unpack_errmsg="Error unpacking snapshot"
 
@@ -1256,7 +1256,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 			print "Creating stage tarball..."
 
-			cmd("tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -I lbzip2 -cpf "+self.settings["target_path"]+" -C "+\
+			cmd("tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags -I lbzip2 -cpf "+self.settings["target_path"]+" -C "+\
 				self.settings["stage_path"]+" .",\
 				"Couldn't create stage tarball",env=self.env)
 


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-08-31 19:21 Richard Farina
  0 siblings, 0 replies; 144+ messages in thread
From: Richard Farina @ 2015-08-31 19:21 UTC (permalink / raw
  To: gentoo-commits

commit:     3768757b9f31bcf34f8aac853f24cf97096dabb9
Author:     Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 31 19:21:50 2015 +0000
Commit:     Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Mon Aug 31 19:21:50 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=3768757b

drop redundant make.conf.catalyst

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 4c7f029..6adc3b9 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1119,10 +1119,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				myf.write('PORTDIR_OVERLAY="/usr/local/portage"\n')
 
 			myf.close()
-			makepath = normpath(self.settings["chroot_path"] +
-				self.settings["make_conf"])
-			cmd("cp " + makepath + " " + makepath + ".catalyst",\
-				"Could not backup " + self.settings["make_conf"],env=self.env)
 			self.resume.enable("chroot_setup")
 
 	def fsscript(self):


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-05-24  0:08 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2015-05-24  0:08 UTC (permalink / raw
  To: gentoo-commits

commit:     de00f5ffe2b626881dc90aa3d8ff322eba5c5c5d
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 19 03:21:16 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Mar 28 02:34:20 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=de00f5ff

Do not untar with --acls, fixes bug #536762

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index dee947f..5200182 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -696,10 +696,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 					self.settings["chroot_path"]+\
 						" (This may take some time) ...\n"
 				if "bz2" == self.settings["chroot_path"][-3:]:
-					unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
+					unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 						self.settings["chroot_path"]
 				else:
-					unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
+					unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 						self.settings["chroot_path"]
 				error_msg="Tarball extraction of "+\
 					self.settings["source_path"]+" to "+\
@@ -711,10 +711,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				self.settings["chroot_path"]+\
 				" (This may take some time) ...\n"
 			if "bz2" == self.settings["chroot_path"][-3:]:
-				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
+				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 					self.settings["chroot_path"]
 			else:
-				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags  --acls --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
+				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 					self.settings["chroot_path"]
 			error_msg="Tarball extraction of "+self.settings["source_path"]+\
 				" to "+self.settings["chroot_path"]+" failed."
@@ -806,9 +806,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
 					"catalyst-hash")
 			destdir=self.settings["snapshot_cache_path"]
 			if "bz2" == self.settings["chroot_path"][-3:]:
-				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+destdir
+				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+destdir
 			else:
-				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -xpf "+self.settings["snapshot_path"]+" -C "+destdir
+				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -xpf "+self.settings["snapshot_path"]+" -C "+destdir
 			unpack_errmsg="Error unpacking snapshot"
 			cleanup_msg="Cleaning up invalid snapshot cache at \n\t"+\
 				self.settings["snapshot_cache_path"]+\
@@ -825,10 +825,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			cleanup_msg=\
 				"Cleaning up existing portage tree (This can take a long time)..."
 			if "bz2" == self.settings["chroot_path"][-3:]:
-				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+\
+				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+\
 					self.settings["chroot_path"]+"/usr"
 			else:
-				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -xpf "+self.settings["snapshot_path"]+" -C "+\
+				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -xpf "+self.settings["snapshot_path"]+" -C "+\
 					self.settings["chroot_path"]+"/usr"
 			unpack_errmsg="Error unpacking snapshot"
 
@@ -1248,7 +1248,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 			print "Creating stage tarball..."
 
-			cmd("tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -I lbzip2 -cpf "+self.settings["target_path"]+" -C "+\
+			cmd("tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --selinux -I lbzip2 -cpf "+self.settings["target_path"]+" -C "+\
 				self.settings["stage_path"]+" .",\
 				"Couldn't create stage tarball",env=self.env)
 


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-05-24  0:08 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2015-05-24  0:08 UTC (permalink / raw
  To: gentoo-commits

commit:     f2afd7ff03e6e8453e86be938bd21c2cd33d3996
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  4 01:56:56 2014 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Feb 26 23:04:28 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f2afd7ff

Fix purgeonly to remove the chroot directory.

 catalyst/base/stagebase.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index f2aadee..191baab 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -504,6 +504,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 	def set_action_sequence(self):
 		""" Default action sequence for run method """
+		if "purgeonly" in self.settings["options"]:
+			self.settings["action_sequence"] = ["remove_chroot"]
+			return
 		self.settings["action_sequence"]=["unpack","unpack_snapshot",\
 				"setup_confdir","portage_overlay",\
 				"base_dirs","bind","chroot_setup","setup_environment",\
@@ -517,6 +520,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		else:
 			self.settings["action_sequence"].append("remove_autoresume")
 			self.settings["action_sequence"].append("remove_chroot")
+		return
 
 	def set_use(self):
 		if self.settings["spec_prefix"]+"/use" in self.settings:
@@ -1321,11 +1325,12 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			self.purge()
 			return
 
-		if "PURGEONLY" in self.settings:
+		if "purgeonly" in self.settings["options"]:
+			print "StageBase: run() purgeonly"
 			self.purge()
-			return
 
 		if "purge" in self.settings["options"]:
+			print "StageBase: run() purge"
 			self.purge()
 
 		for x in self.settings["action_sequence"]:


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-05-24  0:08 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2015-05-24  0:08 UTC (permalink / raw
  To: gentoo-commits

commit:     124c29ecc7aeb0311fc8e6149196476b580ae735
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  1 16:58:24 2014 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Feb 26 22:57:52 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=124c29ec

catalyst/base/clearbase.py: Fix remove parameter mistakes.

fixes commit: 02b3cb7a8d5c9d8d21105feda6868080416721c1
    Add remove_chroot and remove_autoresume functions.
    Brian Dolbec <dolsen <AT> gentoo.org> (Tue 31 Dec 2013 01:04:29 AM PST)

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

diff --git a/catalyst/base/clearbase.py b/catalyst/base/clearbase.py
index a9f1d22..b2c1a11 100644
--- a/catalyst/base/clearbase.py
+++ b/catalyst/base/clearbase.py
@@ -55,10 +55,10 @@ class ClearBase(object):
 		if any(k in self.settings["options"] for k in ("purge",
 				"purgeonly", "purgetmponly")):
 			print "purge(); clearing autoresume ..."
-			self.clear_autoresume(remove)
+			self.clear_autoresume()
 
 			print "purge(); clearing chroot ..."
-			self.clear_chroot(remove)
+			self.clear_chroot()
 
 			if "purgetmponly" not in self.settings["options"]:
 				print "purge(); clearing package cache ..."


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:pending commit in: catalyst/base/
@ 2015-05-21 23:53 Brian Dolbec
  2015-05-24  0:08 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
  0 siblings, 1 reply; 144+ messages in thread
From: Brian Dolbec @ 2015-05-21 23:53 UTC (permalink / raw
  To: gentoo-commits

commit:     e458b1d4d8c05da72702ba8e9a71028c9a5c9e0e
Author:     Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 19 01:16:15 2014 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Mar 28 02:32:47 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e458b1d4

Continue commit 2fea87234ffc48c3dd96f1204b27f667f5ade3a3 as we need to use --xattr-include when extracting the stages.

Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo.org>

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 4d9ff0d..dee947f 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -696,10 +696,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 					self.settings["chroot_path"]+\
 						" (This may take some time) ...\n"
 				if "bz2" == self.settings["chroot_path"][-3:]:
-					unpack_cmd="tar --xattrs --acls -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
+					unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 						self.settings["chroot_path"]
 				else:
-					unpack_cmd="tar --xattrs --acls -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
+					unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 						self.settings["chroot_path"]
 				error_msg="Tarball extraction of "+\
 					self.settings["source_path"]+" to "+\
@@ -711,10 +711,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				self.settings["chroot_path"]+\
 				" (This may take some time) ...\n"
 			if "bz2" == self.settings["chroot_path"][-3:]:
-				unpack_cmd="tar --xattrs --acls -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
+				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 					self.settings["chroot_path"]
 			else:
-				unpack_cmd="tar --xattrs --acls -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
+				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags  --acls --selinux -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\
 					self.settings["chroot_path"]
 			error_msg="Tarball extraction of "+self.settings["source_path"]+\
 				" to "+self.settings["chroot_path"]+" failed."
@@ -806,9 +806,9 @@ class StageBase(TargetBase, ClearBase, GenBase):
 					"catalyst-hash")
 			destdir=self.settings["snapshot_cache_path"]
 			if "bz2" == self.settings["chroot_path"][-3:]:
-				unpack_cmd="tar --xattrs --acls -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+destdir
+				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+destdir
 			else:
-				unpack_cmd="tar --xattrs --acls -xpf "+self.settings["snapshot_path"]+" -C "+destdir
+				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -xpf "+self.settings["snapshot_path"]+" -C "+destdir
 			unpack_errmsg="Error unpacking snapshot"
 			cleanup_msg="Cleaning up invalid snapshot cache at \n\t"+\
 				self.settings["snapshot_cache_path"]+\
@@ -825,10 +825,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			cleanup_msg=\
 				"Cleaning up existing portage tree (This can take a long time)..."
 			if "bz2" == self.settings["chroot_path"][-3:]:
-				unpack_cmd="tar --xattrs --acls -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+\
+				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+\
 					self.settings["chroot_path"]+"/usr"
 			else:
-				unpack_cmd="tar --xattrs --acls -xpf "+self.settings["snapshot_path"]+" -C "+\
+				unpack_cmd="tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -xpf "+self.settings["snapshot_path"]+" -C "+\
 					self.settings["chroot_path"]+"/usr"
 			unpack_errmsg="Error unpacking snapshot"
 
@@ -1248,7 +1248,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 
 			print "Creating stage tarball..."
 
-			cmd("tar --xattrs --acls -I lbzip2 -cpf "+self.settings["target_path"]+" -C "+\
+			cmd("tar --xattrs --xattrs-include=security.capability --xattrs-include=user.pax.flags --acls --selinux -I lbzip2 -cpf "+self.settings["target_path"]+" -C "+\
 				self.settings["stage_path"]+" .",\
 				"Couldn't create stage tarball",env=self.env)
 


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:pending commit in: catalyst/base/
@ 2015-05-21 23:53 Brian Dolbec
  2015-05-24  0:08 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
  0 siblings, 1 reply; 144+ messages in thread
From: Brian Dolbec @ 2015-05-21 23:53 UTC (permalink / raw
  To: gentoo-commits

commit:     4f3065cbefa8976f77a52689298bb4ab38ab2317
Author:     Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  6 17:30:01 2014 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Mar 28 02:32:23 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4f3065cb

Use -xpf instead of xpf with tar so it doesn't complain about missing option.

Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo.org>

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index a33cae4..4d9ff0d 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -808,7 +808,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			if "bz2" == self.settings["chroot_path"][-3:]:
 				unpack_cmd="tar --xattrs --acls -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+destdir
 			else:
-				unpack_cmd="tar --xattrs --acls xpf "+self.settings["snapshot_path"]+" -C "+destdir
+				unpack_cmd="tar --xattrs --acls -xpf "+self.settings["snapshot_path"]+" -C "+destdir
 			unpack_errmsg="Error unpacking snapshot"
 			cleanup_msg="Cleaning up invalid snapshot cache at \n\t"+\
 				self.settings["snapshot_cache_path"]+\
@@ -828,7 +828,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				unpack_cmd="tar --xattrs --acls -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+\
 					self.settings["chroot_path"]+"/usr"
 			else:
-				unpack_cmd="tar --xattrs --acls xpf "+self.settings["snapshot_path"]+" -C "+\
+				unpack_cmd="tar --xattrs --acls -xpf "+self.settings["snapshot_path"]+" -C "+\
 					self.settings["chroot_path"]+"/usr"
 			unpack_errmsg="Error unpacking snapshot"
 


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:pending commit in: catalyst/base/
@ 2015-05-21 23:53 Brian Dolbec
  2015-05-24  0:08 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
  0 siblings, 1 reply; 144+ messages in thread
From: Brian Dolbec @ 2015-05-21 23:53 UTC (permalink / raw
  To: gentoo-commits

commit:     b0e858758ed20aa79045e282b96229320170aeb9
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 10:40:01 2014 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Fri Feb 27 02:03:04 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=b0e85875

Allow kernelopts as a valid value for kernels.

 catalyst/base/stagebase.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 191baab..c94f6b6 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -616,6 +616,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 				self.valid_values.append("boot/kernel/"+x+"/softlevel")
 				self.valid_values.append("boot/kernel/"+x+"/use")
 				self.valid_values.append("boot/kernel/"+x+"/packages")
+				self.valid_values.append("boot/kernel/"+x+"/kernelopts")
 				if "boot/kernel/"+x+"/packages" in addlargs:
 					if type(addlargs["boot/kernel/"+x+\
 						"/packages"])==types.StringType:


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/base/
@ 2015-02-26 22:18 Brian Dolbec
  0 siblings, 0 replies; 144+ messages in thread
From: Brian Dolbec @ 2015-02-26 22:18 UTC (permalink / raw
  To: gentoo-commits

commit:     a8d406680bb626105407d66905bb8de82349fa03
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 31 09:00:16 2013 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Feb 26 20:04:57 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=a8d40668

Report the task exception that occurred.

---
 catalyst/base/stagebase.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 7395351..1b09935 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1332,9 +1332,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			sys.stdout.flush()
 			try:
 				apply(getattr(self,x))
-			except:
+			except Exception as e:
+				print "--- Exeption running action sequence:" + x
 				self.mount_safety_check()
-				raise
+				raise e
 
 		self.chroot_lock.unlock()
 


^ permalink raw reply related	[flat|nested] 144+ messages in thread
* [gentoo-commits] proj/catalyst:pending commit in: catalyst/base/
@ 2015-01-01  5:59 Brian Dolbec
  2015-02-26 20:12 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
  0 siblings, 1 reply; 144+ messages in thread
From: Brian Dolbec @ 2015-01-01  5:59 UTC (permalink / raw
  To: gentoo-commits

commit:     80493d8d32cb21d622bb2f514da68ac3106b7c35
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Jun  1 06:24:46 2013 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Jan  1 05:58:07 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=80493d8d

Refactor ClearBase code to remove code duplication.

---
 catalyst/base/clearbase.py | 73 ++++++++++++++++++----------------------------
 1 file changed, 29 insertions(+), 44 deletions(-)

diff --git a/catalyst/base/clearbase.py b/catalyst/base/clearbase.py
index 585d4f2..8462a3c 100644
--- a/catalyst/base/clearbase.py
+++ b/catalyst/base/clearbase.py
@@ -41,60 +41,20 @@ class ClearBase(object):
 
 
 	def clear_chroot(self):
-		myemp=self.settings["chroot_path"]
-		if os.path.isdir(myemp):
-			print "Emptying directory",myemp
-			"""
-			stat the dir, delete the dir, recreate the dir and set
-			the proper perms and ownership
-			"""
-			mystat=os.stat(myemp)
-			#cmd("rm -rf "+myemp, "Could not remove existing file: "+myemp,env=self.env)
-			""" There's no easy way to change flags recursively in python """
-			if os.uname()[0] == "FreeBSD":
-				os.system("chflags -R noschg "+myemp)
-			shutil.rmtree(myemp)
-			ensure_dirs(myemp, mode=0755)
-			os.chown(myemp,mystat[ST_UID],mystat[ST_GID])
-			os.chmod(myemp,mystat[ST_MODE])
+		print 'Clearing the chroot path ...'
+		self.clear_dir(self.settings["chroot_path"], 0755, True)
 
 
 	def clear_packages(self):
 		if "pkgcache" in self.settings["options"]:
 			print "purging the pkgcache ..."
-
-			myemp=self.settings["pkgcache_path"]
-			if os.path.isdir(myemp):
-				print "Emptying directory",myemp
-				"""
-				stat the dir, delete the dir, recreate the dir and set
-				the proper perms and ownership
-				"""
-				mystat=os.stat(myemp)
-				#cmd("rm -rf "+myemp, "Could not remove existing file: "+myemp,env=self.env)
-				shutil.rmtree(myemp)
-				ensure_dirs(myemp, mode=0755)
-				os.chown(myemp,mystat[ST_UID],mystat[ST_GID])
-				os.chmod(myemp,mystat[ST_MODE])
+			self.clear_dir(self.settings["pkgcache_path"])
 
 
 	def clear_kerncache(self):
 		if "kerncache" in self.settings["options"]:
 			print "purging the kerncache ..."
-
-			myemp=self.settings["kerncache_path"]
-			if os.path.isdir(myemp):
-				print "Emptying directory",myemp
-				"""
-				stat the dir, delete the dir, recreate the dir and set
-				the proper perms and ownership
-				"""
-				mystat=os.stat(myemp)
-				#cmd("rm -rf "+myemp, "Could not remove existing file: "+myemp,env=self.env)
-				shutil.rmtree(myemp)
-				ensure_dirs(myemp, mode=0755)
-				os.chown(myemp,mystat[ST_UID],mystat[ST_GID])
-				os.chmod(myemp,mystat[ST_MODE])
+			self.clear_dir(self.settings["kerncache_path"])
 
 
 	def purge(self):
@@ -113,3 +73,28 @@ class ClearBase(object):
 			print "clearing kerncache ..."
 			self.clear_kerncache()
 
+
+	def clear_dir(self, myemp, mode=0755, chg_flags=False):
+		'''Universal directory clearing function
+		'''
+		if not myemp:
+			return False
+		if os.path.isdir(myemp):
+			print "Emptying directory" , myemp
+			"""
+			stat the dir, delete the dir, recreate the dir and set
+			the proper perms and ownership
+			"""
+			try:
+				mystat=os.stat(myemp)
+				""" There's no easy way to change flags recursively in python """
+				if chg_flags and os.uname()[0] == "FreeBSD":
+					os.system("chflags -R noschg " + myemp)
+				shutil.rmtree(myemp)
+				ensure_dirs(myemp, mode=mode)
+				os.chown(myemp,mystat[ST_UID],mystat[ST_GID])
+				os.chmod(myemp,mystat[ST_MODE])
+			except Exception as e:
+				print CatalystError("clear_dir(); Exeption: %s" % str(e))
+				return False
+			return True


^ permalink raw reply related	[flat|nested] 144+ messages in thread

end of thread, other threads:[~2024-08-22 18:40 UTC | newest]

Thread overview: 144+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-22 21:19 [gentoo-commits] proj/catalyst:master commit in: catalyst/base/ Matt Turner
2022-11-28 20:38 ` [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
  -- strict thread matches above, loose matches on Subject: below --
2024-08-22 18:39 [gentoo-commits] proj/catalyst:master " Ben Kohler
2024-08-03  9:06 Andreas K. Hüttel
2024-07-30 14:12 Andreas K. Hüttel
2024-07-30 11:06 Andreas K. Hüttel
2024-07-30 11:06 Andreas K. Hüttel
2024-06-09 16:50 Andreas K. Hüttel
2024-06-07 21:45 Matt Turner
2024-03-03 18:50 Andreas K. Hüttel
2023-12-24 21:42 Andreas K. Hüttel
2023-09-05  1:44 Andreas K. Hüttel
2023-07-01 19:27 Andreas K. Hüttel
2023-05-10 18:10 Ben Kohler
2022-11-20  0:21 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2022-05-13 17:45 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2022-11-20  0:21 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2022-04-20 23:26 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2022-11-14 14:11 Andreas K. Hüttel
2022-11-13  2:18 Andreas K. Hüttel
2022-05-13 17:45 Matt Turner
2022-05-13 17:45 Matt Turner
2022-05-13 17:43 [gentoo-commits] proj/catalyst:stage4-user-groups-fixes " Matt Turner
2022-05-13 17:45 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2022-04-02 23:50 Matt Turner
2021-06-10  0:48 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2021-03-25  3:03 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2021-06-10  0:48 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2021-03-09 16:18 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2021-06-10  0:48 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2021-02-21  2:05 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2021-06-10  0:48 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2021-02-20 21:27 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2021-03-25  3:03 Matt Turner
2021-03-06 16:58 Matt Turner
2021-01-28  2:41 Matt Turner
2021-01-28  2:41 Matt Turner
2021-01-28  2:09 [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2021-01-28  2:41 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2021-01-18 19:53 [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-12-27 23:15 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2020-12-19 19:56 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2020-10-30 22:41 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2020-10-30 22:41 Matt Turner
2020-10-30 22:41 Matt Turner
2020-10-24 22:07 Matt Turner
2020-10-24 22:07 Matt Turner
2020-10-14 17:48 Matt Turner
2020-08-15 21:11 Matt Turner
2020-07-24 20:33 Andreas K. Hüttel
2020-07-20 20:40 Andreas K. Hüttel
2020-06-05 21:13 Matt Turner
2020-06-05 21:13 Matt Turner
2020-06-05 21:13 Matt Turner
2020-05-21 20:25 Matt Turner
2020-05-21 20:25 Matt Turner
2020-05-21 20:25 Matt Turner
2020-05-20  3:39 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2020-05-21 20:25 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2020-05-16  6:43 Matt Turner
2020-05-16  6:43 Matt Turner
2020-05-15  6:32 [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-05-16  6:43 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2020-05-15  6:32 [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-05-16  6:43 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2020-05-06 17:41 Matt Turner
2020-05-05  5:20 Matt Turner
2020-05-01  5:57 Matt Turner
2020-04-30 22:56 Matt Turner
2020-04-23  2:06 Matt Turner
2020-04-22  5:52 Matt Turner
2020-04-18 20:30 Matt Turner
2020-04-17 19:52 Matt Turner
2020-04-17 19:52 Matt Turner
2020-04-17 19:52 Matt Turner
2020-04-17 19:52 Matt Turner
2020-04-15 19:59 Matt Turner
2020-04-13 20:43 Matt Turner
2020-04-13 20:43 Matt Turner
2020-04-13 20:43 Matt Turner
2020-04-13 20:36 Matt Turner
2020-04-13 20:36 Matt Turner
2020-04-13 20:36 Matt Turner
2020-04-10 21:04 Matt Turner
2020-04-10  5:38 Matt Turner
2020-04-10  2:11 Matt Turner
2020-03-29 17:48 Matt Turner
2020-03-28 20:07 Matt Turner
2019-10-19 23:25 Matt Turner
2019-10-14 20:15 Matt Turner
2019-10-05 22:31 Matt Turner
2018-11-07 19:50 Rick Farina
2018-10-01 16:30 Brian Dolbec
2018-07-21 18:54 Brian Dolbec
2018-07-21 18:54 Brian Dolbec
2018-02-22  3:53 Richard Farina
2018-02-22  3:50 Richard Farina
2017-12-29  2:27 Brian Dolbec
2017-12-29  2:27 Brian Dolbec
2017-12-29  0:35 Brian Dolbec
2017-11-29 17:20 Brian Dolbec
2017-11-29 17:20 Brian Dolbec
2017-11-22 15:52 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2017-11-29 17:20 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2017-03-09  5:38 Brian Dolbec
2017-03-09  5:05 Brian Dolbec
2017-03-08 23:16 Brian Dolbec
2017-03-08 23:16 Brian Dolbec
2016-09-19  3:27 Brian Dolbec
2016-06-25 15:46 Brian Dolbec
2016-05-22  3:34 Mike Frysinger
2016-05-20  3:03 Mike Frysinger
2016-03-24 14:37 Brian Dolbec
2016-03-23 21:15 Brian Dolbec
2016-03-21  4:55 Mike Frysinger
2016-03-17  5:04 Brian Dolbec
2016-02-17  8:17 Brian Dolbec
2016-02-11 16:43 Mike Frysinger
2016-02-11 13:59 Mike Frysinger
2015-12-23  4:30 Brian Dolbec
2015-12-20  4:47 Brian Dolbec
2015-12-20  1:13 Brian Dolbec
2015-12-15 17:13 Brian Dolbec
2015-11-21  1:33 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-11-10  6:42 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-11-20 21:26 Brian Dolbec
2015-11-09  4:47 Brian Dolbec
2015-10-31 20:35 Brian Dolbec
2015-10-31 20:35 Brian Dolbec
2015-10-28 16:50 Mike Frysinger
2015-10-27 21:43 Richard Farina
2015-10-24  6:58 Mike Frysinger
2015-10-24  6:58 Mike Frysinger
2015-10-11 18:03 Mike Frysinger
2015-10-11 17:26 Mike Frysinger
2015-10-11 17:26 Mike Frysinger
2015-10-11 17:26 Mike Frysinger
2015-10-09  2:40 Mike Frysinger
2015-10-06 17:03 Mike Frysinger
2015-10-06 15:31 Mike Frysinger
2015-10-06 13:46 Mike Frysinger
2015-09-08 14:21 Richard Farina
2015-09-08 14:17 Brian Dolbec
2015-09-08 14:17 Brian Dolbec
2015-09-08 14:14 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-09-08 14:17 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-09-06 21:18 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-09-06 21:21 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-09-03 15:14 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-09-02 21:00 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-09-02 21:52 Richard Farina
2015-09-02 21:25 Richard Farina
2015-09-01 19:41 Richard Farina
2015-08-31 19:21 Richard Farina
2015-05-24  0:08 Brian Dolbec
2015-05-24  0:08 Brian Dolbec
2015-05-24  0:08 Brian Dolbec
2015-05-21 23:53 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-05-24  0:08 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-05-21 23:53 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-05-24  0:08 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-05-21 23:53 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-05-24  0:08 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-02-26 22:18 Brian Dolbec
2015-01-01  5:59 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-02-26 20:12 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox