* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2015-10-11 17:26 Mike Frysinger
0 siblings, 0 replies; 57+ messages in thread
From: Mike Frysinger @ 2015-10-11 17:26 UTC (permalink / raw
To: gentoo-commits
commit: 8fa80abe5e84a125e8cd9e143cf8f92b5c27ac0a
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 10 05:11:49 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=8fa80abe
stage3: convert to log module
catalyst/targets/stage3.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/catalyst/targets/stage3.py b/catalyst/targets/stage3.py
index cc3e520..f083193 100644
--- a/catalyst/targets/stage3.py
+++ b/catalyst/targets/stage3.py
@@ -3,6 +3,7 @@ stage3 target, builds upon previous stage2/stage3 tarball
"""
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation.
+from catalyst import log
from catalyst.base.stagebase import StageBase
@@ -18,10 +19,10 @@ class stage3(StageBase):
def set_portage_overlay(self):
StageBase.set_portage_overlay(self)
if "portage_overlay" in self.settings:
- print "\nWARNING !!!!!"
- print "\tUsing an overlay for earlier stages could cause build issues."
- print "\tIf you break it, you buy it. Don't complain to us about it."
- print "\tDont say we did not warn you\n"
+ log.warning(
+ 'Using an overlay for earlier stages could cause build issues.\n'
+ "If you break it, you buy it. Don't complain to us about it.\n"
+ "Don't say we did not warn you.")
def set_cleanables(self):
StageBase.set_cleanables(self)
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2024-10-13 20:33 Andreas K. Hüttel
0 siblings, 0 replies; 57+ messages in thread
From: Andreas K. Hüttel @ 2024-10-13 20:33 UTC (permalink / raw
To: gentoo-commits
commit: f23f553a565fbb22d25b52ef6e0bdc867a9323f2
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 13 14:43:30 2024 +0000
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Oct 13 20:30:52 2024 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=f23f553a
Add diskimage_stage2.py with parameters and sequence different from iso
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
catalyst/targets/diskimage_stage2.py | 114 +++++++++++++++++++++++++++++++++++
1 file changed, 114 insertions(+)
diff --git a/catalyst/targets/diskimage_stage2.py b/catalyst/targets/diskimage_stage2.py
new file mode 100644
index 00000000..bcad8b0d
--- /dev/null
+++ b/catalyst/targets/diskimage_stage2.py
@@ -0,0 +1,114 @@
+"""
+Disk image stage2 target, builds upon previous disk image stage1 tarball
+"""
+# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation.
+
+from catalyst.support import (normpath, file_locate, CatalystError)
+from catalyst.fileops import clear_dir
+from catalyst.base.stagebase import StageBase
+
+
+class diskimage_stage2(StageBase):
+ """
+ Builder class for a disk image stage2 build.
+ """
+ required_values = frozenset([
+ "boot/kernel",
+ ])
+ valid_values = required_values | frozenset([
+ "diskimage/bootargs",
+ "diskimage/depclean",
+ "diskimage/empty",
+ "diskimage/fsops",
+ "diskimage/fsscript",
+ "diskimage/gk_mainargs",
+ "diskimage/modblacklist",
+ "diskimage/motd",
+ "diskimage/qcow2",
+ "diskimage/qcow2_size",
+ "diskimage/qcow2_efisize",
+ "diskimage/qcow2_roottype",
+ "diskimage/rcadd",
+ "diskimage/rcdel",
+ "diskimage/readme",
+ "diskimage/rm",
+ "diskimage/type", # generic, cloud-init, ssh, console
+ "diskimage/unmerge",
+ "diskimage/users",
+ "diskimage/verify",
+ "diskimage/volid",
+ "repos",
+ ])
+
+# Types of bootable disk images planned for (diskimage/type):
+# cloud-init - an image that starts cloud-init for configuration and then can be
+# used out of the box
+# console - an image that has an empty root password and allows passwordless
+# login on the console only
+# ssh - an image that populates /root/.ssh/authorized_keys and starts dhcp
+# as well as sshd; obviously not fit for public distribution
+# generic - an image with no means of logging in... needs postprocessing
+# no services are started
+
+ def __init__(self, spec, addlargs):
+ StageBase.__init__(self, spec, addlargs)
+ if "diskimage/type" not in self.settings:
+ self.settings["diskimage/type"] = "generic"
+
+ file_locate(self.settings, ["controller_file"])
+
+ def set_spec_prefix(self):
+ self.settings["spec_prefix"] = "diskimage"
+
+ def set_target_path(self):
+ '''Set the target path for the finished stage.
+
+ This method runs the StageBase.set_target_path mehtod,
+ and additionally creates a staging directory for assembling
+ the final components needed to produce the iso image.
+ '''
+ super(diskimage_stage2, self).set_target_path()
+ clear_dir(self.settings['target_path'])
+
+ def run_local(self):
+ # what modules do we want to blacklist?
+ if "diskimage/modblacklist" in self.settings:
+ path = normpath(self.settings["chroot_path"] +
+ "/etc/modprobe.d/blacklist.conf")
+ try:
+ with open(path, "a") as myf:
+ myf.write("\n#Added by Catalyst:")
+ # workaround until config.py is using configparser
+ if isinstance(self.settings["diskimage/modblacklist"], str):
+ self.settings["diskimage/modblacklist"] = self.settings[
+ "diskimage/modblacklist"].split()
+ for x in self.settings["diskimage/modblacklist"]:
+ myf.write("\nblacklist "+x)
+ except Exception as e:
+ raise CatalystError("Couldn't open " +
+ self.settings["chroot_path"] +
+ "/etc/modprobe.d/blacklist.conf.",
+ print_traceback=True) from e
+
+ def set_action_sequence(self):
+ self.build_sequence.extend([
+ self.run_local,
+ self.build_kernel
+ ])
+ if "fetch" not in self.settings["options"]:
+ self.build_sequence.extend([
+ self.preclean,
+ self.diskimage_update,
+ self.fsscript,
+ self.rcupdate,
+ self.unmerge,
+ ])
+ self.finish_sequence.extend([
+ self.remove,
+ self.empty,
+ self.clean,
+ self.create_qcow2,
+ ])
+ self.set_completion_action_sequences()
+ # our output is the qcow2, not a stage archive
+ self.finish_sequence.remove(self.capture)
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2024-10-13 20:33 Andreas K. Hüttel
0 siblings, 0 replies; 57+ messages in thread
From: Andreas K. Hüttel @ 2024-10-13 20:33 UTC (permalink / raw
To: gentoo-commits
commit: 6a33ab1cbe0e2a6b237a7dc1b4cb3184f145b8d2
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 13 14:40:19 2024 +0000
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Oct 13 20:30:35 2024 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=6a33ab1c
Clone livecd_stage1.py to diskimage_stage1.py, only cosmetic changes
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
catalyst/targets/diskimage_stage1.py | 58 ++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/catalyst/targets/diskimage_stage1.py b/catalyst/targets/diskimage_stage1.py
new file mode 100644
index 00000000..9cbf81df
--- /dev/null
+++ b/catalyst/targets/diskimage_stage1.py
@@ -0,0 +1,58 @@
+"""
+Disk image stage1 target
+"""
+# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation.
+
+from catalyst.support import normpath
+
+from catalyst.base.stagebase import StageBase
+
+
+class diskimage_stage1(StageBase):
+ """
+ Builder class for disk image stage1.
+ """
+ required_values = frozenset([
+ "diskimage/packages",
+ ])
+ valid_values = required_values | frozenset([
+ "diskimage/use",
+ ])
+
+ def __init__(self, spec, addlargs):
+ StageBase.__init__(self, spec, addlargs)
+
+ def set_action_sequence(self):
+ self.build_sequence.extend([
+ self.build_packages,
+ ])
+ self.finish_sequence.extend([
+ self.clean,
+ ])
+ self.set_completion_action_sequences()
+
+ def set_spec_prefix(self):
+ self.settings["spec_prefix"] = "diskimage"
+
+ def set_catalyst_use(self):
+ StageBase.set_catalyst_use(self)
+ if "catalyst_use" in self.settings:
+ self.settings["catalyst_use"].append("diskimage")
+ else:
+ self.settings["catalyst_use"] = ["diskiage"]
+
+ def set_packages(self):
+ StageBase.set_packages(self)
+ if self.settings["spec_prefix"]+"/packages" in self.settings:
+ if isinstance(self.settings[self.settings['spec_prefix']+'/packages'], str):
+ self.settings[self.settings["spec_prefix"]+"/packages"] = \
+ self.settings[self.settings["spec_prefix"] +
+ "/packages"].split()
+
+ def set_pkgcache_path(self):
+ if "pkgcache_path" in self.settings:
+ if not isinstance(self.settings['pkgcache_path'], str):
+ self.settings["pkgcache_path"] = normpath(
+ ' '.join(self.settings["pkgcache_path"]))
+ else:
+ StageBase.set_pkgcache_path(self)
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2024-08-03 11:01 Andreas K. Hüttel
0 siblings, 0 replies; 57+ messages in thread
From: Andreas K. Hüttel @ 2024-08-03 11:01 UTC (permalink / raw
To: gentoo-commits
commit: a65ccb75656b8b5a01adf69bcbdcb19425abb0dd
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 3 11:00:48 2024 +0000
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Aug 3 11:00:48 2024 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=a65ccb75
stage1: Drop now unneeded imports again
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
catalyst/targets/stage1.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/catalyst/targets/stage1.py b/catalyst/targets/stage1.py
index 66f21a9c..18ff1840 100644
--- a/catalyst/targets/stage1.py
+++ b/catalyst/targets/stage1.py
@@ -4,12 +4,10 @@ stage1 target
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation.
from catalyst import log
-from catalyst.support import (normpath, get_repo_name)
+from catalyst.support import normpath
from catalyst.fileops import move_path
from catalyst.base.stagebase import StageBase
-from pathlib import Path
-
class stage1(StageBase):
"""
Builder class for a stage1 installation tarball build.
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2024-08-03 9:06 Andreas K. Hüttel
0 siblings, 0 replies; 57+ messages in thread
From: Andreas K. Hüttel @ 2024-08-03 9:06 UTC (permalink / raw
To: gentoo-commits
commit: 31d975c10785f4de73cd788285ccf2408aa54a30
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 3 09:06:29 2024 +0000
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Aug 3 09:06:29 2024 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=31d975c1
stage1: make sure we bind-mount within the chroot dir, try 3, now with pathlib
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
catalyst/targets/stage1.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/catalyst/targets/stage1.py b/catalyst/targets/stage1.py
index ba42d9b8..ae27cd0a 100644
--- a/catalyst/targets/stage1.py
+++ b/catalyst/targets/stage1.py
@@ -31,14 +31,18 @@ class stage1(StageBase):
# otherwise we may end up trying to mount the same squashfs twice instead
# of a bind mount
# * take the directory inside the chroot as source, not the host directory
+ # In the meantime we fixed make.profile to point outside ROOT, so this may not
+ # be necessary at the moment anymore. Having it can prevent future surprises
+ # though.
self.set_chroot_path()
for path, name, _ in self.repos:
name = get_repo_name(path)
mount_id = f'root_repo_{name}'
+ repo_loc = self.get_repo_location(name)
self.mount[mount_id] = {
'enable': True,
- 'source': self.settings['chroot_path'] / self.get_repo_location(name),
- 'target': normpath("/tmp/stage1root") / self.get_repo_location(name)
+ 'source': self.settings['chroot_path'] / repo_loc.relative_to('/'),
+ 'target': normpath("/tmp/stage1root") / repo_loc.relative_to('/')
}
def set_root_path(self):
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2024-07-30 15:29 Andreas K. Hüttel
0 siblings, 0 replies; 57+ messages in thread
From: Andreas K. Hüttel @ 2024-07-30 15:29 UTC (permalink / raw
To: gentoo-commits
commit: bc26f26acfeed23934c10a341f45ff0e0c4703f9
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 30 15:29:43 2024 +0000
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Jul 30 15:29:43 2024 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=bc26f26a
note to self: python is stupid
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
catalyst/targets/stage1.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/catalyst/targets/stage1.py b/catalyst/targets/stage1.py
index 0cb399c3..ba42d9b8 100644
--- a/catalyst/targets/stage1.py
+++ b/catalyst/targets/stage1.py
@@ -31,7 +31,7 @@ class stage1(StageBase):
# otherwise we may end up trying to mount the same squashfs twice instead
# of a bind mount
# * take the directory inside the chroot as source, not the host directory
- self.set_chroot_path()
+ self.set_chroot_path()
for path, name, _ in self.repos:
name = get_repo_name(path)
mount_id = f'root_repo_{name}'
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2024-07-30 15:28 Andreas K. Hüttel
0 siblings, 0 replies; 57+ messages in thread
From: Andreas K. Hüttel @ 2024-07-30 15:28 UTC (permalink / raw
To: gentoo-commits
commit: 5f8440d1b1429305a3636a5c82642089e2c754fb
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 30 15:28:21 2024 +0000
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Jul 30 15:28:21 2024 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5f8440d1
stage1: apparently we need to populate the chroot_path setting first
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
catalyst/targets/stage1.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/catalyst/targets/stage1.py b/catalyst/targets/stage1.py
index cd10c86a..0cb399c3 100644
--- a/catalyst/targets/stage1.py
+++ b/catalyst/targets/stage1.py
@@ -31,6 +31,7 @@ class stage1(StageBase):
# otherwise we may end up trying to mount the same squashfs twice instead
# of a bind mount
# * take the directory inside the chroot as source, not the host directory
+ self.set_chroot_path()
for path, name, _ in self.repos:
name = get_repo_name(path)
mount_id = f'root_repo_{name}'
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2024-07-30 14:54 Andreas K. Hüttel
0 siblings, 0 replies; 57+ messages in thread
From: Andreas K. Hüttel @ 2024-07-30 14:54 UTC (permalink / raw
To: gentoo-commits
commit: c836c804b8b7ef88273751411b7b1a7f5b021680
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 30 14:53:48 2024 +0000
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Jul 30 14:53:48 2024 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=c836c804
stage1: make sure we bind-mount within the chroot dir
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
catalyst/targets/stage1.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/catalyst/targets/stage1.py b/catalyst/targets/stage1.py
index 1c9a4d42..cd10c86a 100644
--- a/catalyst/targets/stage1.py
+++ b/catalyst/targets/stage1.py
@@ -26,13 +26,17 @@ class stage1(StageBase):
# In the stage1 build we need to make sure that the ebuild repositories are
# accessible within $ROOT too... otherwise relative symlinks may point nowhere
# and, e.g., portageq may malfunction due to missing profile.
- # Create a second bind mount entry for each repository
+ # Create a second, bind mount entry for each repository. We need to
+ # * take as source not the original source but the original target, since
+ # otherwise we may end up trying to mount the same squashfs twice instead
+ # of a bind mount
+ # * take the directory inside the chroot as source, not the host directory
for path, name, _ in self.repos:
name = get_repo_name(path)
mount_id = f'root_repo_{name}'
self.mount[mount_id] = {
'enable': True,
- 'source': self.get_repo_location(name),
+ 'source': self.settings['chroot_path'] / self.get_repo_location(name),
'target': normpath("/tmp/stage1root") / self.get_repo_location(name)
}
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2024-07-30 14:45 Andreas K. Hüttel
0 siblings, 0 replies; 57+ messages in thread
From: Andreas K. Hüttel @ 2024-07-30 14:45 UTC (permalink / raw
To: gentoo-commits
commit: 228569f3f827e7e116fede8901dbc50118519eae
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 30 14:45:23 2024 +0000
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Jul 30 14:45:23 2024 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=228569f3
stage1: we can't mount any squashfs twice, so we make sure we get a bind mount
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
catalyst/targets/stage1.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/catalyst/targets/stage1.py b/catalyst/targets/stage1.py
index 593509e4..1c9a4d42 100644
--- a/catalyst/targets/stage1.py
+++ b/catalyst/targets/stage1.py
@@ -32,7 +32,7 @@ class stage1(StageBase):
mount_id = f'root_repo_{name}'
self.mount[mount_id] = {
'enable': True,
- 'source': path,
+ 'source': self.get_repo_location(name),
'target': normpath("/tmp/stage1root") / self.get_repo_location(name)
}
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2024-07-30 11:06 Andreas K. Hüttel
0 siblings, 0 replies; 57+ messages in thread
From: Andreas K. Hüttel @ 2024-07-30 11:06 UTC (permalink / raw
To: gentoo-commits
commit: 8339543d77edee063bdd1288cb0e24b77865b437
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 29 20:29:50 2024 +0000
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Jul 29 20:29:50 2024 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=8339543d
targets: improve path concatenation
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
catalyst/targets/stage1.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/catalyst/targets/stage1.py b/catalyst/targets/stage1.py
index 42931749..593509e4 100644
--- a/catalyst/targets/stage1.py
+++ b/catalyst/targets/stage1.py
@@ -33,7 +33,7 @@ class stage1(StageBase):
self.mount[mount_id] = {
'enable': True,
'source': path,
- 'target': Path(normpath("/tmp/stage1root") + "/" + str(self.get_repo_location(name)))
+ 'target': normpath("/tmp/stage1root") / self.get_repo_location(name)
}
def set_root_path(self):
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2024-07-30 11:06 Andreas K. Hüttel
0 siblings, 0 replies; 57+ messages in thread
From: Andreas K. Hüttel @ 2024-07-30 11:06 UTC (permalink / raw
To: gentoo-commits
commit: 655acfcf822fd83affaa32c2bc8a4a3188850d54
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 29 20:27:45 2024 +0000
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Jul 29 20:27:45 2024 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=655acfcf
targets: Mount repos also under $ROOT for stage1 builds
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
catalyst/targets/stage1.py | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/catalyst/targets/stage1.py b/catalyst/targets/stage1.py
index 0ea5f92b..42931749 100644
--- a/catalyst/targets/stage1.py
+++ b/catalyst/targets/stage1.py
@@ -4,10 +4,11 @@ stage1 target
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation.
from catalyst import log
-from catalyst.support import normpath
+from catalyst.support import (normpath, get_repo_name)
from catalyst.fileops import move_path
from catalyst.base.stagebase import StageBase
+from pathlib import Path
class stage1(StageBase):
"""
@@ -22,6 +23,18 @@ class stage1(StageBase):
def __init__(self, spec, addlargs):
StageBase.__init__(self, spec, addlargs)
+ # In the stage1 build we need to make sure that the ebuild repositories are
+ # accessible within $ROOT too... otherwise relative symlinks may point nowhere
+ # and, e.g., portageq may malfunction due to missing profile.
+ # Create a second bind mount entry for each repository
+ for path, name, _ in self.repos:
+ name = get_repo_name(path)
+ mount_id = f'root_repo_{name}'
+ self.mount[mount_id] = {
+ 'enable': True,
+ 'source': path,
+ 'target': Path(normpath("/tmp/stage1root") + "/" + str(self.get_repo_location(name)))
+ }
def set_root_path(self):
# sets the root path, relative to 'chroot_path', of the stage1 root
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/targets/
@ 2022-11-20 0:21 Matt Turner
2022-04-02 23:50 ` [gentoo-commits] proj/catalyst:master " Matt Turner
0 siblings, 1 reply; 57+ messages in thread
From: Matt Turner @ 2022-11-20 0:21 UTC (permalink / raw
To: gentoo-commits
commit: c2c22f5d07684ed0c6b802254e7b678358111579
Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 8 21:08:09 2022 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Apr 2 23:50:24 2022 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=c2c22f5d
catalyst: add new options to stage4 step list
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
catalyst/targets/stage4.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/catalyst/targets/stage4.py b/catalyst/targets/stage4.py
index ff1d4dca..35309b45 100644
--- a/catalyst/targets/stage4.py
+++ b/catalyst/targets/stage4.py
@@ -19,13 +19,16 @@ class stage4(StageBase):
"stage4/empty",
"stage4/fsscript",
"stage4/gk_mainargs",
+ "stage4/groups",
"stage4/linuxrc",
"stage4/rcadd",
"stage4/rcdel",
"stage4/rm",
"stage4/root_overlay",
+ "stage4/ssh_public_keys",
"stage4/unmerge",
"stage4/use",
+ "stage4/users",
])
def __init__(self, spec, addlargs):
@@ -51,6 +54,9 @@ class stage4(StageBase):
])
self.finish_sequence.extend([
self.remove,
+ self.groups,
+ self.users,
+ self.ssh_public_keys,
self.empty,
self.clean,
])
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
2022-11-20 0:21 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
@ 2022-04-02 23:50 ` Matt Turner
0 siblings, 0 replies; 57+ messages in thread
From: Matt Turner @ 2022-04-02 23:50 UTC (permalink / raw
To: gentoo-commits
commit: c2c22f5d07684ed0c6b802254e7b678358111579
Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 8 21:08:09 2022 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Apr 2 23:50:24 2022 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=c2c22f5d
catalyst: add new options to stage4 step list
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
catalyst/targets/stage4.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/catalyst/targets/stage4.py b/catalyst/targets/stage4.py
index ff1d4dca..35309b45 100644
--- a/catalyst/targets/stage4.py
+++ b/catalyst/targets/stage4.py
@@ -19,13 +19,16 @@ class stage4(StageBase):
"stage4/empty",
"stage4/fsscript",
"stage4/gk_mainargs",
+ "stage4/groups",
"stage4/linuxrc",
"stage4/rcadd",
"stage4/rcdel",
"stage4/rm",
"stage4/root_overlay",
+ "stage4/ssh_public_keys",
"stage4/unmerge",
"stage4/use",
+ "stage4/users",
])
def __init__(self, spec, addlargs):
@@ -51,6 +54,9 @@ class stage4(StageBase):
])
self.finish_sequence.extend([
self.remove,
+ self.groups,
+ self.users,
+ self.ssh_public_keys,
self.empty,
self.clean,
])
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2021-02-21 2:05 Matt Turner
0 siblings, 0 replies; 57+ messages in thread
From: Matt Turner @ 2021-02-21 2:05 UTC (permalink / raw
To: gentoo-commits
commit: 6b78a58c9ac825ecd450d100cd269d29761dbe03
Author: Daniel Cordero <catalyst <AT> 0xdc <DOT> io>
AuthorDate: Thu Feb 4 11:07:18 2021 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Feb 21 02:05:34 2021 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=6b78a58c
catalyst: Clean up chroot directory on success
The embedded and livecd-stage2 targets override the action sequence
without calling set_completion_action_sequences. This would leave the
temporary build environment unpacked on the filesystem.
Signed-off-by: Daniel Cordero <catalyst <AT> 0xdc.io>
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
catalyst/targets/embedded.py | 2 +-
catalyst/targets/livecd_stage2.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/catalyst/targets/embedded.py b/catalyst/targets/embedded.py
index b677b226..01ad035d 100644
--- a/catalyst/targets/embedded.py
+++ b/catalyst/targets/embedded.py
@@ -53,8 +53,8 @@ class embedded(StageBase):
self.empty,
self.clean,
self.capture,
- self.clear_autoresume,
])
+ self.set_completion_action_sequences()
def set_root_path(self):
self.settings["root_path"] = normpath("/tmp/mergeroot")
diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py
index 774702f8..832e0998 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -108,4 +108,4 @@ class livecd_stage2(StageBase):
self.setup_overlay,
self.create_iso,
])
- self.finish_sequence.append(self.clear_autoresume)
+ self.set_completion_action_sequences()
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: catalyst/targets/
@ 2021-01-18 19:53 Matt Turner
2020-12-27 23:15 ` [gentoo-commits] proj/catalyst:master " Matt Turner
0 siblings, 1 reply; 57+ messages in thread
From: Matt Turner @ 2021-01-18 19:53 UTC (permalink / raw
To: gentoo-commits
commit: 6ef1d63861248098654bd8f211f929f8c6b6c63b
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 19 01:58:42 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=6ef1d638
catalyst: Remove some redundant set_stage_path()s
We only need to override root_path, and stage_path will be configured
properly.
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
catalyst/targets/embedded.py | 5 -----
catalyst/targets/stage1.py | 5 -----
2 files changed, 10 deletions(-)
diff --git a/catalyst/targets/embedded.py b/catalyst/targets/embedded.py
index e9138437..918b36bf 100644
--- a/catalyst/targets/embedded.py
+++ b/catalyst/targets/embedded.py
@@ -65,11 +65,6 @@ class embedded(StageBase):
"clear_autoresume",
])
- def set_stage_path(self):
- self.settings["stage_path"] = normpath(
- self.settings["chroot_path"]+"/tmp/mergeroot")
- log.info('embedded stage path is %s', self.settings['stage_path'])
-
def set_root_path(self):
self.settings["root_path"] = normpath("/tmp/mergeroot")
log.info('embedded root path is %s', self.settings['root_path'])
diff --git a/catalyst/targets/stage1.py b/catalyst/targets/stage1.py
index be3eae93..5aa27bb9 100644
--- a/catalyst/targets/stage1.py
+++ b/catalyst/targets/stage1.py
@@ -23,11 +23,6 @@ class stage1(StageBase):
def __init__(self, spec, addlargs):
StageBase.__init__(self, spec, addlargs)
- def set_stage_path(self):
- self.settings["stage_path"] = normpath(
- self.settings["chroot_path"]+self.settings["root_path"])
- log.notice('stage1 stage path is %s', self.settings['stage_path'])
-
def set_root_path(self):
# sets the root path, relative to 'chroot_path', of the stage1 root
self.settings["root_path"] = normpath("/tmp/stage1root")
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
2021-01-18 19:53 [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
@ 2020-12-27 23:15 ` Matt Turner
0 siblings, 0 replies; 57+ messages in thread
From: Matt Turner @ 2020-12-27 23:15 UTC (permalink / raw
To: gentoo-commits
commit: 6ef1d63861248098654bd8f211f929f8c6b6c63b
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 19 01:58:42 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=6ef1d638
catalyst: Remove some redundant set_stage_path()s
We only need to override root_path, and stage_path will be configured
properly.
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
catalyst/targets/embedded.py | 5 -----
catalyst/targets/stage1.py | 5 -----
2 files changed, 10 deletions(-)
diff --git a/catalyst/targets/embedded.py b/catalyst/targets/embedded.py
index e9138437..918b36bf 100644
--- a/catalyst/targets/embedded.py
+++ b/catalyst/targets/embedded.py
@@ -65,11 +65,6 @@ class embedded(StageBase):
"clear_autoresume",
])
- def set_stage_path(self):
- self.settings["stage_path"] = normpath(
- self.settings["chroot_path"]+"/tmp/mergeroot")
- log.info('embedded stage path is %s', self.settings['stage_path'])
-
def set_root_path(self):
self.settings["root_path"] = normpath("/tmp/mergeroot")
log.info('embedded root path is %s', self.settings['root_path'])
diff --git a/catalyst/targets/stage1.py b/catalyst/targets/stage1.py
index be3eae93..5aa27bb9 100644
--- a/catalyst/targets/stage1.py
+++ b/catalyst/targets/stage1.py
@@ -23,11 +23,6 @@ class stage1(StageBase):
def __init__(self, spec, addlargs):
StageBase.__init__(self, spec, addlargs)
- def set_stage_path(self):
- self.settings["stage_path"] = normpath(
- self.settings["chroot_path"]+self.settings["root_path"])
- log.notice('stage1 stage path is %s', self.settings['stage_path'])
-
def set_root_path(self):
# sets the root path, relative to 'chroot_path', of the stage1 root
self.settings["root_path"] = normpath("/tmp/stage1root")
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:wip/mattst88 commit in: catalyst/targets/
@ 2020-10-29 21:00 Matt Turner
2020-10-24 22:07 ` [gentoo-commits] proj/catalyst:master " Matt Turner
0 siblings, 1 reply; 57+ messages in thread
From: Matt Turner @ 2020-10-29 21:00 UTC (permalink / raw
To: gentoo-commits
commit: 6a4fa88d18afefc4aac328dd5bf60d2a13026f2e
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 23 04:28:48 2020 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Oct 23 04:29:48 2020 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=6a4fa88d
catalyst: Explicitly keep /etc/resolv.conf in stage4
It was confusing to understand that /etc/resolv.conf was *kept* in
stage4 because its set_cleanables() contained everything except it.
This will simplify things if we want to add more common items to the
cleanables list.
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
catalyst/targets/stage4.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/catalyst/targets/stage4.py b/catalyst/targets/stage4.py
index a9b3c936..346c0845 100644
--- a/catalyst/targets/stage4.py
+++ b/catalyst/targets/stage4.py
@@ -32,7 +32,11 @@ class stage4(StageBase):
StageBase.__init__(self, spec, addlargs)
def set_cleanables(self):
- self.settings["cleanables"] = ["/var/tmp/*", "/tmp/*"]
+ StageBase.set_cleanables(self)
+
+ # We want to allow stage4's fsscript to generate a default
+ # /etc/resolv.conf
+ self.settings["cleanables"].remove('/etc/resolv.conf')
def set_action_sequence(self):
self.settings['action_sequence'] = [
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
2020-10-29 21:00 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
@ 2020-10-24 22:07 ` Matt Turner
0 siblings, 0 replies; 57+ messages in thread
From: Matt Turner @ 2020-10-24 22:07 UTC (permalink / raw
To: gentoo-commits
commit: 6a4fa88d18afefc4aac328dd5bf60d2a13026f2e
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 23 04:28:48 2020 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Oct 23 04:29:48 2020 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=6a4fa88d
catalyst: Explicitly keep /etc/resolv.conf in stage4
It was confusing to understand that /etc/resolv.conf was *kept* in
stage4 because its set_cleanables() contained everything except it.
This will simplify things if we want to add more common items to the
cleanables list.
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
catalyst/targets/stage4.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/catalyst/targets/stage4.py b/catalyst/targets/stage4.py
index a9b3c936..346c0845 100644
--- a/catalyst/targets/stage4.py
+++ b/catalyst/targets/stage4.py
@@ -32,7 +32,11 @@ class stage4(StageBase):
StageBase.__init__(self, spec, addlargs)
def set_cleanables(self):
- self.settings["cleanables"] = ["/var/tmp/*", "/tmp/*"]
+ StageBase.set_cleanables(self)
+
+ # We want to allow stage4's fsscript to generate a default
+ # /etc/resolv.conf
+ self.settings["cleanables"].remove('/etc/resolv.conf')
def set_action_sequence(self):
self.settings['action_sequence'] = [
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2020-10-24 22:07 Matt Turner
0 siblings, 0 replies; 57+ messages in thread
From: Matt Turner @ 2020-10-24 22:07 UTC (permalink / raw
To: gentoo-commits
commit: fb9697b053221a408347bbdba1b3dd90845b898e
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 23 04:26:15 2020 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Oct 23 04:27:10 2020 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=fb9697b0
catalyst: Drop useless stage3 set_cleanables()
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
catalyst/targets/stage3.py | 3 ---
1 file changed, 3 deletions(-)
diff --git a/catalyst/targets/stage3.py b/catalyst/targets/stage3.py
index a8192a01..cfc0dbf9 100644
--- a/catalyst/targets/stage3.py
+++ b/catalyst/targets/stage3.py
@@ -24,6 +24,3 @@ class stage3(StageBase):
'Using an overlay for earlier stages could cause build issues.\n'
"If you break it, you buy it. Don't complain to us about it.\n"
"Don't say we did not warn you.")
-
- def set_cleanables(self):
- StageBase.set_cleanables(self)
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: catalyst/targets/
@ 2020-10-23 4:36 Matt Turner
2020-10-24 22:07 ` [gentoo-commits] proj/catalyst:master " Matt Turner
0 siblings, 1 reply; 57+ messages in thread
From: Matt Turner @ 2020-10-23 4:36 UTC (permalink / raw
To: gentoo-commits
commit: 3c50f0f689d5970a4803f3e4b745993c4de180f0
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 23 04:33:22 2020 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Oct 23 04:33:22 2020 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=3c50f0f6
catalyst: Don't delete /usr/share/zoneinfo from stage1
I have no clue why we would want to (or even bother) delete the
timezone data out of stage1. It's been this way since the initial
catalyst 2.0 import.
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
catalyst/targets/stage1.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/catalyst/targets/stage1.py b/catalyst/targets/stage1.py
index 93c62877..2c09a41f 100644
--- a/catalyst/targets/stage1.py
+++ b/catalyst/targets/stage1.py
@@ -36,7 +36,8 @@ class stage1(StageBase):
def set_cleanables(self):
StageBase.set_cleanables(self)
self.settings["cleanables"].extend([
- "/usr/share/zoneinfo", self.settings["port_conf"] + "/package*"])
+ self.settings["port_conf"] + "/package*",
+ ])
# XXX: How do these override_foo() functions differ from the ones in StageBase and why aren't they in stage3_target?
# XXY: It appears the difference is that these functions are actually doing something and the ones in stagebase don't :-(
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
2020-10-23 4:36 [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
@ 2020-10-24 22:07 ` Matt Turner
0 siblings, 0 replies; 57+ messages in thread
From: Matt Turner @ 2020-10-24 22:07 UTC (permalink / raw
To: gentoo-commits
commit: 3c50f0f689d5970a4803f3e4b745993c4de180f0
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 23 04:33:22 2020 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Oct 23 04:33:22 2020 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=3c50f0f6
catalyst: Don't delete /usr/share/zoneinfo from stage1
I have no clue why we would want to (or even bother) delete the
timezone data out of stage1. It's been this way since the initial
catalyst 2.0 import.
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
catalyst/targets/stage1.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/catalyst/targets/stage1.py b/catalyst/targets/stage1.py
index 93c62877..2c09a41f 100644
--- a/catalyst/targets/stage1.py
+++ b/catalyst/targets/stage1.py
@@ -36,7 +36,8 @@ class stage1(StageBase):
def set_cleanables(self):
StageBase.set_cleanables(self)
self.settings["cleanables"].extend([
- "/usr/share/zoneinfo", self.settings["port_conf"] + "/package*"])
+ self.settings["port_conf"] + "/package*",
+ ])
# XXX: How do these override_foo() functions differ from the ones in StageBase and why aren't they in stage3_target?
# XXY: It appears the difference is that these functions are actually doing something and the ones in stagebase don't :-(
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2020-06-05 21:13 Matt Turner
0 siblings, 0 replies; 57+ messages in thread
From: Matt Turner @ 2020-06-05 21:13 UTC (permalink / raw
To: gentoo-commits
commit: bb83032e1c2c299aca7a82ea765adaa1c44d6707
Author: Daniel Cordero <catalyst <AT> 0xdc <DOT> io>
AuthorDate: Thu May 21 17:32:44 2020 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Jun 5 21:02:24 2020 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=bb83032e
embedded: remove dir_setup action
dir_setup() hasn't existed since 2005.
Fixes: 1dafb5fa06d2 (Add locking support. ...)
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
catalyst/targets/embedded.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/catalyst/targets/embedded.py b/catalyst/targets/embedded.py
index aa23f5b3..1b4ad9d6 100644
--- a/catalyst/targets/embedded.py
+++ b/catalyst/targets/embedded.py
@@ -41,7 +41,6 @@ class embedded(StageBase):
def set_action_sequence(self):
self.settings['action_sequence'] = [
- "dir_setup",
"unpack",
"config_profile_link",
"setup_confdir",
@@ -51,7 +50,6 @@ class embedded(StageBase):
"setup_environment",
"build_kernel",
"build_packages",
- "bootloader",
"root_overlay",
"fsscript",
"unmerge",
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2020-06-05 21:13 Matt Turner
0 siblings, 0 replies; 57+ messages in thread
From: Matt Turner @ 2020-06-05 21:13 UTC (permalink / raw
To: gentoo-commits
commit: 71d6e0bfeff39e6ffa9a3619060e731446c5b497
Author: Daniel Cordero <catalyst <AT> 0xdc <DOT> io>
AuthorDate: Thu May 21 17:32:48 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=71d6e0bf
embedded: Allow a root_overlay
This was broken until the previous commit.
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
catalyst/targets/embedded.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/catalyst/targets/embedded.py b/catalyst/targets/embedded.py
index 1b4ad9d6..99739512 100644
--- a/catalyst/targets/embedded.py
+++ b/catalyst/targets/embedded.py
@@ -31,6 +31,7 @@ class embedded(StageBase):
"embedded/mergeroot",
"embedded/packages",
"embedded/rm",
+ "embedded/root_overlay",
"embedded/runscript",
"embedded/unmerge",
"embedded/use",
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:pending/mattst88 commit in: catalyst/targets/
@ 2020-05-20 3:39 Matt Turner
2020-05-17 22:54 ` [gentoo-commits] proj/catalyst:master " Matt Turner
0 siblings, 1 reply; 57+ messages in thread
From: Matt Turner @ 2020-05-20 3:39 UTC (permalink / raw
To: gentoo-commits
commit: ef304389cf83f6ed8cc3ef1584464140cd58656c
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sun May 17 22:53:44 2020 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun May 17 22:53:44 2020 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ef304389
catalyst: Remove stdout=, since it conflicts with capture_output
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
catalyst/targets/snapshot.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/catalyst/targets/snapshot.py b/catalyst/targets/snapshot.py
index b7562f7c..7732312c 100644
--- a/catalyst/targets/snapshot.py
+++ b/catalyst/targets/snapshot.py
@@ -64,7 +64,6 @@ class snapshot(TargetBase):
close_fds=False)
sp = subprocess.run([self.git, '-C', self.gitdir, 'rev-parse', 'stable'],
- stdout=subprocess.PIPE,
capture_output=True,
check=True,
encoding='utf-8',
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
2020-05-20 3:39 [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
@ 2020-05-17 22:54 ` Matt Turner
0 siblings, 0 replies; 57+ messages in thread
From: Matt Turner @ 2020-05-17 22:54 UTC (permalink / raw
To: gentoo-commits
commit: ef304389cf83f6ed8cc3ef1584464140cd58656c
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sun May 17 22:53:44 2020 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun May 17 22:53:44 2020 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ef304389
catalyst: Remove stdout=, since it conflicts with capture_output
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
catalyst/targets/snapshot.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/catalyst/targets/snapshot.py b/catalyst/targets/snapshot.py
index b7562f7c..7732312c 100644
--- a/catalyst/targets/snapshot.py
+++ b/catalyst/targets/snapshot.py
@@ -64,7 +64,6 @@ class snapshot(TargetBase):
close_fds=False)
sp = subprocess.run([self.git, '-C', self.gitdir, 'rev-parse', 'stable'],
- stdout=subprocess.PIPE,
capture_output=True,
check=True,
encoding='utf-8',
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2020-05-16 6:43 Matt Turner
0 siblings, 0 replies; 57+ messages in thread
From: Matt Turner @ 2020-05-16 6:43 UTC (permalink / raw
To: gentoo-commits
commit: dbd7ecd637e8a6931e69fd2b20550a9f3a1de8d0
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri May 15 01:29:48 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=dbd7ecd6
catalyst: Explain the git gc config options
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
catalyst/targets/snapshot.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/catalyst/targets/snapshot.py b/catalyst/targets/snapshot.py
index 497b2918..b7562f7c 100644
--- a/catalyst/targets/snapshot.py
+++ b/catalyst/targets/snapshot.py
@@ -43,6 +43,8 @@ class snapshot(TargetBase):
else:
git_cmds = [
[self.git, 'clone', '--quiet', '--depth=1', '--bare',
+ # Set some config options to enable git gc to clean everything
+ # except what we just fetched. See git-gc(1).
'-c', 'gc.reflogExpire=0',
'-c', 'gc.reflogExpireUnreachable=0',
'-c', 'gc.rerereresolved=0',
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2020-05-16 6:43 Matt Turner
0 siblings, 0 replies; 57+ messages in thread
From: Matt Turner @ 2020-05-16 6:43 UTC (permalink / raw
To: gentoo-commits
commit: bf0244110fea5c612903629194581be42983681d
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri May 15 01:20:59 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=bf024411
catalyst: Add error checking to snapshot target
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
catalyst/targets/snapshot.py | 34 ++++++++++++++++++++++------------
1 file changed, 22 insertions(+), 12 deletions(-)
diff --git a/catalyst/targets/snapshot.py b/catalyst/targets/snapshot.py
index b6c72c51..497b2918 100644
--- a/catalyst/targets/snapshot.py
+++ b/catalyst/targets/snapshot.py
@@ -10,7 +10,7 @@ from pathlib import Path
from catalyst import log
from catalyst.base.targetbase import TargetBase
from catalyst.lock import write_lock
-from catalyst.support import command
+from catalyst.support import CatalystError, command
class snapshot(TargetBase):
"""
@@ -52,17 +52,27 @@ class snapshot(TargetBase):
repouri, self.gitdir],
]
- for cmd in git_cmds:
- log.notice('>>> ' + ' '.join(cmd))
- subprocess.run(cmd,
- encoding='utf-8',
- close_fds=False)
-
- sp = subprocess.run([self.git, '-C', self.gitdir, 'rev-parse', 'stable'],
- stdout=subprocess.PIPE,
- encoding='utf-8',
- close_fds=False)
- return sp.stdout.rstrip()
+ try:
+ for cmd in git_cmds:
+ log.notice('>>> ' + ' '.join(cmd))
+ subprocess.run(cmd,
+ capture_output=True,
+ check=True,
+ encoding='utf-8',
+ close_fds=False)
+
+ sp = subprocess.run([self.git, '-C', self.gitdir, 'rev-parse', 'stable'],
+ stdout=subprocess.PIPE,
+ capture_output=True,
+ check=True,
+ encoding='utf-8',
+ close_fds=False)
+ return sp.stdout.rstrip()
+
+ except subprocess.CalledProcessError as e:
+ raise CatalystError(f'{e.cmd} failed with return code'
+ f'{e.returncode}\n'
+ f'{e.output}\n')
def run(self):
if self.settings['snapshot_treeish'] == 'stable':
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2019-10-11 16:02 Ben Kohler
0 siblings, 0 replies; 57+ messages in thread
From: Ben Kohler @ 2019-10-11 16:02 UTC (permalink / raw
To: gentoo-commits
commit: e21da9dbef8bcf7795223727a1e71c3e83872436
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 4 14:49:54 2019 +0000
Commit: Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Fri Oct 11 16:02:06 2019 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e21da9db
livecd_stage1.py: drop hard-coded app-misc/livecd-tools
This belongs in the spec file if needed.
Closes: https://bugs.gentoo.org/695616
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>
catalyst/targets/livecd_stage1.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/catalyst/targets/livecd_stage1.py b/catalyst/targets/livecd_stage1.py
index c0a664fa..25f54c13 100644
--- a/catalyst/targets/livecd_stage1.py
+++ b/catalyst/targets/livecd_stage1.py
@@ -42,7 +42,6 @@ class livecd_stage1(StageBase):
if isinstance(self.settings[self.settings['spec_prefix']+'/packages'], str):
self.settings[self.settings["spec_prefix"]+"/packages"] = \
self.settings[self.settings["spec_prefix"]+"/packages"].split()
- self.settings[self.settings["spec_prefix"]+"/packages"].append("app-misc/livecd-tools")
def set_pkgcache_path(self):
if "pkgcache_path" in self.settings:
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2019-07-01 15:35 Rick Farina
0 siblings, 0 replies; 57+ messages in thread
From: Rick Farina @ 2019-07-01 15:35 UTC (permalink / raw
To: gentoo-commits
commit: 7ea3f5a819318988c73989cbbde253e7b5c69e34
Author: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 1 15:34:05 2019 +0000
Commit: Rick Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Mon Jul 1 15:34:05 2019 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=7ea3f5a8
maybe fix overrides for flags
it seems cflags and cxxflags overrides work for me while common_flags,
fcflags, and fflags overrides do not. This was the only difference I
could find. I left breadcrumbs on my thought process.
catalyst/targets/stage1.py | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/catalyst/targets/stage1.py b/catalyst/targets/stage1.py
index cc4366b6..59d6d49b 100644
--- a/catalyst/targets/stage1.py
+++ b/catalyst/targets/stage1.py
@@ -38,11 +38,17 @@ class stage1(StageBase):
"/usr/share/zoneinfo", self.settings["port_conf"] + "/package*"])
# XXX: How do these override_foo() functions differ from the ones in StageBase and why aren't they in stage3_target?
+ # XXY: It appears the difference is that these functions are actually doing something and the ones in stagebase don't :-(
+ # XXZ: I have a wierd suspicion that it's the difference in capitolization
def override_chost(self):
if "chost" in self.settings:
self.settings["CHOST"] = self.settings["chost"]
+ def override_common_flags(self):
+ if "common_flags" in self.settings:
+ self.settings["COMMON_FLAGS"] = self.settings["common_flags"]
+
def override_cflags(self):
if "cflags" in self.settings:
self.settings["CFLAGS"] = self.settings["cflags"]
@@ -51,6 +57,14 @@ class stage1(StageBase):
if "cxxflags" in self.settings:
self.settings["CXXFLAGS"] = self.settings["cxxflags"]
+ def override_fcflags(self):
+ if "fcflags" in self.settings:
+ self.settings["FCFLAGS"] = self.settings["fcflags"]
+
+ def override_fflags(self):
+ if "fflags" in self.settings:
+ self.settings["FFLAGS"] = self.settings["fflags"]
+
def override_ldflags(self):
if "ldflags" in self.settings:
self.settings["LDFLAGS"] = self.settings["ldflags"]
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2018-10-01 16:30 Brian Dolbec
0 siblings, 0 replies; 57+ messages in thread
From: Brian Dolbec @ 2018-10-01 16:30 UTC (permalink / raw
To: gentoo-commits
commit: 59b60e53020395d1eb4c9542ffb63561bbb87513
Author: Michael Everitt <m.j.everitt <AT> iee <DOT> org>
AuthorDate: Mon May 14 14:16:41 2018 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Mon Oct 1 16:18:11 2018 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=59b60e53
Add .git folder to snapshot rsync excludes
catalyst/targets/snapshot.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/catalyst/targets/snapshot.py b/catalyst/targets/snapshot.py
index 726bc512..607e718e 100644
--- a/catalyst/targets/snapshot.py
+++ b/catalyst/targets/snapshot.py
@@ -59,6 +59,7 @@ class snapshot(TargetBase, GenBase):
'--exclude=/local/',
'--exclude=CVS/',
'--exclude=.svn',
+ '--exclude=.git/',
'--filter=H_**/files/digest-*',
self.settings['portdir'] + '/',
mytmp + '/' + self.settings['repo_name'] + '/'],
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2018-07-21 18:54 Brian Dolbec
0 siblings, 0 replies; 57+ messages in thread
From: Brian Dolbec @ 2018-07-21 18:54 UTC (permalink / raw
To: gentoo-commits
commit: e58db09799e4ca90e38ab962bbbc0d2bb84d8e16
Author: Brian Dolbec dolsen <dolsen <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 20 16:34:08 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=e58db097
targets/tinderbox.py: Remove /root/* from cleanables
ccache dir has been relocated to /var/tmp/ so this is no longer needed.
Signed-off-by: Brian Dolbec dolsen <dolsen <AT> gentoo.org>
catalyst/targets/tinderbox.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/catalyst/targets/tinderbox.py b/catalyst/targets/tinderbox.py
index 85a939f4..6908793a 100644
--- a/catalyst/targets/tinderbox.py
+++ b/catalyst/targets/tinderbox.py
@@ -36,7 +36,6 @@ class tinderbox(StageBase):
self.settings['cleanables'] = [
'/etc/resolv.conf',
'/var/tmp/*',
- '/root/*',
self.settings['portdir'],
]
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2018-04-05 18:21 Richard Farina
0 siblings, 0 replies; 57+ messages in thread
From: Richard Farina @ 2018-04-05 18:21 UTC (permalink / raw
To: gentoo-commits
commit: 55867fcbc8c2b7504b532346d2862ff3d19a7d8c
Author: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 5 18:20:58 2018 +0000
Commit: Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Thu Apr 5 18:20:58 2018 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=55867fcb
need to install a python syntastic plugin
catalyst/targets/livecd_stage2.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py
index b7ab0fb8..18810667 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -18,7 +18,7 @@ class livecd_stage2(StageBase):
self.valid_values=[]
self.valid_values.extend(self.required_values)
- self.valid_values.extend(["livecd/cdtar","livecd/empty","livecd/rm","livecd/depclean"\
+ self.valid_values.extend(["livecd/cdtar","livecd/empty","livecd/rm","livecd/depclean",\
"livecd/unmerge","livecd/iso","livecd/gk_mainargs","livecd/type",\
"livecd/readme","livecd/motd","livecd/overlay",\
"livecd/modblacklist","livecd/splash_theme","livecd/rcadd",\
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2018-01-04 19:09 Brian Dolbec
0 siblings, 0 replies; 57+ messages in thread
From: Brian Dolbec @ 2018-01-04 19:09 UTC (permalink / raw
To: gentoo-commits
commit: b55d6967fcbf9b2d10c324d4eb523f28f0829909
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 4 15:14:11 2018 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Jan 4 19:08:48 2018 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=b55d6967
targets/livecd_stage2.py: Add "clean" action
Add clean to clear out the tree used to build with.
Seems "empty" used to be hard coded to clean it out.
catalyst/targets/livecd_stage2.py | 36 ++++++++++++++++++++++++++++--------
1 file changed, 28 insertions(+), 8 deletions(-)
diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py
index a3b5e5e6..63f77ac3 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -68,13 +68,33 @@ class livecd_stage2(StageBase):
print_traceback=True)
def set_action_sequence(self):
- self.settings["action_sequence"]=["unpack","unpack_snapshot",\
- "config_profile_link","setup_confdir","portage_overlay",\
- "bind","chroot_setup","setup_environment","run_local",\
- "build_kernel"]
+ self.settings["action_sequence"]=[
+ "unpack",
+ "unpack_snapshot",
+ "config_profile_link",
+ "setup_confdir",
+ "portage_overlay",
+ "bind",
+ "chroot_setup",
+ "setup_environment",
+ "run_local",
+ "build_kernel"
+ ]
if "fetch" not in self.settings["options"]:
- self.settings["action_sequence"] += ["bootloader","preclean",\
- "livecd_update","root_overlay","fsscript","rcupdate","unmerge",\
- "unbind","remove","empty","target_setup",\
- "setup_overlay","create_iso"]
+ self.settings["action_sequence"] += [
+ "bootloader",
+ "preclean",
+ "livecd_update",
+ "root_overlay",
+ "fsscript",
+ "rcupdate",
+ "unmerge",
+ "unbind",
+ "remove",
+ "empty",
+ "clean",
+ "target_setup",
+ "setup_overlay",
+ "create_iso"
+ ]
self.settings["action_sequence"].append("clear_autoresume")
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2017-12-18 16:57 Richard Farina
0 siblings, 0 replies; 57+ messages in thread
From: Richard Farina @ 2017-12-18 16:57 UTC (permalink / raw
To: gentoo-commits
commit: 4682b7c6c12fdaa918d39e9f29e1f1f2152408f7
Author: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 18 16:57:09 2017 +0000
Commit: Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Mon Dec 18 16:57:09 2017 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4682b7c6
make snapshot respect options=keepwork
catalyst/targets/snapshot.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/catalyst/targets/snapshot.py b/catalyst/targets/snapshot.py
index 087834eb..726bc512 100644
--- a/catalyst/targets/snapshot.py
+++ b/catalyst/targets/snapshot.py
@@ -85,8 +85,8 @@ class snapshot(TargetBase, GenBase):
log.notice('Snapshot successfully written to %s', filename)
self.gen_contents_file(filename)
self.gen_digest_file(filename)
-
- self.cleanup()
+ if "keepwork" not in self.settings["options"]:
+ self.cleanup()
if success:
log.info('snapshot: complete!')
return success
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2017-11-29 17:20 Brian Dolbec
0 siblings, 0 replies; 57+ messages in thread
From: Brian Dolbec @ 2017-11-29 17:20 UTC (permalink / raw
To: gentoo-commits
commit: 61527e6db7c2ac195741a243f3ab504f2652e26e
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 9 09:17:07 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=61527e6d
targets/snapshot.py: Update the code and log messages to use the configured repo_name
One more portage name seperation from being used to represent the ebuild repository.
catalyst/targets/snapshot.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/catalyst/targets/snapshot.py b/catalyst/targets/snapshot.py
index 8a9acdd9..087834eb 100644
--- a/catalyst/targets/snapshot.py
+++ b/catalyst/targets/snapshot.py
@@ -22,7 +22,7 @@ class snapshot(TargetBase, GenBase):
TargetBase.__init__(self, myspec, addlargs)
GenBase.__init__(self,myspec)
#self.settings=myspec
- self.settings["target_subpath"]="portage"
+ self.settings["target_subpath"]="repos"
st=self.settings["storedir"]
self.settings["snapshot_path"] = normpath(st + "/snapshots/"
+ self.settings["snapshot_name"]
@@ -46,8 +46,9 @@ class snapshot(TargetBase, GenBase):
success = True
self.setup()
- log.notice('Creating Portage tree snapshot %s from %s ...',
- self.settings['version_stamp'], self.settings['portdir'])
+ log.notice('Creating %s tree snapshot %s from %s ...',
+ self.settings["repo_name"], self.settings['version_stamp'],
+ self.settings['portdir'])
mytmp=self.settings["tmp_path"]
ensure_dirs(mytmp)
@@ -63,7 +64,7 @@ class snapshot(TargetBase, GenBase):
mytmp + '/' + self.settings['repo_name'] + '/'],
env=self.env)
- log.notice('Compressing Portage snapshot tarball ...')
+ log.notice('Compressing %s snapshot tarball ...', self.settings["repo_name"])
compressor = CompressMap(self.settings["compress_definitions"],
env=self.env, default_mode=self.settings['compression_mode'],
comp_prog=self.settings["comp_prog"])
@@ -93,9 +94,9 @@ class snapshot(TargetBase, GenBase):
def kill_chroot_pids(self):
pass
- @staticmethod
- def cleanup():
+ def cleanup(self):
log.info('Cleaning up ...')
+ self.purge()
def purge(self):
clear_dir(self.settings['tmp_path'])
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2016-03-21 5:09 Mike Frysinger
0 siblings, 0 replies; 57+ messages in thread
From: Mike Frysinger @ 2016-03-21 5:09 UTC (permalink / raw
To: gentoo-commits
commit: 20f32bcc1c5cd33f3e90d363bbb59f4b65a85922
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 21 05:07:28 2016 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Mar 21 05:07:28 2016 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=20f32bcc
targets: drop unused imports after recent cleanups
catalyst/targets/grp.py | 1 -
catalyst/targets/livecd_stage1.py | 6 +-----
catalyst/targets/livecd_stage2.py | 1 -
3 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/catalyst/targets/grp.py b/catalyst/targets/grp.py
index 2707907..c1bd2dd 100644
--- a/catalyst/targets/grp.py
+++ b/catalyst/targets/grp.py
@@ -8,7 +8,6 @@ import glob
from catalyst import log
from catalyst.support import (CatalystError, normpath, cmd, list_bashify)
-from catalyst.fileops import ensure_dirs
from catalyst.base.stagebase import StageBase
diff --git a/catalyst/targets/livecd_stage1.py b/catalyst/targets/livecd_stage1.py
index 60ef388..eea4312 100644
--- a/catalyst/targets/livecd_stage1.py
+++ b/catalyst/targets/livecd_stage1.py
@@ -3,11 +3,7 @@ LiveCD stage1 target
"""
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation.
-import os
-
-from catalyst import log
-from catalyst.support import (normpath, cmd)
-from catalyst.fileops import ensure_dirs
+from catalyst.support import normpath
from catalyst.base.stagebase import StageBase
diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py
index df0073c..ea916b8 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -5,7 +5,6 @@ LiveCD stage2 target, builds upon previous LiveCD stage1 tarball
import os
-from catalyst import log
from catalyst.support import (normpath, file_locate, CatalystError, cmd)
from catalyst.fileops import ensure_dirs
from catalyst.base.stagebase import StageBase
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2015-12-23 4:30 Brian Dolbec
0 siblings, 0 replies; 57+ messages in thread
From: Brian Dolbec @ 2015-12-23 4:30 UTC (permalink / raw
To: gentoo-commits
commit: 8811c5d189038f092c5d11d5052a6cfadda8b903
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 23 04:26:01 2015 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Wed Dec 23 04:26:01 2015 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=8811c5d1
targets/livecd_stage2.py: Re-add a set_target_path method
The target path directory is needed to assemble the components which are needed from
the build chroot. It is from that location that the final iso is created.
catalyst/targets/livecd_stage2.py | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py
index c42cd4c..df0073c 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -39,6 +39,20 @@ class livecd_stage2(StageBase):
def set_spec_prefix(self):
self.settings["spec_prefix"]="livecd"
+ def set_target_path(self):
+ '''Set the target path for the finished stage.
+
+ This method runs the StageBase.set_target_path mehtod,
+ and additionally creates a staging directory for assembling
+ the final components needed to produce the iso image.
+ '''
+ super(livecd_stage2, self).set_target_path()
+ if os.path.isdir(self.settings["target_path"]):
+ cmd("rm -rf " + self.settings["target_path"],
+ "Could not remove existing directory: " +
+ self.settings["target_path"], env=self.env)
+ ensure_dirs(self.settings["target_path"])
+
def run_local(self):
# what modules do we want to blacklist?
if "livecd/modblacklist" in self.settings:
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2015-12-15 17:13 Brian Dolbec
0 siblings, 0 replies; 57+ messages in thread
From: Brian Dolbec @ 2015-12-15 17:13 UTC (permalink / raw
To: gentoo-commits
commit: e6da0cc1d918daf5a435d124ea7b556b2a52df6f
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 15 16:49:29 2015 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue Dec 15 17:08:38 2015 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=e6da0cc1
targets/livecd_stage2.py: Remove the duplicated set_target_path()
catalyst/targets/livecd_stage2.py | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py
index ed5aafa..c42cd4c 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -39,19 +39,6 @@ class livecd_stage2(StageBase):
def set_spec_prefix(self):
self.settings["spec_prefix"]="livecd"
- def set_target_path(self):
- 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...')
- else:
- # first clean up any existing target stuff
- if os.path.isdir(self.settings["target_path"]):
- cmd("rm -rf "+self.settings["target_path"],
- "Could not remove existing directory: "+self.settings["target_path"],env=self.env)
- self.resume.enable("setup_target_path")
- ensure_dirs(self.settings["target_path"])
-
def run_local(self):
# what modules do we want to blacklist?
if "livecd/modblacklist" in self.settings:
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2015-12-15 17:13 Brian Dolbec
0 siblings, 0 replies; 57+ messages in thread
From: Brian Dolbec @ 2015-12-15 17:13 UTC (permalink / raw
To: gentoo-commits
commit: 00c77c332fe93ca295ca1ac7a20f7b317d4936a7
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 4 16:39:26 2015 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Fri Dec 4 16:39:56 2015 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=00c77c33
targets/livecd-stage2.py: Remove the set_source_path()
This is not needed and overrides the stagebase method which handles the auto-extension.
catalyst/targets/livecd_stage2.py | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py
index 7d9919b..ed5aafa 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -36,19 +36,6 @@ class livecd_stage2(StageBase):
file_locate(self.settings, ["cdtar","controller_file"])
- def set_source_path(self):
- self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"])
- if os.path.isfile(self.settings["source_path"]):
- self.settings["source_path_hash"] = \
- self.settings["hash_map"].generate_hash(
- self.settings["source_path"])
- else:
- self.settings["source_path"]=normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"])
- if not os.path.exists(self.settings["source_path"]):
- raise CatalystError("Source Path: " +
- self.settings["source_path"] + " does not exist.",
- print_traceback=True)
-
def set_spec_prefix(self):
self.settings["spec_prefix"]="livecd"
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2015-12-15 17:13 Brian Dolbec
0 siblings, 0 replies; 57+ messages in thread
From: Brian Dolbec @ 2015-12-15 17:13 UTC (permalink / raw
To: gentoo-commits
commit: a0bcc3bda4f7528f91d610de712b29e83eaf3ec0
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 15 16:51:43 2015 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue Dec 15 17:08:38 2015 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=a0bcc3bd
targets/livecd_stage1.py: Remove the duplicated set_target_path()
catalyst/targets/livecd_stage1.py | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/catalyst/targets/livecd_stage1.py b/catalyst/targets/livecd_stage1.py
index 70f9243..aa234b2 100644
--- a/catalyst/targets/livecd_stage1.py
+++ b/catalyst/targets/livecd_stage1.py
@@ -29,19 +29,6 @@ class livecd_stage1(StageBase):
"bind","chroot_setup","setup_environment","build_packages",\
"unbind", "clean","clear_autoresume"]
- def set_target_path(self):
- 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...')
- else:
- # first clean up any existing target stuff
- if os.path.exists(self.settings["target_path"]):
- cmd("rm -rf "+self.settings["target_path"],\
- "Could not remove existing directory: "+self.settings["target_path"],env=self.env)
- self.resume.enable("setup_target_path")
- ensure_dirs(self.settings["target_path"])
-
def set_spec_prefix(self):
self.settings["spec_prefix"]="livecd"
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2015-12-15 17:13 Brian Dolbec
0 siblings, 0 replies; 57+ messages in thread
From: Brian Dolbec @ 2015-12-15 17:13 UTC (permalink / raw
To: gentoo-commits
commit: 3090f4c0bf674b61a9e341855a9d41e946ec5a7f
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 15 16:45:29 2015 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue Dec 15 17:08:30 2015 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=3090f4c0
targets/grp.py: Remove the duped set_target_path()
catalyst/targets/grp.py | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/catalyst/targets/grp.py b/catalyst/targets/grp.py
index 0b38417..2707907 100644
--- a/catalyst/targets/grp.py
+++ b/catalyst/targets/grp.py
@@ -39,20 +39,6 @@ class grp(StageBase):
StageBase.__init__(self,spec,addlargs)
- def set_target_path(self):
- 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...')
- else:
- # first clean up any existing target stuff
- #if os.path.isdir(self.settings["target_path"]):
- #cmd("rm -rf "+self.settings["target_path"],
- #"Could not remove existing directory: "+self.settings["target_path"],env=self.env)
- ensure_dirs(self.settings["target_path"])
-
- self.resume.enable("setup_target_path")
-
def run_local(self):
for pkgset in self.settings["grp"]:
# example call: "grp.sh run pkgset cd1 xmms vim sys-apps/gleep"
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2015-12-15 17:13 Brian Dolbec
0 siblings, 0 replies; 57+ messages in thread
From: Brian Dolbec @ 2015-12-15 17:13 UTC (permalink / raw
To: gentoo-commits
commit: 00d5be7000d1591b0377e98d64e32cdea898c9e1
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 15 17:02:01 2015 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue Dec 15 17:08:38 2015 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=00d5be70
targets/stage4.py: Cleanup line continuations and spacing
catalyst/targets/stage4.py | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/catalyst/targets/stage4.py b/catalyst/targets/stage4.py
index fdc8465..71c1f30 100644
--- a/catalyst/targets/stage4.py
+++ b/catalyst/targets/stage4.py
@@ -13,21 +13,21 @@ class stage4(StageBase):
def __init__(self,spec,addlargs):
self.required_values=["stage4/packages"]
self.valid_values=self.required_values[:]
- self.valid_values.extend(["stage4/use","boot/kernel",\
- "stage4/root_overlay","stage4/fsscript",\
- "stage4/gk_mainargs","splash_theme",\
- "portage_overlay","stage4/rcadd","stage4/rcdel",\
- "stage4/linuxrc","stage4/unmerge","stage4/rm","stage4/empty"])
+ self.valid_values.extend(["stage4/use", "boot/kernel",
+ "stage4/root_overlay", "stage4/fsscript",
+ "stage4/gk_mainargs", "splash_theme",
+ "portage_overlay", "stage4/rcadd", "stage4/rcdel",
+ "stage4/linuxrc", "stage4/unmerge", "stage4/rm", "stage4/empty"])
StageBase.__init__(self,spec,addlargs)
def set_cleanables(self):
self.settings["cleanables"]=["/var/tmp/*","/tmp/*"]
def set_action_sequence(self):
- self.settings["action_sequence"]=["unpack","unpack_snapshot",\
- "config_profile_link","setup_confdir","portage_overlay",\
- "bind","chroot_setup","setup_environment","build_packages",\
- "build_kernel","bootloader","root_overlay","fsscript",\
- "preclean","rcupdate","unmerge","unbind","remove","empty",\
+ self.settings["action_sequence"] = ["unpack", "unpack_snapshot",
+ "config_profile_link", "setup_confdir", "portage_overlay",
+ "bind", "chroot_setup", "setup_environment", "build_packages",
+ "build_kernel", "bootloader", "root_overlay", "fsscript",
+ "preclean", "rcupdate", "unmerge", "unbind", "remove", "empty",
"clean"]
self.set_completion_action_sequences()
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2015-11-12 16:24 Brian Dolbec
0 siblings, 0 replies; 57+ messages in thread
From: Brian Dolbec @ 2015-11-12 16:24 UTC (permalink / raw
To: gentoo-commits
commit: a38ad7ad605a788fa1e84a4cfb2a6ee289b03670
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 12 16:16:07 2015 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Nov 12 16:16:07 2015 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=a38ad7ad
targets/livecd_stage2.py: Fix regression in path setting
Since:
Commit: 5cce2772eda7d0885c9d7cfea184a3f5606dddef
Subject: catalyst: Convert nearly all use of open() to use the with statement.
I incorrectly changed a "+" to a comma in the code move.
catalyst/targets/livecd_stage2.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py
index 943466e..7d9919b 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -68,7 +68,7 @@ class livecd_stage2(StageBase):
def run_local(self):
# what modules do we want to blacklist?
if "livecd/modblacklist" in self.settings:
- path = normpath(self.settings["chroot_path"],
+ path = normpath(self.settings["chroot_path"] +
"/etc/modprobe.d/blacklist.conf")
try:
with open(path, "a") as myf:
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2015-10-11 17:26 Mike Frysinger
0 siblings, 0 replies; 57+ messages in thread
From: Mike Frysinger @ 2015-10-11 17:26 UTC (permalink / raw
To: gentoo-commits
commit: 7135c0e1bc266fe1c913a67f547cd1fcae558bbf
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 10 05:50:39 2015 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Oct 11 05:56:21 2015 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=7135c0e1
embedded/grp: convert to log module
catalyst/targets/embedded.py | 7 +++----
catalyst/targets/grp.py | 8 ++++----
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/catalyst/targets/embedded.py b/catalyst/targets/embedded.py
index 6044e17..e441757 100644
--- a/catalyst/targets/embedded.py
+++ b/catalyst/targets/embedded.py
@@ -10,9 +10,8 @@ ROOT=/tmp/submerge emerge --something foo bar .
"""
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation.
-
+from catalyst import log
from catalyst.support import normpath
-
from catalyst.base.stagebase import StageBase
class embedded(StageBase):
@@ -39,8 +38,8 @@ class embedded(StageBase):
def set_stage_path(self):
self.settings["stage_path"]=normpath(self.settings["chroot_path"]+"/tmp/mergeroot")
- print "embedded stage path is "+self.settings["stage_path"]
+ log.info('embedded stage path is %s', self.settings['stage_path'])
def set_root_path(self):
self.settings["root_path"]=normpath("/tmp/mergeroot")
- print "embedded root path is "+self.settings["root_path"]
+ log.info('embedded root path is %s', self.settings['root_path'])
diff --git a/catalyst/targets/grp.py b/catalyst/targets/grp.py
index 4814ac6..b37366c 100644
--- a/catalyst/targets/grp.py
+++ b/catalyst/targets/grp.py
@@ -7,7 +7,7 @@ import os
import types
import glob
-
+from catalyst import log
from catalyst.support import (CatalystError, normpath, cmd, list_bashify)
from catalyst.fileops import ensure_dirs
from catalyst.base.stagebase import StageBase
@@ -44,7 +44,7 @@ class grp(StageBase):
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"):
- print "Resume point detected, skipping target path setup operation..."
+ log.notice('Resume point detected, skipping target path setup operation...')
else:
# first clean up any existing target stuff
#if os.path.isdir(self.settings["target_path"]):
@@ -82,7 +82,7 @@ class grp(StageBase):
for pkgset in self.settings["grp"]:
if self.settings["grp/"+pkgset+"/type"] == "pkgset":
destdir=normpath(self.settings["target_path"]+"/"+pkgset+"/All")
- print "Digesting files in the pkgset....."
+ log.notice('Digesting files in the pkgset...')
digests=glob.glob(destdir+'/*.DIGESTS')
for i in digests:
if os.path.exists(i):
@@ -97,7 +97,7 @@ class grp(StageBase):
self.gen_digest_file(normpath(destdir+"/"+i))
else:
destdir=normpath(self.settings["target_path"]+"/"+pkgset)
- print "Digesting files in the srcset....."
+ log.notice('Digesting files in the srcset...')
digests=glob.glob(destdir+'/*.DIGESTS')
for i in digests:
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2015-10-11 17:26 Mike Frysinger
0 siblings, 0 replies; 57+ messages in thread
From: Mike Frysinger @ 2015-10-11 17:26 UTC (permalink / raw
To: gentoo-commits
commit: 9cbedb5c8c8e2158e5e21e3038a0651cd4fe66e9
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 10 05:28:45 2015 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Oct 11 05:56:09 2015 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=9cbedb5c
livecd_stage: convert to log module
catalyst/targets/livecd_stage1.py | 4 ++--
catalyst/targets/livecd_stage2.py | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/catalyst/targets/livecd_stage1.py b/catalyst/targets/livecd_stage1.py
index 262db70..8d9dcc7 100644
--- a/catalyst/targets/livecd_stage1.py
+++ b/catalyst/targets/livecd_stage1.py
@@ -6,7 +6,7 @@ LiveCD stage1 target
import os
import types
-
+from catalyst import log
from catalyst.support import (normpath, cmd)
from catalyst.fileops import ensure_dirs
@@ -34,7 +34,7 @@ class livecd_stage1(StageBase):
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"):
- print "Resume point detected, skipping target path setup operation..."
+ log.notice('Resume point detected, skipping target path setup operation...')
else:
# first clean up any existing target stuff
if os.path.exists(self.settings["target_path"]):
diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py
index b54f2f0..fa76421 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -5,6 +5,7 @@ LiveCD stage2 target, builds upon previous LiveCD stage1 tarball
import os
+from catalyst import log
from catalyst.support import (normpath, file_locate, CatalystError, cmd)
from catalyst.fileops import ensure_dirs
from catalyst.base.stagebase import StageBase
@@ -55,7 +56,7 @@ class livecd_stage2(StageBase):
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"):
- print "Resume point detected, skipping target path setup operation..."
+ log.notice('Resume point detected, skipping target path setup operation...')
else:
# first clean up any existing target stuff
if os.path.isdir(self.settings["target_path"]):
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2015-10-11 17:26 Mike Frysinger
0 siblings, 0 replies; 57+ messages in thread
From: Mike Frysinger @ 2015-10-11 17:26 UTC (permalink / raw
To: gentoo-commits
commit: 05ff22304f888a04af694279ddecf395dce38e89
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 10 05:31:21 2015 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Oct 11 05:56:16 2015 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=05ff2230
netboot: convert to log module
catalyst/targets/netboot.py | 6 +++---
catalyst/targets/netboot2.py | 19 ++++++++++---------
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/catalyst/targets/netboot.py b/catalyst/targets/netboot.py
index 46ec4eb..333a230 100644
--- a/catalyst/targets/netboot.py
+++ b/catalyst/targets/netboot.py
@@ -6,7 +6,7 @@ netboot target, version 1
import os
import types
-
+from catalyst import log
from catalyst.support import (CatalystError, normpath,
cmd, list_bashify, file_locate)
@@ -58,7 +58,7 @@ class netboot(StageBase):
def set_root_path(self):
# ROOT= variable for emerges
self.settings["root_path"]=normpath("/tmp/image")
- print "netboot root path is "+self.settings["root_path"]
+ log.info('netboot root path is %s', self.settings['root_path'])
# def build_packages(self):
# # build packages
@@ -123,7 +123,7 @@ class netboot(StageBase):
raise CatalystError("netboot build aborting due to error.",
print_traceback=True)
# end
- print "netboot: build finished !"
+ log.notice('netboot: build finished !')
def set_action_sequence(self):
self.settings["action_sequence"]=["unpack","unpack_snapshot",
diff --git a/catalyst/targets/netboot2.py b/catalyst/targets/netboot2.py
index 5508367..d882a06 100644
--- a/catalyst/targets/netboot2.py
+++ b/catalyst/targets/netboot2.py
@@ -8,6 +8,7 @@ import types
import shutil
from stat import ST_UID, ST_GID, ST_MODE
+from catalyst import log
from catalyst.support import (CatalystError, normpath, cmd, list_bashify)
from catalyst.fileops import ensure_dirs
@@ -53,7 +54,7 @@ class netboot2(StageBase):
self.settings["target_subpath"])
if "autoresume" in self.settings["options"] \
and self.resume.is_enabled("setup_target_path"):
- print "Resume point detected, skipping target path setup operation..."
+ log.notice('Resume point detected, skipping target path setup operation...')
else:
# first clean up any existing target stuff
if os.path.isfile(self.settings["target_path"]):
@@ -69,7 +70,7 @@ class netboot2(StageBase):
# check for autoresume point
if "autoresume" in self.settings["options"] \
and self.resume.is_enabled("copy_files_to_image"):
- print "Resume point detected, skipping target path setup operation..."
+ log.notice('Resume point detected, skipping target path setup operation...')
else:
if "netboot2/packages" in self.settings:
if type(self.settings["netboot2/packages"]) == types.StringType:
@@ -103,7 +104,7 @@ class netboot2(StageBase):
def setup_overlay(self):
if "autoresume" in self.settings["options"] \
and self.resume.is_enabled("setup_overlay"):
- print "Resume point detected, skipping setup_overlay operation..."
+ log.notice('Resume point detected, skipping setup_overlay operation...')
else:
if "netboot2/overlay" in self.settings:
for x in self.settings["netboot2/overlay"]:
@@ -119,7 +120,7 @@ class netboot2(StageBase):
try:
cmd(self.settings["controller_file"]+\
" final",env=self.env)
- print ">>> Netboot Build Finished!"
+ log.notice('Netboot Build Finished!')
except CatalystError:
self.unbind()
raise CatalystError("Failed to move kernel images!",
@@ -128,20 +129,20 @@ class netboot2(StageBase):
def remove(self):
if "autoresume" in self.settings["options"] \
and self.resume.is_enabled("remove"):
- print "Resume point detected, skipping remove operation..."
+ 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"]:
# we're going to shell out for all these cleaning operations,
# so we get easy glob handling
- print "netboot2: removing " + x
+ log.notice('netboot2: removing %s', x)
os.system("rm -rf " + self.settings["chroot_path"] +
self.settings["merge_path"] + x)
def empty(self):
if "autoresume" in self.settings["options"] \
and self.resume.is_enabled("empty"):
- print "Resume point detected, skipping empty operation..."
+ log.notice('Resume point detected, skipping empty operation...')
else:
if "netboot2/empty" in self.settings:
if type(self.settings["netboot2/empty"])==types.StringType:
@@ -149,9 +150,9 @@ class netboot2(StageBase):
for x in self.settings["netboot2/empty"]:
myemp=self.settings["chroot_path"] + self.settings["merge_path"] + x
if not os.path.isdir(myemp):
- print x,"not a directory or does not exist, skipping 'empty' operation."
+ log.warning('not a directory or does not exist, skipping "empty" operation: %s', x)
continue
- print "Emptying directory", x
+ log.info('Emptying directory %s', x)
# stat the dir, delete the dir, recreate the dir and set
# the proper perms and ownership
mystat=os.stat(myemp)
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2015-10-11 17:26 Mike Frysinger
0 siblings, 0 replies; 57+ messages in thread
From: Mike Frysinger @ 2015-10-11 17:26 UTC (permalink / raw
To: gentoo-commits
commit: fddd40039ce4d608dfc793a1ef8a60ca40413dc4
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 10 05:11:44 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=fddd4003
stage2: convert to log module
catalyst/targets/stage2.py | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/catalyst/targets/stage2.py b/catalyst/targets/stage2.py
index 786aaa4..ff060d2 100644
--- a/catalyst/targets/stage2.py
+++ b/catalyst/targets/stage2.py
@@ -5,6 +5,7 @@ stage2 target, builds upon previous stage1 tarball
import os
+from catalyst import log
from catalyst.support import normpath
from catalyst.base.stagebase import StageBase
@@ -30,10 +31,12 @@ class stage2(StageBase):
self.settings["hash_map"].generate_hash(
self.settings["source_path"],\
hash_=self.settings["hash_function"])
- print "Source path set to "+self.settings["source_path"]
+ log.notice('Source path set to %s', self.settings['source_path'])
if os.path.isdir(self.settings["source_path"]):
- print "\tIf this is not desired, remove this directory or turn off seedcache in the options of catalyst.conf"
- print "\tthe source path will then be "+normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"] + "\n")
+ log.warning(
+ 'If this is not desired, remove this directory or turn off seedcache in the\n'
+ 'options of catalyst.conf. The source path will then be:\n%s',
+ normpath(self.settings['storedir'] + '/builds/' + self.settings['source_subpath']))
# XXX: How do these override_foo() functions differ from the ones in
# StageBase and why aren't they in stage3_target?
@@ -57,7 +60,7 @@ class stage2(StageBase):
def set_portage_overlay(self):
StageBase.set_portage_overlay(self)
if "portage_overlay" in self.settings:
- print "\nWARNING !!!!!"
- print "\tUsing an portage overlay for earlier stages could cause build issues."
- print "\tIf you break it, you buy it. Don't complain to us about it."
- print "\tDont say we did not warn you\n"
+ log.warning(
+ 'Using an overlay for earlier stages could cause build issues.\n'
+ "If you break it, you buy it. Don't complain to us about it.\n"
+ "Don't say we did not warn you.")
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2015-10-11 17:26 Mike Frysinger
0 siblings, 0 replies; 57+ messages in thread
From: Mike Frysinger @ 2015-10-11 17:26 UTC (permalink / raw
To: gentoo-commits
commit: e60ef20eb3ef4d64a9d7b24f4b1d2d36c026ff7c
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 10 05:11:40 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=e60ef20e
stage1: convert to log module
catalyst/targets/stage1.py | 38 ++++++++++++++++----------------------
1 file changed, 16 insertions(+), 22 deletions(-)
diff --git a/catalyst/targets/stage1.py b/catalyst/targets/stage1.py
index b5dfac7..18ef520 100644
--- a/catalyst/targets/stage1.py
+++ b/catalyst/targets/stage1.py
@@ -5,6 +5,9 @@ stage1 target
import os
+from snakeoil import fileutils
+
+from catalyst import log
from catalyst.support import normpath
from catalyst.fileops import ensure_dirs
from catalyst.base.stagebase import StageBase
@@ -22,12 +25,12 @@ class stage1(StageBase):
def set_stage_path(self):
self.settings["stage_path"]=normpath(self.settings["chroot_path"]+self.settings["root_path"])
- print "stage1 stage path is "+self.settings["stage_path"]
+ log.notice('stage1 stage path is %s', self.settings['stage_path'])
def set_root_path(self):
# sets the root path, relative to 'chroot_path', of the stage1 root
self.settings["root_path"]=normpath("/tmp/stage1root")
- print "stage1 root path is "+self.settings["root_path"]
+ log.info('stage1 root path is %s', self.settings['root_path'])
def set_cleanables(self):
StageBase.set_cleanables(self)
@@ -55,10 +58,10 @@ class stage1(StageBase):
def set_portage_overlay(self):
StageBase.set_portage_overlay(self)
if "portage_overlay" in self.settings:
- print "\nWARNING !!!!!"
- print "\tUsing an portage overlay for earlier stages could cause build issues."
- print "\tIf you break it, you buy it. Don't complain to us about it."
- print "\tDont say we did not warn you\n"
+ log.warning(
+ 'Using an overlay for earlier stages could cause build issues.\n'
+ "If you break it, you buy it. Don't complain to us about it.\n"
+ "Don't say we did not warn you.")
def base_dirs(self):
if os.uname()[0] == "FreeBSD":
@@ -67,22 +70,13 @@ class stage1(StageBase):
# since proc and dev are not writeable, so...create them here
ensure_dirs(self.settings["stage_path"]+"/proc")
ensure_dirs(self.settings["stage_path"]+"/dev")
- if not os.path.isfile(self.settings["stage_path"]+"/proc/.keep"):
- try:
- proc_keepfile = open(self.settings["stage_path"]+"/proc/.keep","w")
- proc_keepfile.write('')
- proc_keepfile.close()
- except IOError:
- print "!!! Failed to create %s" % (self.settings["stage_path"]+"/dev/.keep")
- if not os.path.isfile(self.settings["stage_path"]+"/dev/.keep"):
- try:
- dev_keepfile = open(self.settings["stage_path"]+"/dev/.keep","w")
- dev_keepfile.write('')
- dev_keepfile.close()
- except IOError:
- print "!!! Failed to create %s" % (self.settings["stage_path"]+"/dev/.keep")
- else:
- pass
+ for f in ('/proc', '/dev'):
+ f = self.settings['stage_path'] + f + '/.keep'
+ if not os.path.isfile(f):
+ try:
+ fileutils.touch(f)
+ except IOError:
+ log.error('Failed to create %s', f)
def set_mounts(self):
# stage_path/proc probably doesn't exist yet, so create it
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2015-10-09 21:06 Mike Frysinger
0 siblings, 0 replies; 57+ messages in thread
From: Mike Frysinger @ 2015-10-09 21:06 UTC (permalink / raw
To: gentoo-commits
commit: 3c638ffc9886f8c8fd98aa130a47c2d42ff985af
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 9 15:39:38 2015 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Fri Oct 9 15:39:38 2015 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=3c638ffc
snapshot: convert to log module
catalyst/targets/snapshot.py | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/catalyst/targets/snapshot.py b/catalyst/targets/snapshot.py
index e1ca7b7..d19f4ef 100644
--- a/catalyst/targets/snapshot.py
+++ b/catalyst/targets/snapshot.py
@@ -8,6 +8,7 @@ from stat import ST_UID, ST_GID, ST_MODE
from DeComp.compress import CompressMap
+from catalyst import log
from catalyst.support import normpath, cmd
from catalyst.base.targetbase import TargetBase
from catalyst.base.genbase import GenBase
@@ -49,8 +50,8 @@ class snapshot(TargetBase, GenBase):
success = True
self.setup()
- print "Creating Portage tree snapshot "+self.settings["version_stamp"]+\
- " from "+self.settings["portdir"]+"..."
+ log.notice('Creating Portage tree snapshot %s from %s ...',
+ self.settings['version_stamp'], self.settings['portdir'])
mytmp=self.settings["tmp_path"]
ensure_dirs(mytmp)
@@ -61,7 +62,7 @@ class snapshot(TargetBase, GenBase):
target_snapshot,
"Snapshot failure", env=self.env)
- print "Compressing Portage snapshot tarball..."
+ log.notice('Compressing Portage snapshot tarball ...')
compressor = CompressMap(self.settings["compress_definitions"],
env=self.env, default_mode=self.settings['compression_mode'])
infodict = compressor.create_infodict(
@@ -74,17 +75,17 @@ class snapshot(TargetBase, GenBase):
)
if not compressor.compress(infodict):
success = False
- print "Snapshot compression failure"
+ log.error('Snapshot compression failure')
else:
filename = '.'.join([self.settings["snapshot_path"],
compressor.extension(self.settings["compression_mode"])])
- print "COMPRESSOR success!!!! filename", filename
+ log.notice('Snapshot successfully written to %s', filename)
self.gen_contents_file(filename)
self.gen_digest_file(filename)
self.cleanup()
if success:
- print "snapshot: complete!"
+ log.info('snapshot: complete!')
return success
def kill_chroot_pids(self):
@@ -92,12 +93,12 @@ class snapshot(TargetBase, GenBase):
@staticmethod
def cleanup():
- print "Cleaning up..."
+ log.info('Cleaning up ...')
def purge(self):
myemp=self.settings["tmp_path"]
if os.path.isdir(myemp):
- print "Emptying directory",myemp
+ log.notice('Emptying directory %s', myemp)
# stat the dir, delete the dir, recreate the dir and set
# the proper perms and ownership
mystat=os.stat(myemp)
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2015-10-08 22:09 Mike Frysinger
0 siblings, 0 replies; 57+ messages in thread
From: Mike Frysinger @ 2015-10-08 22:09 UTC (permalink / raw
To: gentoo-commits
commit: 052d3a8f3813a0d4ff13d8d865192bf144cd8bb7
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 6 20:30:55 2015 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Oct 8 22:07:57 2015 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=052d3a8f
snapshot: do not preserve owner/group
There's no need to preserve ownership on the files we sync into the
snapshot, so just let rsync create them as it will (current uid/gid).
This slightly speeds things up when the files are owned by a non-root
user too.
catalyst/targets/snapshot.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/catalyst/targets/snapshot.py b/catalyst/targets/snapshot.py
index 6007aaa..e1ca7b7 100644
--- a/catalyst/targets/snapshot.py
+++ b/catalyst/targets/snapshot.py
@@ -56,7 +56,7 @@ class snapshot(TargetBase, GenBase):
ensure_dirs(mytmp)
target_snapshot = self.settings["portdir"] + "/ " + mytmp + "/%s/" % self.settings["repo_name"]
- cmd("rsync -a --delete --exclude /packages/ --exclude /distfiles/ " +
+ cmd("rsync -a --no-o --no-g --delete --exclude /packages/ --exclude /distfiles/ " +
"--exclude /local/ --exclude CVS/ --exclude .svn --filter=H_**/files/digest-* " +
target_snapshot,
"Snapshot failure", env=self.env)
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2015-10-08 3:53 Mike Frysinger
0 siblings, 0 replies; 57+ messages in thread
From: Mike Frysinger @ 2015-10-08 3:53 UTC (permalink / raw
To: gentoo-commits
commit: d6b661e7ecd238aa08de96a2780d563815ba17db
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 8 03:52:24 2015 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Oct 8 03:52:24 2015 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d6b661e7
stage2: fix minor typo
catalyst/targets/stage2.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/catalyst/targets/stage2.py b/catalyst/targets/stage2.py
index affa2cb..ae1a2f3 100644
--- a/catalyst/targets/stage2.py
+++ b/catalyst/targets/stage2.py
@@ -33,7 +33,7 @@ class stage2(StageBase):
verbose=False)
print "Source path set to "+self.settings["source_path"]
if os.path.isdir(self.settings["source_path"]):
- print "\tIf this is not desired, remove this directory or turn of seedcache in the options of catalyst.conf"
+ print "\tIf this is not desired, remove this directory or turn off seedcache in the options of catalyst.conf"
print "\tthe source path will then be "+normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"] + "\n")
# XXX: How do these override_foo() functions differ from the ones in
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2015-10-06 15:31 Mike Frysinger
0 siblings, 0 replies; 57+ messages in thread
From: Mike Frysinger @ 2015-10-06 15:31 UTC (permalink / raw
To: gentoo-commits
commit: 41658d890d2aeffdd0c7c399883ae212a1ea3ae0
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 6 14:47:42 2015 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Oct 6 14:47:42 2015 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=41658d89
targets: fix bad set_build_kernel_vars call
These modules were calling set_build_kernel_vars with an argument that
the func didn't accept. Plus, it's redundant as the super class init
(which these guys call) already handles the call. So delete it.
catalyst/targets/embedded.py | 1 -
catalyst/targets/netboot.py | 1 -
catalyst/targets/netboot2.py | 1 -
3 files changed, 3 deletions(-)
diff --git a/catalyst/targets/embedded.py b/catalyst/targets/embedded.py
index 3309278..6044e17 100644
--- a/catalyst/targets/embedded.py
+++ b/catalyst/targets/embedded.py
@@ -28,7 +28,6 @@ class embedded(StageBase):
self.valid_values.append("embedded/fs-ops")
StageBase.__init__(self,spec,addlargs)
- self.set_build_kernel_vars(addlargs)
def set_action_sequence(self):
self.settings["action_sequence"]=["dir_setup","unpack","unpack_snapshot",\
diff --git a/catalyst/targets/netboot.py b/catalyst/targets/netboot.py
index b0e322c..46ec4eb 100644
--- a/catalyst/targets/netboot.py
+++ b/catalyst/targets/netboot.py
@@ -44,7 +44,6 @@ class netboot(StageBase):
raise CatalystError("configuration error in netboot/packages.")
StageBase.__init__(self,spec,addlargs)
- self.set_build_kernel_vars(addlargs)
if "netboot/busybox_config" in addlargs:
file_locate(self.settings, ["netboot/busybox_config"])
diff --git a/catalyst/targets/netboot2.py b/catalyst/targets/netboot2.py
index f2d039c..5508367 100644
--- a/catalyst/targets/netboot2.py
+++ b/catalyst/targets/netboot2.py
@@ -46,7 +46,6 @@ class netboot2(StageBase):
raise CatalystError("configuration error in netboot2/packages.")
StageBase.__init__(self,spec,addlargs)
- self.set_build_kernel_vars()
self.settings["merge_path"]=normpath("/tmp/image/")
def set_target_path(self):
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2015-09-15 21:48 Richard Farina
0 siblings, 0 replies; 57+ messages in thread
From: Richard Farina @ 2015-09-15 21:48 UTC (permalink / raw
To: gentoo-commits
commit: b2d0e8091b6335cb5c830b2493ffbdfa21b4692b
Author: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 15 21:48:12 2015 +0000
Commit: Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Tue Sep 15 21:48:12 2015 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=b2d0e809
remove duplicated unpack from livecd-stage2
catalyst/targets/livecd_stage2.py | 48 ---------------------------------------
1 file changed, 48 deletions(-)
diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py
index e5ca074..70f0fac 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -85,54 +85,6 @@ class livecd_stage2(StageBase):
myf.write("\nblacklist "+x)
myf.close()
- def unpack(self):
- _unpack=True
- display_msg=None
-
- clst_unpack_hash = self.resume.get("unpack")
-
- if os.path.isdir(self.settings["source_path"]):
- unpack_cmd="rsync -a --delete "+self.settings["source_path"]+" "+self.settings["chroot_path"]
- display_msg="\nStarting rsync from "+self.settings["source_path"]+"\nto "+\
- self.settings["chroot_path"]+" (This may take some time) ...\n"
- error_msg="Rsync of "+self.settings["source_path"]+" to "+self.settings["chroot_path"]+" failed."
- invalid_snapshot=False
-
- if "autoresume" in self.settings["options"]:
- if os.path.isdir(self.settings["source_path"]) and \
- self.resume.is_enabled("unpack"):
- print "Resume point detected, skipping unpack operation..."
- _unpack=False
- elif "source_path_hash" in self.settings:
- if self.settings["source_path_hash"] != clst_unpack_hash:
- invalid_snapshot=True
-
- if _unpack:
- self.mount_safety_check()
- if invalid_snapshot:
- print "No Valid Resume point detected, cleaning up ..."
- self.clear_autoresume()
- self.clear_chroot()
-
- ensure_dirs(self.settings["chroot_path"]+"/tmp", mode=1777)
-
- if "pkgcache" in self.settings["options"]:
- ensure_dirs(self.settings["pkgcache_path"], mode=0755)
-
- if not display_msg:
- raise CatalystError("Could not find appropriate source.\n"
- "Please check the 'source_subpath' "
- "setting in the spec file.",
- print_traceback=True)
-
- print display_msg
- cmd(unpack_cmd,error_msg,env=self.env)
-
- if "source_path_hash" in self.settings:
- self.resume.enable("unpack", data=self.settings["source_path_hash"])
- else:
- self.resume.enable("unpack")
-
def set_action_sequence(self):
self.settings["action_sequence"]=["unpack","unpack_snapshot",\
"config_profile_link","setup_confdir","portage_overlay",\
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2015-09-09 17:42 Brian Dolbec
0 siblings, 0 replies; 57+ messages in thread
From: Brian Dolbec @ 2015-09-09 17:42 UTC (permalink / raw
To: gentoo-commits
commit: d8fd5aa979d2629173afed65dc4b406f9491fa5a
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 9 17:33:48 2015 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Wed Sep 9 17:34:13 2015 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=d8fd5aa9
snapshot.py: Update the run() to return True/False same as stagebase
Fixes Rick's issue with generating a snapshot exiting with 2.
catalyst/targets/snapshot.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/catalyst/targets/snapshot.py b/catalyst/targets/snapshot.py
index 1edcd02..87340b7 100644
--- a/catalyst/targets/snapshot.py
+++ b/catalyst/targets/snapshot.py
@@ -42,11 +42,12 @@ class snapshot(TargetBase, GenBase):
def run(self):
if "purgeonly" in self.settings["options"]:
self.purge()
- return
+ return True
if "purge" in self.settings["options"]:
self.purge()
+ success = True
self.setup()
print "Creating Portage tree snapshot "+self.settings["version_stamp"]+\
" from "+self.settings["portdir"]+"..."
@@ -72,6 +73,7 @@ class snapshot(TargetBase, GenBase):
auto_extension=True
)
if not compressor.compress(infodict):
+ success = False
print "Snapshot compression failure"
else:
filename = '.'.join([self.settings["snapshot_path"],
@@ -81,7 +83,9 @@ class snapshot(TargetBase, GenBase):
self.gen_digest_file(filename)
self.cleanup()
- print "snapshot: complete!"
+ if success:
+ print "snapshot: complete!"
+ return success
def kill_chroot_pids(self):
pass
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2015-02-26 20:12 Brian Dolbec
0 siblings, 0 replies; 57+ messages in thread
From: Brian Dolbec @ 2015-02-26 20:12 UTC (permalink / raw
To: gentoo-commits
commit: 8dbbd3792cc3de96736a812393ad3f22b14e52af
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon May 27 23:08:16 2013 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Jan 1 05:58:06 2015 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=8dbbd379
fix indent.
---
catalyst/targets/livecd_stage1.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/catalyst/targets/livecd_stage1.py b/catalyst/targets/livecd_stage1.py
index 6cbd91a..3b19c3f 100644
--- a/catalyst/targets/livecd_stage1.py
+++ b/catalyst/targets/livecd_stage1.py
@@ -47,7 +47,7 @@ class livecd_stage1(StageBase):
os.makedirs(self.settings["target_path"])
def set_spec_prefix(self):
- self.settings["spec_prefix"]="livecd"
+ self.settings["spec_prefix"]="livecd"
def set_use(self):
StageBase.set_use(self)
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:pending commit in: catalyst/targets/
@ 2015-02-26 19:25 Brian Dolbec
2015-02-26 20:12 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
0 siblings, 1 reply; 57+ messages in thread
From: Brian Dolbec @ 2015-02-26 19:25 UTC (permalink / raw
To: gentoo-commits
commit: 276c6969c79c810b059f525dd218b6b6271a967a
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 1 06:33:15 2013 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Feb 26 19:15:20 2015 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=276c6969
Fix a long line.
---
catalyst/targets/netboot2.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/catalyst/targets/netboot2.py b/catalyst/targets/netboot2.py
index acffb05..b492e6a 100644
--- a/catalyst/targets/netboot2.py
+++ b/catalyst/targets/netboot2.py
@@ -137,7 +137,8 @@ class netboot2(StageBase):
# we're going to shell out for all these cleaning operations,
# so we get easy glob handling
print "netboot2: removing " + x
- os.system("rm -rf " + self.settings["chroot_path"] + self.settings["merge_path"] + x)
+ os.system("rm -rf " + self.settings["chroot_path"] +
+ self.settings["merge_path"] + x)
def empty(self):
if "autoresume" in self.settings["options"] \
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:pending commit in: catalyst/targets/
@ 2015-01-01 5:59 Brian Dolbec
2015-02-26 20:12 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
0 siblings, 1 reply; 57+ messages in thread
From: Brian Dolbec @ 2015-01-01 5:59 UTC (permalink / raw
To: gentoo-commits
commit: 9ce3a9131514a1ea831d26a9cedeb5f3fb9677c3
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 25 00:29:52 2013 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Jan 1 05:58:06 2015 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=9ce3a913
Mixed spaces/tabs and indent cleanup.
---
catalyst/targets/livecd_stage2.py | 2 +-
catalyst/targets/netboot.py | 11 +++++------
catalyst/targets/netboot2.py | 10 +++++-----
catalyst/targets/stage4.py | 18 +++++++++---------
catalyst/targets/tinderbox.py | 8 ++++----
5 files changed, 24 insertions(+), 25 deletions(-)
diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py
index 949ee98..b1cf6b2 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -49,7 +49,7 @@ class livecd_stage2(StageBase):
print_traceback=True)
def set_spec_prefix(self):
- self.settings["spec_prefix"]="livecd"
+ self.settings["spec_prefix"]="livecd"
def set_target_path(self):
self.settings["target_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]+"/")
diff --git a/catalyst/targets/netboot.py b/catalyst/targets/netboot.py
index 7ae1d75..de8dc85 100644
--- a/catalyst/targets/netboot.py
+++ b/catalyst/targets/netboot.py
@@ -122,13 +122,12 @@ class netboot(StageBase):
self.unbind()
raise CatalystError("netboot build aborting due to error.",
print_traceback=True)
-
# end
print "netboot: build finished !"
def set_action_sequence(self):
- self.settings["action_sequence"]=["unpack","unpack_snapshot",
- "config_profile_link","setup_confdir","bind","chroot_setup",\
- "setup_environment","build_packages","build_busybox",\
- "build_kernel","copy_files_to_image",\
- "clean","create_netboot_files","unbind","clear_autoresume"]
+ self.settings["action_sequence"]=["unpack","unpack_snapshot",
+ "config_profile_link","setup_confdir","bind","chroot_setup",\
+ "setup_environment","build_packages","build_busybox",\
+ "build_kernel","copy_files_to_image",\
+ "clean","create_netboot_files","unbind","clear_autoresume"]
diff --git a/catalyst/targets/netboot2.py b/catalyst/targets/netboot2.py
index dbbb6a9..e9e2625 100644
--- a/catalyst/targets/netboot2.py
+++ b/catalyst/targets/netboot2.py
@@ -164,8 +164,8 @@ class netboot2(StageBase):
touch(self.settings["autoresume_path"]+"empty")
def set_action_sequence(self):
- self.settings["action_sequence"]=["unpack","unpack_snapshot","config_profile_link",
- "setup_confdir","portage_overlay","bind","chroot_setup",\
- "setup_environment","build_packages","root_overlay",\
- "copy_files_to_image","setup_overlay","build_kernel","move_kernels",\
- "remove","empty","unbind","clean","clear_autoresume"]
+ self.settings["action_sequence"]=["unpack","unpack_snapshot","config_profile_link",
+ "setup_confdir","portage_overlay","bind","chroot_setup",\
+ "setup_environment","build_packages","root_overlay",\
+ "copy_files_to_image","setup_overlay","build_kernel","move_kernels",\
+ "remove","empty","unbind","clean","clear_autoresume"]
diff --git a/catalyst/targets/stage4.py b/catalyst/targets/stage4.py
index 4aef33f..857976b 100644
--- a/catalyst/targets/stage4.py
+++ b/catalyst/targets/stage4.py
@@ -14,10 +14,10 @@ class stage4(StageBase):
self.required_values=["stage4/packages"]
self.valid_values=self.required_values[:]
self.valid_values.extend(["stage4/use","boot/kernel",\
- "stage4/root_overlay","stage4/fsscript",\
- "stage4/gk_mainargs","splash_theme",\
- "portage_overlay","stage4/rcadd","stage4/rcdel",\
- "stage4/linuxrc","stage4/unmerge","stage4/rm","stage4/empty"])
+ "stage4/root_overlay","stage4/fsscript",\
+ "stage4/gk_mainargs","splash_theme",\
+ "portage_overlay","stage4/rcadd","stage4/rcdel",\
+ "stage4/linuxrc","stage4/unmerge","stage4/rm","stage4/empty"])
StageBase.__init__(self,spec,addlargs)
def set_cleanables(self):
@@ -25,11 +25,11 @@ class stage4(StageBase):
def set_action_sequence(self):
self.settings["action_sequence"]=["unpack","unpack_snapshot",\
- "config_profile_link","setup_confdir","portage_overlay",\
- "bind","chroot_setup","setup_environment","build_packages",\
- "build_kernel","bootloader","root_overlay","fsscript",\
- "preclean","rcupdate","unmerge","unbind","remove","empty",\
- "clean"]
+ "config_profile_link","setup_confdir","portage_overlay",\
+ "bind","chroot_setup","setup_environment","build_packages",\
+ "build_kernel","bootloader","root_overlay","fsscript",\
+ "preclean","rcupdate","unmerge","unbind","remove","empty",\
+ "clean"]
# if "TARBALL" in self.settings or \
# "fetch" not in self.settings['options']:
diff --git a/catalyst/targets/tinderbox.py b/catalyst/targets/tinderbox.py
index 59e85d0..c9ed9b8 100644
--- a/catalyst/targets/tinderbox.py
+++ b/catalyst/targets/tinderbox.py
@@ -24,7 +24,7 @@ class tinderbox(StageBase):
# example call: "grp.sh run xmms vim sys-apps/gleep"
try:
if os.path.exists(self.settings["controller_file"]):
- cmd(self.settings["controller_file"]+" run "+\
+ cmd(self.settings["controller_file"]+" run "+\
list_bashify(self.settings["tinderbox/packages"]),"run script failed.",env=self.env)
except CatalystError:
@@ -43,6 +43,6 @@ class tinderbox(StageBase):
def set_action_sequence(self):
#Default action sequence for run method
self.settings["action_sequence"]=["unpack","unpack_snapshot",\
- "config_profile_link","setup_confdir","bind","chroot_setup",\
- "setup_environment","run_local","preclean","unbind","clean",\
- "clear_autoresume"]
+ "config_profile_link","setup_confdir","bind","chroot_setup",\
+ "setup_environment","run_local","preclean","unbind","clean",\
+ "clear_autoresume"]
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
2015-01-01 5:59 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
@ 2015-02-26 20:12 ` Brian Dolbec
0 siblings, 0 replies; 57+ messages in thread
From: Brian Dolbec @ 2015-02-26 20:12 UTC (permalink / raw
To: gentoo-commits
commit: 9ce3a9131514a1ea831d26a9cedeb5f3fb9677c3
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 25 00:29:52 2013 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Jan 1 05:58:06 2015 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=9ce3a913
Mixed spaces/tabs and indent cleanup.
---
catalyst/targets/livecd_stage2.py | 2 +-
catalyst/targets/netboot.py | 11 +++++------
catalyst/targets/netboot2.py | 10 +++++-----
catalyst/targets/stage4.py | 18 +++++++++---------
catalyst/targets/tinderbox.py | 8 ++++----
5 files changed, 24 insertions(+), 25 deletions(-)
diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py
index 949ee98..b1cf6b2 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -49,7 +49,7 @@ class livecd_stage2(StageBase):
print_traceback=True)
def set_spec_prefix(self):
- self.settings["spec_prefix"]="livecd"
+ self.settings["spec_prefix"]="livecd"
def set_target_path(self):
self.settings["target_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]+"/")
diff --git a/catalyst/targets/netboot.py b/catalyst/targets/netboot.py
index 7ae1d75..de8dc85 100644
--- a/catalyst/targets/netboot.py
+++ b/catalyst/targets/netboot.py
@@ -122,13 +122,12 @@ class netboot(StageBase):
self.unbind()
raise CatalystError("netboot build aborting due to error.",
print_traceback=True)
-
# end
print "netboot: build finished !"
def set_action_sequence(self):
- self.settings["action_sequence"]=["unpack","unpack_snapshot",
- "config_profile_link","setup_confdir","bind","chroot_setup",\
- "setup_environment","build_packages","build_busybox",\
- "build_kernel","copy_files_to_image",\
- "clean","create_netboot_files","unbind","clear_autoresume"]
+ self.settings["action_sequence"]=["unpack","unpack_snapshot",
+ "config_profile_link","setup_confdir","bind","chroot_setup",\
+ "setup_environment","build_packages","build_busybox",\
+ "build_kernel","copy_files_to_image",\
+ "clean","create_netboot_files","unbind","clear_autoresume"]
diff --git a/catalyst/targets/netboot2.py b/catalyst/targets/netboot2.py
index dbbb6a9..e9e2625 100644
--- a/catalyst/targets/netboot2.py
+++ b/catalyst/targets/netboot2.py
@@ -164,8 +164,8 @@ class netboot2(StageBase):
touch(self.settings["autoresume_path"]+"empty")
def set_action_sequence(self):
- self.settings["action_sequence"]=["unpack","unpack_snapshot","config_profile_link",
- "setup_confdir","portage_overlay","bind","chroot_setup",\
- "setup_environment","build_packages","root_overlay",\
- "copy_files_to_image","setup_overlay","build_kernel","move_kernels",\
- "remove","empty","unbind","clean","clear_autoresume"]
+ self.settings["action_sequence"]=["unpack","unpack_snapshot","config_profile_link",
+ "setup_confdir","portage_overlay","bind","chroot_setup",\
+ "setup_environment","build_packages","root_overlay",\
+ "copy_files_to_image","setup_overlay","build_kernel","move_kernels",\
+ "remove","empty","unbind","clean","clear_autoresume"]
diff --git a/catalyst/targets/stage4.py b/catalyst/targets/stage4.py
index 4aef33f..857976b 100644
--- a/catalyst/targets/stage4.py
+++ b/catalyst/targets/stage4.py
@@ -14,10 +14,10 @@ class stage4(StageBase):
self.required_values=["stage4/packages"]
self.valid_values=self.required_values[:]
self.valid_values.extend(["stage4/use","boot/kernel",\
- "stage4/root_overlay","stage4/fsscript",\
- "stage4/gk_mainargs","splash_theme",\
- "portage_overlay","stage4/rcadd","stage4/rcdel",\
- "stage4/linuxrc","stage4/unmerge","stage4/rm","stage4/empty"])
+ "stage4/root_overlay","stage4/fsscript",\
+ "stage4/gk_mainargs","splash_theme",\
+ "portage_overlay","stage4/rcadd","stage4/rcdel",\
+ "stage4/linuxrc","stage4/unmerge","stage4/rm","stage4/empty"])
StageBase.__init__(self,spec,addlargs)
def set_cleanables(self):
@@ -25,11 +25,11 @@ class stage4(StageBase):
def set_action_sequence(self):
self.settings["action_sequence"]=["unpack","unpack_snapshot",\
- "config_profile_link","setup_confdir","portage_overlay",\
- "bind","chroot_setup","setup_environment","build_packages",\
- "build_kernel","bootloader","root_overlay","fsscript",\
- "preclean","rcupdate","unmerge","unbind","remove","empty",\
- "clean"]
+ "config_profile_link","setup_confdir","portage_overlay",\
+ "bind","chroot_setup","setup_environment","build_packages",\
+ "build_kernel","bootloader","root_overlay","fsscript",\
+ "preclean","rcupdate","unmerge","unbind","remove","empty",\
+ "clean"]
# if "TARBALL" in self.settings or \
# "fetch" not in self.settings['options']:
diff --git a/catalyst/targets/tinderbox.py b/catalyst/targets/tinderbox.py
index 59e85d0..c9ed9b8 100644
--- a/catalyst/targets/tinderbox.py
+++ b/catalyst/targets/tinderbox.py
@@ -24,7 +24,7 @@ class tinderbox(StageBase):
# example call: "grp.sh run xmms vim sys-apps/gleep"
try:
if os.path.exists(self.settings["controller_file"]):
- cmd(self.settings["controller_file"]+" run "+\
+ cmd(self.settings["controller_file"]+" run "+\
list_bashify(self.settings["tinderbox/packages"]),"run script failed.",env=self.env)
except CatalystError:
@@ -43,6 +43,6 @@ class tinderbox(StageBase):
def set_action_sequence(self):
#Default action sequence for run method
self.settings["action_sequence"]=["unpack","unpack_snapshot",\
- "config_profile_link","setup_confdir","bind","chroot_setup",\
- "setup_environment","run_local","preclean","unbind","clean",\
- "clear_autoresume"]
+ "config_profile_link","setup_confdir","bind","chroot_setup",\
+ "setup_environment","run_local","preclean","unbind","clean",\
+ "clear_autoresume"]
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:pending commit in: catalyst/targets/
@ 2015-01-01 5:59 Brian Dolbec
2015-02-26 4:12 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
0 siblings, 1 reply; 57+ messages in thread
From: Brian Dolbec @ 2015-01-01 5:59 UTC (permalink / raw
To: gentoo-commits
commit: a5e07c9892a288eac19062e1c0ee40eb54982476
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 22 00:10:51 2013 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Jan 1 05:58:06 2015 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=a5e07c98
[3 of 3] Rename all target .py files and classes without _target in them.
This is so they are the named the same as the target .sh files
and work with the now simplified module loading.
---
catalyst/targets/{embedded_target.py => embedded.py} | 2 +-
catalyst/targets/{grp_target.py => grp.py} | 2 +-
catalyst/targets/{livecd_stage1_target.py => livecd_stage1.py} | 2 +-
catalyst/targets/{livecd_stage2_target.py => livecd_stage2.py} | 2 +-
catalyst/targets/{netboot_target.py => netboot.py} | 2 +-
catalyst/targets/{netboot2_target.py => netboot2.py} | 2 +-
catalyst/targets/{stage1_target.py => stage1.py} | 2 +-
catalyst/targets/{stage2_target.py => stage2.py} | 2 +-
catalyst/targets/{stage3_target.py => stage3.py} | 2 +-
catalyst/targets/{stage4_target.py => stage4.py} | 2 +-
catalyst/targets/{tinderbox_target.py => tinderbox.py} | 2 +-
11 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/catalyst/targets/embedded_target.py b/catalyst/targets/embedded.py
similarity index 98%
rename from catalyst/targets/embedded_target.py
rename to catalyst/targets/embedded.py
index aee0f00..3309278 100644
--- a/catalyst/targets/embedded_target.py
+++ b/catalyst/targets/embedded.py
@@ -15,7 +15,7 @@ from catalyst.support import normpath
from catalyst.base.stagebase import StageBase
-class embedded_target(StageBase):
+class embedded(StageBase):
"""
Builder class for embedded target
"""
diff --git a/catalyst/targets/grp_target.py b/catalyst/targets/grp.py
similarity index 99%
rename from catalyst/targets/grp_target.py
rename to catalyst/targets/grp.py
index e3f08a2..0075714 100644
--- a/catalyst/targets/grp_target.py
+++ b/catalyst/targets/grp.py
@@ -14,7 +14,7 @@ from catalyst.support import (CatalystError, normpath,
from catalyst.base.stagebase import StageBase
-class grp_target(StageBase):
+class grp(StageBase):
"""
The builder class for GRP (Gentoo Reference Platform) builds.
"""
diff --git a/catalyst/targets/livecd_stage1_target.py b/catalyst/targets/livecd_stage1.py
similarity index 98%
rename from catalyst/targets/livecd_stage1_target.py
rename to catalyst/targets/livecd_stage1.py
index 9c74253..661e06e 100644
--- a/catalyst/targets/livecd_stage1_target.py
+++ b/catalyst/targets/livecd_stage1.py
@@ -13,7 +13,7 @@ from catalyst.support import (normpath,
from catalyst.base.stagebase import StageBase
-class livecd_stage1_target(StageBase):
+class livecd_stage1(StageBase):
"""
Builder class for LiveCD stage1.
"""
diff --git a/catalyst/targets/livecd_stage2_target.py b/catalyst/targets/livecd_stage2.py
similarity index 99%
rename from catalyst/targets/livecd_stage2_target.py
rename to catalyst/targets/livecd_stage2.py
index a4630e6..20f6014 100644
--- a/catalyst/targets/livecd_stage2_target.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -10,7 +10,7 @@ from catalyst.support import (normpath, file_locate, CatalystError, cmd,
from catalyst.base.stagebase import StageBase
-class livecd_stage2_target(StageBase):
+class livecd_stage2(StageBase):
"""
Builder class for a LiveCD stage2 build.
"""
diff --git a/catalyst/targets/netboot_target.py b/catalyst/targets/netboot.py
similarity index 99%
rename from catalyst/targets/netboot_target.py
rename to catalyst/targets/netboot.py
index 9d92ef2..f753c7f 100644
--- a/catalyst/targets/netboot_target.py
+++ b/catalyst/targets/netboot.py
@@ -12,7 +12,7 @@ from catalyst.support import (CatalystError, normpath,
from catalyst.base.stagebase import StageBase
-class netboot_target(StageBase):
+class netboot(StageBase):
"""
Builder class for a netboot build.
"""
diff --git a/catalyst/targets/netboot2_target.py b/catalyst/targets/netboot2.py
similarity index 99%
rename from catalyst/targets/netboot2_target.py
rename to catalyst/targets/netboot2.py
index 130e2b6..fc8c64c 100644
--- a/catalyst/targets/netboot2_target.py
+++ b/catalyst/targets/netboot2.py
@@ -14,7 +14,7 @@ from catalyst.support import (CatalystError, normpath,
from catalyst.base.stagebase import StageBase
-class netboot2_target(StageBase):
+class netboot2(StageBase):
"""
Builder class for a netboot build, version 2
"""
diff --git a/catalyst/targets/stage1_target.py b/catalyst/targets/stage1.py
similarity index 99%
rename from catalyst/targets/stage1_target.py
rename to catalyst/targets/stage1.py
index 2329b58..e72cbcc 100644
--- a/catalyst/targets/stage1_target.py
+++ b/catalyst/targets/stage1.py
@@ -9,7 +9,7 @@ from catalyst.support import normpath, list_to_string
from catalyst.base.stagebase import StageBase
-class stage1_target(StageBase):
+class stage1(StageBase):
"""
Builder class for a stage1 installation tarball build.
"""
diff --git a/catalyst/targets/stage2_target.py b/catalyst/targets/stage2.py
similarity index 98%
rename from catalyst/targets/stage2_target.py
rename to catalyst/targets/stage2.py
index ec6d78d..884b20d 100644
--- a/catalyst/targets/stage2_target.py
+++ b/catalyst/targets/stage2.py
@@ -9,7 +9,7 @@ from catalyst.support import normpath, list_to_string
from catalyst.base.stagebase import StageBase
-class stage2_target(StageBase):
+class stage2(StageBase):
"""
Builder class for a stage2 installation tarball build.
"""
diff --git a/catalyst/targets/stage3_target.py b/catalyst/targets/stage3.py
similarity index 96%
rename from catalyst/targets/stage3_target.py
rename to catalyst/targets/stage3.py
index 103242d..cc3e520 100644
--- a/catalyst/targets/stage3_target.py
+++ b/catalyst/targets/stage3.py
@@ -6,7 +6,7 @@ stage3 target, builds upon previous stage2/stage3 tarball
from catalyst.base.stagebase import StageBase
-class stage3_target(StageBase):
+class stage3(StageBase):
"""
Builder class for a stage3 installation tarball build.
"""
diff --git a/catalyst/targets/stage4_target.py b/catalyst/targets/stage4.py
similarity index 97%
rename from catalyst/targets/stage4_target.py
rename to catalyst/targets/stage4.py
index 4dbdb45..4aef33f 100644
--- a/catalyst/targets/stage4_target.py
+++ b/catalyst/targets/stage4.py
@@ -6,7 +6,7 @@ stage4 target, builds upon previous stage3/stage4 tarball
from catalyst.base.stagebase import StageBase
-class stage4_target(StageBase):
+class stage4(StageBase):
"""
Builder class for stage4.
"""
diff --git a/catalyst/targets/tinderbox_target.py b/catalyst/targets/tinderbox.py
similarity index 97%
rename from catalyst/targets/tinderbox_target.py
rename to catalyst/targets/tinderbox.py
index 0c389e6..4cb7537 100644
--- a/catalyst/targets/tinderbox_target.py
+++ b/catalyst/targets/tinderbox.py
@@ -9,7 +9,7 @@ from catalyst.support import cmd, list_bashify, CatalystError
from catalyst.base.stagebase import StageBase
-class tinderbox_target(StageBase):
+class tinderbox(StageBase):
"""
Builder class for the tinderbox target
"""
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
2015-01-01 5:59 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
@ 2015-02-26 4:12 ` Brian Dolbec
0 siblings, 0 replies; 57+ messages in thread
From: Brian Dolbec @ 2015-02-26 4:12 UTC (permalink / raw
To: gentoo-commits
commit: a5e07c9892a288eac19062e1c0ee40eb54982476
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 22 00:10:51 2013 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Jan 1 05:58:06 2015 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=a5e07c98
[3 of 3] Rename all target .py files and classes without _target in them.
This is so they are the named the same as the target .sh files
and work with the now simplified module loading.
---
catalyst/targets/{embedded_target.py => embedded.py} | 2 +-
catalyst/targets/{grp_target.py => grp.py} | 2 +-
catalyst/targets/{livecd_stage1_target.py => livecd_stage1.py} | 2 +-
catalyst/targets/{livecd_stage2_target.py => livecd_stage2.py} | 2 +-
catalyst/targets/{netboot_target.py => netboot.py} | 2 +-
catalyst/targets/{netboot2_target.py => netboot2.py} | 2 +-
catalyst/targets/{stage1_target.py => stage1.py} | 2 +-
catalyst/targets/{stage2_target.py => stage2.py} | 2 +-
catalyst/targets/{stage3_target.py => stage3.py} | 2 +-
catalyst/targets/{stage4_target.py => stage4.py} | 2 +-
catalyst/targets/{tinderbox_target.py => tinderbox.py} | 2 +-
11 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/catalyst/targets/embedded_target.py b/catalyst/targets/embedded.py
similarity index 98%
rename from catalyst/targets/embedded_target.py
rename to catalyst/targets/embedded.py
index aee0f00..3309278 100644
--- a/catalyst/targets/embedded_target.py
+++ b/catalyst/targets/embedded.py
@@ -15,7 +15,7 @@ from catalyst.support import normpath
from catalyst.base.stagebase import StageBase
-class embedded_target(StageBase):
+class embedded(StageBase):
"""
Builder class for embedded target
"""
diff --git a/catalyst/targets/grp_target.py b/catalyst/targets/grp.py
similarity index 99%
rename from catalyst/targets/grp_target.py
rename to catalyst/targets/grp.py
index e3f08a2..0075714 100644
--- a/catalyst/targets/grp_target.py
+++ b/catalyst/targets/grp.py
@@ -14,7 +14,7 @@ from catalyst.support import (CatalystError, normpath,
from catalyst.base.stagebase import StageBase
-class grp_target(StageBase):
+class grp(StageBase):
"""
The builder class for GRP (Gentoo Reference Platform) builds.
"""
diff --git a/catalyst/targets/livecd_stage1_target.py b/catalyst/targets/livecd_stage1.py
similarity index 98%
rename from catalyst/targets/livecd_stage1_target.py
rename to catalyst/targets/livecd_stage1.py
index 9c74253..661e06e 100644
--- a/catalyst/targets/livecd_stage1_target.py
+++ b/catalyst/targets/livecd_stage1.py
@@ -13,7 +13,7 @@ from catalyst.support import (normpath,
from catalyst.base.stagebase import StageBase
-class livecd_stage1_target(StageBase):
+class livecd_stage1(StageBase):
"""
Builder class for LiveCD stage1.
"""
diff --git a/catalyst/targets/livecd_stage2_target.py b/catalyst/targets/livecd_stage2.py
similarity index 99%
rename from catalyst/targets/livecd_stage2_target.py
rename to catalyst/targets/livecd_stage2.py
index a4630e6..20f6014 100644
--- a/catalyst/targets/livecd_stage2_target.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -10,7 +10,7 @@ from catalyst.support import (normpath, file_locate, CatalystError, cmd,
from catalyst.base.stagebase import StageBase
-class livecd_stage2_target(StageBase):
+class livecd_stage2(StageBase):
"""
Builder class for a LiveCD stage2 build.
"""
diff --git a/catalyst/targets/netboot_target.py b/catalyst/targets/netboot.py
similarity index 99%
rename from catalyst/targets/netboot_target.py
rename to catalyst/targets/netboot.py
index 9d92ef2..f753c7f 100644
--- a/catalyst/targets/netboot_target.py
+++ b/catalyst/targets/netboot.py
@@ -12,7 +12,7 @@ from catalyst.support import (CatalystError, normpath,
from catalyst.base.stagebase import StageBase
-class netboot_target(StageBase):
+class netboot(StageBase):
"""
Builder class for a netboot build.
"""
diff --git a/catalyst/targets/netboot2_target.py b/catalyst/targets/netboot2.py
similarity index 99%
rename from catalyst/targets/netboot2_target.py
rename to catalyst/targets/netboot2.py
index 130e2b6..fc8c64c 100644
--- a/catalyst/targets/netboot2_target.py
+++ b/catalyst/targets/netboot2.py
@@ -14,7 +14,7 @@ from catalyst.support import (CatalystError, normpath,
from catalyst.base.stagebase import StageBase
-class netboot2_target(StageBase):
+class netboot2(StageBase):
"""
Builder class for a netboot build, version 2
"""
diff --git a/catalyst/targets/stage1_target.py b/catalyst/targets/stage1.py
similarity index 99%
rename from catalyst/targets/stage1_target.py
rename to catalyst/targets/stage1.py
index 2329b58..e72cbcc 100644
--- a/catalyst/targets/stage1_target.py
+++ b/catalyst/targets/stage1.py
@@ -9,7 +9,7 @@ from catalyst.support import normpath, list_to_string
from catalyst.base.stagebase import StageBase
-class stage1_target(StageBase):
+class stage1(StageBase):
"""
Builder class for a stage1 installation tarball build.
"""
diff --git a/catalyst/targets/stage2_target.py b/catalyst/targets/stage2.py
similarity index 98%
rename from catalyst/targets/stage2_target.py
rename to catalyst/targets/stage2.py
index ec6d78d..884b20d 100644
--- a/catalyst/targets/stage2_target.py
+++ b/catalyst/targets/stage2.py
@@ -9,7 +9,7 @@ from catalyst.support import normpath, list_to_string
from catalyst.base.stagebase import StageBase
-class stage2_target(StageBase):
+class stage2(StageBase):
"""
Builder class for a stage2 installation tarball build.
"""
diff --git a/catalyst/targets/stage3_target.py b/catalyst/targets/stage3.py
similarity index 96%
rename from catalyst/targets/stage3_target.py
rename to catalyst/targets/stage3.py
index 103242d..cc3e520 100644
--- a/catalyst/targets/stage3_target.py
+++ b/catalyst/targets/stage3.py
@@ -6,7 +6,7 @@ stage3 target, builds upon previous stage2/stage3 tarball
from catalyst.base.stagebase import StageBase
-class stage3_target(StageBase):
+class stage3(StageBase):
"""
Builder class for a stage3 installation tarball build.
"""
diff --git a/catalyst/targets/stage4_target.py b/catalyst/targets/stage4.py
similarity index 97%
rename from catalyst/targets/stage4_target.py
rename to catalyst/targets/stage4.py
index 4dbdb45..4aef33f 100644
--- a/catalyst/targets/stage4_target.py
+++ b/catalyst/targets/stage4.py
@@ -6,7 +6,7 @@ stage4 target, builds upon previous stage3/stage4 tarball
from catalyst.base.stagebase import StageBase
-class stage4_target(StageBase):
+class stage4(StageBase):
"""
Builder class for stage4.
"""
diff --git a/catalyst/targets/tinderbox_target.py b/catalyst/targets/tinderbox.py
similarity index 97%
rename from catalyst/targets/tinderbox_target.py
rename to catalyst/targets/tinderbox.py
index 0c389e6..4cb7537 100644
--- a/catalyst/targets/tinderbox_target.py
+++ b/catalyst/targets/tinderbox.py
@@ -9,7 +9,7 @@ from catalyst.support import cmd, list_bashify, CatalystError
from catalyst.base.stagebase import StageBase
-class tinderbox_target(StageBase):
+class tinderbox(StageBase):
"""
Builder class for the tinderbox target
"""
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
@ 2014-05-05 19:17 Brian Dolbec
0 siblings, 0 replies; 57+ messages in thread
From: Brian Dolbec @ 2014-05-05 19:17 UTC (permalink / raw
To: gentoo-commits
commit: 938e55e150d20d8f5ea03541498bd28e49e8f36d
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 5 07:26:58 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sat Apr 5 07:41:57 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=938e55e1
generic_stage_target: Add a trailing / to the cp /etc/reolv.conf command
---
catalyst/targets/generic_stage_target.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/catalyst/targets/generic_stage_target.py b/catalyst/targets/generic_stage_target.py
index 05c61e8..1f26e65 100644
--- a/catalyst/targets/generic_stage_target.py
+++ b/catalyst/targets/generic_stage_target.py
@@ -1025,7 +1025,7 @@ class generic_stage_target(generic_target):
#self.makeconf=read_makeconf(self.settings["chroot_path"]+"/etc/portage/make.conf")
- cmd("cp /etc/resolv.conf "+self.settings["chroot_path"]+"/etc",\
+ cmd("cp /etc/resolv.conf " + self.settings["chroot_path"] + "/etc/",
"Could not copy resolv.conf into place.",env=self.env)
""" Copy over the envscript, if applicable """
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:pending commit in: catalyst/targets/
@ 2014-04-02 20:09 Brian Dolbec
2014-04-02 20:09 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
0 siblings, 1 reply; 57+ messages in thread
From: Brian Dolbec @ 2014-04-02 20:09 UTC (permalink / raw
To: gentoo-commits
commit: c7539118560247bbc182cd8c9602d323533a23a6
Author: W. Trevor King <wking <AT> tremily <DOT> us>
AuthorDate: Fri Dec 27 02:40:10 2013 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Apr 2 20:04:22 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=c7539118
catalyst/targets/generic_target.py: Pass TERM through to the chroot
Avoid:
Running stage1-chroot.sh in chroot /var/tmp/catalyst/tmp/default/...
tput: No value for $TERM and no -T specified
by passing the caller's TERM environment variable [1] through to the
chroot. If the caller does not supply TERM, default to 'dumb' which
disables color etc., but should be the most portable. On Gentoo, the
dumb terminfo (/usr/share/terminfo/d/dumb) is distributed as part of
ncurses [2]. You can list supported terminals with toe, which is also
distributed with ncurses [2]:
$ toe
ansi ansi/pc-term compatible with color
dumb 80-column dumb tty
linux linux console
...
[1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03
[2]: http://www.gnu.org/software/ncurses/
---
catalyst/targets/generic_target.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/catalyst/targets/generic_target.py b/catalyst/targets/generic_target.py
index de51994..382f1c7 100644
--- a/catalyst/targets/generic_target.py
+++ b/catalyst/targets/generic_target.py
@@ -1,3 +1,5 @@
+import os
+
from catalyst.support import *
class generic_target:
@@ -7,5 +9,7 @@ class generic_target:
def __init__(self,myspec,addlargs):
addl_arg_parse(myspec,addlargs,self.required_values,self.valid_values)
self.settings=myspec
- self.env={}
- self.env["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"
+ self.env = {
+ 'PATH': '/bin:/sbin:/usr/bin:/usr/sbin',
+ 'TERM': os.getenv('TERM', 'dumb'),
+ }
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
2014-04-02 20:09 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
@ 2014-04-02 20:09 ` Brian Dolbec
0 siblings, 0 replies; 57+ messages in thread
From: Brian Dolbec @ 2014-04-02 20:09 UTC (permalink / raw
To: gentoo-commits
commit: c7539118560247bbc182cd8c9602d323533a23a6
Author: W. Trevor King <wking <AT> tremily <DOT> us>
AuthorDate: Fri Dec 27 02:40:10 2013 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Apr 2 20:04:22 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=c7539118
catalyst/targets/generic_target.py: Pass TERM through to the chroot
Avoid:
Running stage1-chroot.sh in chroot /var/tmp/catalyst/tmp/default/...
tput: No value for $TERM and no -T specified
by passing the caller's TERM environment variable [1] through to the
chroot. If the caller does not supply TERM, default to 'dumb' which
disables color etc., but should be the most portable. On Gentoo, the
dumb terminfo (/usr/share/terminfo/d/dumb) is distributed as part of
ncurses [2]. You can list supported terminals with toe, which is also
distributed with ncurses [2]:
$ toe
ansi ansi/pc-term compatible with color
dumb 80-column dumb tty
linux linux console
...
[1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03
[2]: http://www.gnu.org/software/ncurses/
---
catalyst/targets/generic_target.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/catalyst/targets/generic_target.py b/catalyst/targets/generic_target.py
index de51994..382f1c7 100644
--- a/catalyst/targets/generic_target.py
+++ b/catalyst/targets/generic_target.py
@@ -1,3 +1,5 @@
+import os
+
from catalyst.support import *
class generic_target:
@@ -7,5 +9,7 @@ class generic_target:
def __init__(self,myspec,addlargs):
addl_arg_parse(myspec,addlargs,self.required_values,self.valid_values)
self.settings=myspec
- self.env={}
- self.env["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin"
+ self.env = {
+ 'PATH': '/bin:/sbin:/usr/bin:/usr/sbin',
+ 'TERM': os.getenv('TERM', 'dumb'),
+ }
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:pending commit in: catalyst/targets/
@ 2014-04-02 20:09 Brian Dolbec
2014-04-02 20:09 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
0 siblings, 1 reply; 57+ messages in thread
From: Brian Dolbec @ 2014-04-02 20:09 UTC (permalink / raw
To: gentoo-commits
commit: e2cf676cffe44e4048113a48a4362b57867d11b6
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 11 00:13:06 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Apr 2 20:04:22 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=e2cf676c
generic_stage_target.py: Fix an intermittent snapshot_cache_path keyerror
---
catalyst/targets/generic_stage_target.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/catalyst/targets/generic_stage_target.py b/catalyst/targets/generic_stage_target.py
index 9c39d00..eaf2c1f 100644
--- a/catalyst/targets/generic_stage_target.py
+++ b/catalyst/targets/generic_stage_target.py
@@ -215,13 +215,14 @@ class generic_stage_target(generic_target):
self.mountmap = SOURCE_MOUNTS_DEFAULTS.copy()
# update them from settings
self.mountmap["distdir"] = self.settings["distdir"]
- self.mountmap["portdir"] = normpath("/".join([
- self.settings["snapshot_cache_path"],
- self.settings["repo_name"],
- ]))
if "SNAPCACHE" not in self.settings:
self.mounts.remove("portdir")
- #self.mountmap["portdir"] = None
+ self.mountmap["portdir"] = None
+ else:
+ self.mountmap["portdir"] = normpath("/".join([
+ self.settings["snapshot_cache_path"],
+ self.settings["repo_name"],
+ ]))
if os.uname()[0] == "Linux":
self.mounts.append("devpts")
self.mounts.append("shm")
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
2014-04-02 20:09 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
@ 2014-04-02 20:09 ` Brian Dolbec
0 siblings, 0 replies; 57+ messages in thread
From: Brian Dolbec @ 2014-04-02 20:09 UTC (permalink / raw
To: gentoo-commits
commit: e2cf676cffe44e4048113a48a4362b57867d11b6
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 11 00:13:06 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Apr 2 20:04:22 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=e2cf676c
generic_stage_target.py: Fix an intermittent snapshot_cache_path keyerror
---
catalyst/targets/generic_stage_target.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/catalyst/targets/generic_stage_target.py b/catalyst/targets/generic_stage_target.py
index 9c39d00..eaf2c1f 100644
--- a/catalyst/targets/generic_stage_target.py
+++ b/catalyst/targets/generic_stage_target.py
@@ -215,13 +215,14 @@ class generic_stage_target(generic_target):
self.mountmap = SOURCE_MOUNTS_DEFAULTS.copy()
# update them from settings
self.mountmap["distdir"] = self.settings["distdir"]
- self.mountmap["portdir"] = normpath("/".join([
- self.settings["snapshot_cache_path"],
- self.settings["repo_name"],
- ]))
if "SNAPCACHE" not in self.settings:
self.mounts.remove("portdir")
- #self.mountmap["portdir"] = None
+ self.mountmap["portdir"] = None
+ else:
+ self.mountmap["portdir"] = normpath("/".join([
+ self.settings["snapshot_cache_path"],
+ self.settings["repo_name"],
+ ]))
if os.uname()[0] == "Linux":
self.mounts.append("devpts")
self.mounts.append("shm")
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:pending commit in: catalyst/targets/
@ 2014-04-02 20:09 Brian Dolbec
2014-04-02 20:09 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
0 siblings, 1 reply; 57+ messages in thread
From: Brian Dolbec @ 2014-04-02 20:09 UTC (permalink / raw
To: gentoo-commits
commit: d7c96f12c2c20165ab0b8c410366846a91e859da
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 30 06:14:48 2013 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Apr 2 20:04:22 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=d7c96f12
Fix autoresume file paths to only be configured once.
Use: pjoin as a shorter alias to os.path.join()
---
catalyst/targets/generic_stage_target.py | 175 +++++++++++++++++--------------
1 file changed, 95 insertions(+), 80 deletions(-)
diff --git a/catalyst/targets/generic_stage_target.py b/catalyst/targets/generic_stage_target.py
index 2b3d7ce..9c39d00 100644
--- a/catalyst/targets/generic_stage_target.py
+++ b/catalyst/targets/generic_stage_target.py
@@ -33,6 +33,9 @@ SOURCE_MOUNTS_DEFAULTS = {
"shm": "shmfs",
}
+# for convienience
+pjoin = os.path.join
+
class generic_stage_target(generic_target):
"""
@@ -334,9 +337,10 @@ class generic_stage_target(generic_target):
def set_target_path(self):
self.settings["target_path"]=normpath(self.settings["storedir"]+\
"/builds/"+self.settings["target_subpath"]+".tar.bz2")
- if "AUTORESUME" in self.settings\
- and os.path.exists(self.settings["autoresume_path"]+\
- "setup_target_path"):
+ setup_target_path_resume = pjoin(self.settings["autoresume_path"],
+ "setup_target_path")
+ if "AUTORESUME" in self.settings and \
+ os.path.exists(setup_target_path_resume):
print \
"Resume point detected, skipping target path setup operation..."
else:
@@ -348,7 +352,7 @@ class generic_stage_target(generic_target):
# cmd("rm -f "+self.settings["target_path"],\
# "Could not remove existing file: "\
# +self.settings["target_path"],env=self.env)
- touch(self.settings["autoresume_path"]+"setup_target_path")
+ touch(setup_target_path_resume)
if not os.path.exists(self.settings["storedir"]+"/builds/"):
os.makedirs(self.settings["storedir"]+"/builds/")
@@ -484,10 +488,12 @@ class generic_stage_target(generic_target):
self.chroot_lock=LockDir(self.settings["chroot_path"])
def set_autoresume_path(self):
- self.settings["autoresume_path"]=normpath(self.settings["storedir"]+\
- "/tmp/"+self.settings["rel_type"]+"/"+".autoresume-"+\
- self.settings["target"]+"-"+self.settings["subarch"]+"-"+\
- self.settings["version_stamp"]+"/")
+ self.settings["autoresume_path"] = normpath(pjoin(
+ self.settings["storedir"], "tmp", self.settings["rel_type"],
+ ".autoresume-%s-%s-%s"
+ %(self.settings["target"], self.settings["subarch"],
+ self.settings["version_stamp"])
+ ))
if "AUTORESUME" in self.settings:
print "The autoresume path is " + self.settings["autoresume_path"]
if not os.path.exists(self.settings["autoresume_path"]):
@@ -673,8 +679,8 @@ class generic_stage_target(generic_target):
def unpack(self):
unpack=True
- clst_unpack_hash=read_from_clst(self.settings["autoresume_path"]+\
- "unpack")
+ unpack_resume = pjoin(self.settings["autoresume_path"], "unpack")
+ clst_unpack_hash=read_from_clst(unpack_resume)
if "SEEDCACHE" in self.settings:
if os.path.isdir(self.settings["source_path"]):
@@ -720,7 +726,7 @@ class generic_stage_target(generic_target):
if "AUTORESUME" in self.settings:
if os.path.isdir(self.settings["source_path"]) \
- and os.path.exists(self.settings["autoresume_path"]+"unpack"):
+ and os.path.exists(unpack_resume):
""" Autoresume is valid, SEEDCACHE is valid """
unpack=False
invalid_snapshot=False
@@ -732,8 +738,7 @@ class generic_stage_target(generic_target):
invalid_snapshot=True
elif os.path.isdir(self.settings["source_path"]) \
- and not os.path.exists(self.settings["autoresume_path"]+\
- "unpack"):
+ and not os.path.exists(unpack_resume):
""" Autoresume is invalid, SEEDCACHE """
unpack=True
invalid_snapshot=False
@@ -793,18 +798,19 @@ class generic_stage_target(generic_target):
cmd(unpack_cmd,error_msg,env=self.env)
if "source_path_hash" in self.settings:
- myf=open(self.settings["autoresume_path"]+"unpack","w")
+ myf=open(unpack_resume,"w")
myf.write(self.settings["source_path_hash"])
myf.close()
else:
- touch(self.settings["autoresume_path"]+"unpack")
+ touch(unpack_resume)
else:
print "Resume point detected, skipping unpack operation..."
def unpack_snapshot(self):
unpack=True
- snapshot_hash=read_from_clst(self.settings["autoresume_path"]+\
+ unpack_portage_resume = pjoin(self.settings["autoresume_path"],
"unpack_portage")
+ snapshot_hash=read_from_clst(unpack_portage_resume)
if "SNAPCACHE" in self.settings:
snapshot_cache_hash=\
@@ -841,8 +847,7 @@ class generic_stage_target(generic_target):
if "AUTORESUME" in self.settings \
and os.path.exists(self.settings["chroot_path"]+\
self.settings["portdir"]) \
- and os.path.exists(self.settings["autoresume_path"]\
- +"unpack_portage") \
+ and os.path.exists(unpack_portage_resume) \
and self.settings["snapshot_path_hash"] == snapshot_hash:
print \
"Valid Resume point detected, skipping unpack of portage tree..."
@@ -868,7 +873,7 @@ class generic_stage_target(generic_target):
myf.close()
else:
print "Setting snapshot autoresume point"
- myf=open(self.settings["autoresume_path"]+"unpack_portage","w")
+ myf=open(unpack_portage_resume,"w")
myf.write(self.settings["snapshot_path_hash"])
myf.close()
@@ -876,9 +881,10 @@ class generic_stage_target(generic_target):
self.snapshot_lock_object.unlock()
def config_profile_link(self):
+ config_protect_link_resume = pjoin(self.settings["autoresume_path"],
+ "config_profile_link")
if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+\
- "config_profile_link"):
+ and os.path.exists(config_protect_link_resume):
print \
"Resume point detected, skipping config_profile_link operation..."
else:
@@ -892,12 +898,13 @@ class generic_stage_target(generic_target):
self.settings["target_profile"]+" "+\
self.settings["chroot_path"]+"/etc/portage/make.profile",\
"Error creating profile link",env=self.env)
- touch(self.settings["autoresume_path"]+"config_profile_link")
+ touch(config_protect_link_resume)
def setup_confdir(self):
+ setup_confdir_resume = pjoin(self.settings["autoresume_path"],
+ "setup_confdir")
if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+\
- "setup_confdir"):
+ and os.path.exists(setup_confdir_resume):
print "Resume point detected, skipping setup_confdir operation..."
else:
if "portage_confdir" in self.settings:
@@ -905,7 +912,7 @@ class generic_stage_target(generic_target):
cmd("rsync -a "+self.settings["portage_confdir"]+"/ "+\
self.settings["chroot_path"]+"/etc/portage/",\
"Error copying /etc/portage",env=self.env)
- touch(self.settings["autoresume_path"]+"setup_confdir")
+ touch(setup_confdir_resume)
def portage_overlay(self):
""" We copy the contents of our overlays to /usr/local/portage """
@@ -1029,8 +1036,9 @@ class generic_stage_target(generic_target):
self.override_cflags()
self.override_cxxflags()
self.override_ldflags()
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"chroot_setup"):
+ chroot_setup_resume = pjoin(self.settings["autoresume_path"],
+ "chroot_setup")
+ if "AUTORESUME" in self.settings and os.path.exists(chroot_setup_resume):
print "Resume point detected, skipping chroot_setup operation..."
else:
print "Setting up chroot..."
@@ -1126,32 +1134,34 @@ class generic_stage_target(generic_target):
cmd("cp "+self.settings["chroot_path"]+"/etc/portage/make.conf "+\
self.settings["chroot_path"]+"/etc/portage/make.conf.catalyst",\
"Could not backup /etc/portage/make.conf",env=self.env)
- touch(self.settings["autoresume_path"]+"chroot_setup")
+ touch(chroot_setup_resume)
def fsscript(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"fsscript"):
+ fsscript_resume = pjoin(self.settings["autoresume_path"], "fsscript")
+ if "AUTORESUME" in self.settings and os.path.exists(fsscript_resume):
print "Resume point detected, skipping fsscript operation..."
else:
if "fsscript" in self.settings:
if os.path.exists(self.settings["controller_file"]):
cmd("/bin/bash "+self.settings["controller_file"]+\
" fsscript","fsscript script failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"fsscript")
+ touch(fsscript_resume)
def rcupdate(self):
+ rcupdate_resume = pjoin(self.settings["autoresume_path"], "rcupdate")
if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"rcupdate"):
+ and os.path.exists(rcupdate_resume):
print "Resume point detected, skipping rcupdate operation..."
else:
if os.path.exists(self.settings["controller_file"]):
cmd("/bin/bash "+self.settings["controller_file"]+" rc-update",\
"rc-update script failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"rcupdate")
+ touch(rcupdate_resume)
def clean(self):
+ clean_resume = pjoin(self.settings["autoresume_path"], "clean")
if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"clean"):
+ and os.path.exists(clean_resume):
print "Resume point detected, skipping clean operation..."
else:
for x in self.settings["cleanables"]:
@@ -1182,11 +1192,11 @@ class generic_stage_target(generic_target):
if os.path.exists(self.settings["controller_file"]):
cmd("/bin/bash "+self.settings["controller_file"]+" clean",\
"clean script failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"clean")
+ touch(clean_resume)
def empty(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"empty"):
+ empty_resume = pjoin(self.settings["autoresume_path"], "empty")
+ if "AUTORESUME" in self.settings and os.path.exists(empty_resume):
print "Resume point detected, skipping empty operation..."
else:
if self.settings["spec_prefix"]+"/empty" in self.settings:
@@ -1210,11 +1220,11 @@ class generic_stage_target(generic_target):
os.makedirs(myemp,0755)
os.chown(myemp,mystat[ST_UID],mystat[ST_GID])
os.chmod(myemp,mystat[ST_MODE])
- touch(self.settings["autoresume_path"]+"empty")
+ touch(empty_resume)
def remove(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"remove"):
+ remove_resume = pjoin(self.settings["autoresume_path"], "remove")
+ if "AUTORESUME" in self.settings and os.path.exists(remove_resume):
print "Resume point detected, skipping remove operation..."
else:
if self.settings["spec_prefix"]+"/rm" in self.settings:
@@ -1229,29 +1239,29 @@ class generic_stage_target(generic_target):
if os.path.exists(self.settings["controller_file"]):
cmd("/bin/bash "+self.settings["controller_file"]+\
" clean","Clean failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"remove")
+ touch(remove_resume)
except:
self.unbind()
raise
def preclean(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"preclean"):
+ preclean_resume = pjoin(self.settings["autoresume_path"], "preclean")
+ if "AUTORESUME" in self.settings and os.path.exists(preclean_resume):
print "Resume point detected, skipping preclean operation..."
else:
try:
if os.path.exists(self.settings["controller_file"]):
cmd("/bin/bash "+self.settings["controller_file"]+\
" preclean","preclean script failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"preclean")
+ touch(preclean_resume)
except:
self.unbind()
raise CatalystError, "Build failed, could not execute preclean"
def capture(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"capture"):
+ capture_resume = pjoin(self.settings["autoresume_path"], "capture")
+ if "AUTORESUME" in self.settings and os.path.exists(capture_resume):
print "Resume point detected, skipping capture operation..."
else:
""" Capture target in a tarball """
@@ -1272,18 +1282,18 @@ class generic_stage_target(generic_target):
self.gen_contents_file(self.settings["target_path"])
self.gen_digest_file(self.settings["target_path"])
- touch(self.settings["autoresume_path"]+"capture")
+ touch(capture_resume)
def run_local(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"run_local"):
+ run_local_resume = pjoin(self.settings["autoresume_path"], "run_local")
+ if "AUTORESUME" in self.settings and os.path.exists(run_local_resume):
print "Resume point detected, skipping run_local operation..."
else:
try:
if os.path.exists(self.settings["controller_file"]):
cmd("/bin/bash "+self.settings["controller_file"]+" run",\
"run script failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"run_local")
+ touch(run_local_resume)
except CatalystError:
self.unbind()
@@ -1350,8 +1360,8 @@ class generic_stage_target(generic_target):
self.chroot_lock.unlock()
def unmerge(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"unmerge"):
+ unmerge_resume = pjoin(self.settings["autoresume_path"], "unmerge")
+ if "AUTORESUME" in self.settings and os.path.exists(unmerge_resume):
print "Resume point detected, skipping unmerge operation..."
else:
if self.settings["spec_prefix"]+"/unmerge" in self.settings:
@@ -1379,22 +1389,25 @@ class generic_stage_target(generic_target):
except CatalystError:
self.unbind()
raise
- touch(self.settings["autoresume_path"]+"unmerge")
+ touch(unmerge_resume)
def target_setup(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"target_setup"):
+ target_setup_resume = pjoin(self.settings["autoresume_path"],
+ "target_setup")
+ if "AUTORESUME" in self.settings and os.path.exists(target_setup_resume):
print "Resume point detected, skipping target_setup operation..."
else:
print "Setting up filesystems per filesystem type"
cmd("/bin/bash "+self.settings["controller_file"]+\
" target_image_setup "+ self.settings["target_path"],\
"target_image_setup script failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"target_setup")
+ touch(target_setup_resume)
def setup_overlay(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"setup_overlay"):
+ setup_overlay_resume = pjoin(self.settings["autoresume_path"],
+ "setup_overlay")
+ if "AUTORESUME" in self.settings and \
+ os.path.exists(setup_overlay_resume):
print "Resume point detected, skipping setup_overlay operation..."
else:
if self.settings["spec_prefix"]+"/overlay" in self.settings:
@@ -1404,11 +1417,11 @@ class generic_stage_target(generic_target):
self.settings["target_path"],\
self.settings["spec_prefix"]+"overlay: "+x+\
" copy failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"setup_overlay")
+ touch(setup_overlay_resume)
def create_iso(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"create_iso"):
+ create_iso_resume = pjoin(self.settings["autoresume_path"], "create_iso")
+ if "AUTORESUME" in self.settings and os.path.exists(create_iso_resume):
print "Resume point detected, skipping create_iso operation..."
else:
""" Create the ISO """
@@ -1418,15 +1431,16 @@ class generic_stage_target(generic_target):
env=self.env)
self.gen_contents_file(self.settings["iso"])
self.gen_digest_file(self.settings["iso"])
- touch(self.settings["autoresume_path"]+"create_iso")
+ touch(create_iso_resume)
else:
print "WARNING: livecd/iso was not defined."
print "An ISO Image will not be created."
def build_packages(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+\
- "build_packages"):
+ build_packages_resume = pjoin(self.settings["autoresume_path"],
+ "build_packages")
+ if "AUTORESUME" in self.settings and \
+ os.path.exists(build_packages_resume):
print "Resume point detected, skipping build_packages operation..."
else:
if self.settings["spec_prefix"]+"/packages" in self.settings:
@@ -1442,7 +1456,7 @@ class generic_stage_target(generic_target):
cmd("/bin/bash "+self.settings["controller_file"]+\
" build_packages "+mypack,\
"Error in attempt to build packages",env=self.env)
- touch(self.settings["autoresume_path"]+"build_packages")
+ touch(build_packages_resume)
except CatalystError:
self.unbind()
raise CatalystError,self.settings["spec_prefix"]+\
@@ -1450,8 +1464,9 @@ class generic_stage_target(generic_target):
def build_kernel(self):
"Build all configured kernels"
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"build_kernel"):
+ build_kernel_resume = pjoin(self.settings["autoresume_path"],
+ "build_kernel")
+ if "AUTORESUME" in self.settings and os.path.exists(build_kernel_resume):
print "Resume point detected, skipping build_kernel operation..."
else:
if "boot/kernel" in self.settings:
@@ -1467,7 +1482,7 @@ class generic_stage_target(generic_target):
env=self.env)
for kname in mynames:
self._build_kernel(kname=kname)
- touch(self.settings["autoresume_path"]+"build_kernel")
+ touch(build_kernel_resume)
except CatalystError:
self.unbind()
raise CatalystError,\
@@ -1475,9 +1490,9 @@ class generic_stage_target(generic_target):
def _build_kernel(self, kname):
"Build a single configured kernel by name"
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]\
- +"build_kernel_"+kname):
+ kname_resume = pjoin(self.settings["autoresume_path"],
+ "build_kernel_" + kname)
+ if "AUTORESUME" in self.settings and os.path.exists(kname_resume):
print "Resume point detected, skipping build_kernel for "+kname+" operation..."
return
self._copy_kernel_config(kname=kname)
@@ -1519,8 +1534,7 @@ class generic_stage_target(generic_target):
cmd("rm -R "+self.settings["chroot_path"]+\
"/tmp/initramfs_overlay/",env=self.env)
- touch(self.settings["autoresume_path"]+\
- "build_kernel_"+kname)
+ touch(kname_resume)
"""
Execute the script that cleans up the kernel build
@@ -1573,29 +1587,30 @@ class generic_stage_target(generic_target):
"/initramfs_overlay"],env=self.env)
def bootloader(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"bootloader"):
+ bootloader_resume = pjoin(self.settings["autoresume_path"], "bootloader")
+ if "AUTORESUME" in self.settings and os.path.exists(bootloader_resume):
print "Resume point detected, skipping bootloader operation..."
else:
try:
cmd("/bin/bash "+self.settings["controller_file"]+\
" bootloader " + self.settings["target_path"],\
"Bootloader script failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"bootloader")
+ touch(bootloader_resume)
except CatalystError:
self.unbind()
raise CatalystError,"Script aborting due to error."
def livecd_update(self):
+ livecd_update_resume = pjoin(self.settings["autoresume_path"],
+ "livecd_update")
if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+\
- "livecd_update"):
+ and os.path.exists(livecd_update_resume):
print "Resume point detected, skipping build_packages operation..."
else:
try:
cmd("/bin/bash "+self.settings["controller_file"]+\
" livecd-update","livecd-update failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"livecd_update")
+ touch(livecd_update_resume)
except CatalystError:
self.unbind()
^ permalink raw reply related [flat|nested] 57+ messages in thread
* [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/
2014-04-02 20:09 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
@ 2014-04-02 20:09 ` Brian Dolbec
0 siblings, 0 replies; 57+ messages in thread
From: Brian Dolbec @ 2014-04-02 20:09 UTC (permalink / raw
To: gentoo-commits
commit: d7c96f12c2c20165ab0b8c410366846a91e859da
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 30 06:14:48 2013 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Wed Apr 2 20:04:22 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=d7c96f12
Fix autoresume file paths to only be configured once.
Use: pjoin as a shorter alias to os.path.join()
---
catalyst/targets/generic_stage_target.py | 175 +++++++++++++++++--------------
1 file changed, 95 insertions(+), 80 deletions(-)
diff --git a/catalyst/targets/generic_stage_target.py b/catalyst/targets/generic_stage_target.py
index 2b3d7ce..9c39d00 100644
--- a/catalyst/targets/generic_stage_target.py
+++ b/catalyst/targets/generic_stage_target.py
@@ -33,6 +33,9 @@ SOURCE_MOUNTS_DEFAULTS = {
"shm": "shmfs",
}
+# for convienience
+pjoin = os.path.join
+
class generic_stage_target(generic_target):
"""
@@ -334,9 +337,10 @@ class generic_stage_target(generic_target):
def set_target_path(self):
self.settings["target_path"]=normpath(self.settings["storedir"]+\
"/builds/"+self.settings["target_subpath"]+".tar.bz2")
- if "AUTORESUME" in self.settings\
- and os.path.exists(self.settings["autoresume_path"]+\
- "setup_target_path"):
+ setup_target_path_resume = pjoin(self.settings["autoresume_path"],
+ "setup_target_path")
+ if "AUTORESUME" in self.settings and \
+ os.path.exists(setup_target_path_resume):
print \
"Resume point detected, skipping target path setup operation..."
else:
@@ -348,7 +352,7 @@ class generic_stage_target(generic_target):
# cmd("rm -f "+self.settings["target_path"],\
# "Could not remove existing file: "\
# +self.settings["target_path"],env=self.env)
- touch(self.settings["autoresume_path"]+"setup_target_path")
+ touch(setup_target_path_resume)
if not os.path.exists(self.settings["storedir"]+"/builds/"):
os.makedirs(self.settings["storedir"]+"/builds/")
@@ -484,10 +488,12 @@ class generic_stage_target(generic_target):
self.chroot_lock=LockDir(self.settings["chroot_path"])
def set_autoresume_path(self):
- self.settings["autoresume_path"]=normpath(self.settings["storedir"]+\
- "/tmp/"+self.settings["rel_type"]+"/"+".autoresume-"+\
- self.settings["target"]+"-"+self.settings["subarch"]+"-"+\
- self.settings["version_stamp"]+"/")
+ self.settings["autoresume_path"] = normpath(pjoin(
+ self.settings["storedir"], "tmp", self.settings["rel_type"],
+ ".autoresume-%s-%s-%s"
+ %(self.settings["target"], self.settings["subarch"],
+ self.settings["version_stamp"])
+ ))
if "AUTORESUME" in self.settings:
print "The autoresume path is " + self.settings["autoresume_path"]
if not os.path.exists(self.settings["autoresume_path"]):
@@ -673,8 +679,8 @@ class generic_stage_target(generic_target):
def unpack(self):
unpack=True
- clst_unpack_hash=read_from_clst(self.settings["autoresume_path"]+\
- "unpack")
+ unpack_resume = pjoin(self.settings["autoresume_path"], "unpack")
+ clst_unpack_hash=read_from_clst(unpack_resume)
if "SEEDCACHE" in self.settings:
if os.path.isdir(self.settings["source_path"]):
@@ -720,7 +726,7 @@ class generic_stage_target(generic_target):
if "AUTORESUME" in self.settings:
if os.path.isdir(self.settings["source_path"]) \
- and os.path.exists(self.settings["autoresume_path"]+"unpack"):
+ and os.path.exists(unpack_resume):
""" Autoresume is valid, SEEDCACHE is valid """
unpack=False
invalid_snapshot=False
@@ -732,8 +738,7 @@ class generic_stage_target(generic_target):
invalid_snapshot=True
elif os.path.isdir(self.settings["source_path"]) \
- and not os.path.exists(self.settings["autoresume_path"]+\
- "unpack"):
+ and not os.path.exists(unpack_resume):
""" Autoresume is invalid, SEEDCACHE """
unpack=True
invalid_snapshot=False
@@ -793,18 +798,19 @@ class generic_stage_target(generic_target):
cmd(unpack_cmd,error_msg,env=self.env)
if "source_path_hash" in self.settings:
- myf=open(self.settings["autoresume_path"]+"unpack","w")
+ myf=open(unpack_resume,"w")
myf.write(self.settings["source_path_hash"])
myf.close()
else:
- touch(self.settings["autoresume_path"]+"unpack")
+ touch(unpack_resume)
else:
print "Resume point detected, skipping unpack operation..."
def unpack_snapshot(self):
unpack=True
- snapshot_hash=read_from_clst(self.settings["autoresume_path"]+\
+ unpack_portage_resume = pjoin(self.settings["autoresume_path"],
"unpack_portage")
+ snapshot_hash=read_from_clst(unpack_portage_resume)
if "SNAPCACHE" in self.settings:
snapshot_cache_hash=\
@@ -841,8 +847,7 @@ class generic_stage_target(generic_target):
if "AUTORESUME" in self.settings \
and os.path.exists(self.settings["chroot_path"]+\
self.settings["portdir"]) \
- and os.path.exists(self.settings["autoresume_path"]\
- +"unpack_portage") \
+ and os.path.exists(unpack_portage_resume) \
and self.settings["snapshot_path_hash"] == snapshot_hash:
print \
"Valid Resume point detected, skipping unpack of portage tree..."
@@ -868,7 +873,7 @@ class generic_stage_target(generic_target):
myf.close()
else:
print "Setting snapshot autoresume point"
- myf=open(self.settings["autoresume_path"]+"unpack_portage","w")
+ myf=open(unpack_portage_resume,"w")
myf.write(self.settings["snapshot_path_hash"])
myf.close()
@@ -876,9 +881,10 @@ class generic_stage_target(generic_target):
self.snapshot_lock_object.unlock()
def config_profile_link(self):
+ config_protect_link_resume = pjoin(self.settings["autoresume_path"],
+ "config_profile_link")
if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+\
- "config_profile_link"):
+ and os.path.exists(config_protect_link_resume):
print \
"Resume point detected, skipping config_profile_link operation..."
else:
@@ -892,12 +898,13 @@ class generic_stage_target(generic_target):
self.settings["target_profile"]+" "+\
self.settings["chroot_path"]+"/etc/portage/make.profile",\
"Error creating profile link",env=self.env)
- touch(self.settings["autoresume_path"]+"config_profile_link")
+ touch(config_protect_link_resume)
def setup_confdir(self):
+ setup_confdir_resume = pjoin(self.settings["autoresume_path"],
+ "setup_confdir")
if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+\
- "setup_confdir"):
+ and os.path.exists(setup_confdir_resume):
print "Resume point detected, skipping setup_confdir operation..."
else:
if "portage_confdir" in self.settings:
@@ -905,7 +912,7 @@ class generic_stage_target(generic_target):
cmd("rsync -a "+self.settings["portage_confdir"]+"/ "+\
self.settings["chroot_path"]+"/etc/portage/",\
"Error copying /etc/portage",env=self.env)
- touch(self.settings["autoresume_path"]+"setup_confdir")
+ touch(setup_confdir_resume)
def portage_overlay(self):
""" We copy the contents of our overlays to /usr/local/portage """
@@ -1029,8 +1036,9 @@ class generic_stage_target(generic_target):
self.override_cflags()
self.override_cxxflags()
self.override_ldflags()
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"chroot_setup"):
+ chroot_setup_resume = pjoin(self.settings["autoresume_path"],
+ "chroot_setup")
+ if "AUTORESUME" in self.settings and os.path.exists(chroot_setup_resume):
print "Resume point detected, skipping chroot_setup operation..."
else:
print "Setting up chroot..."
@@ -1126,32 +1134,34 @@ class generic_stage_target(generic_target):
cmd("cp "+self.settings["chroot_path"]+"/etc/portage/make.conf "+\
self.settings["chroot_path"]+"/etc/portage/make.conf.catalyst",\
"Could not backup /etc/portage/make.conf",env=self.env)
- touch(self.settings["autoresume_path"]+"chroot_setup")
+ touch(chroot_setup_resume)
def fsscript(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"fsscript"):
+ fsscript_resume = pjoin(self.settings["autoresume_path"], "fsscript")
+ if "AUTORESUME" in self.settings and os.path.exists(fsscript_resume):
print "Resume point detected, skipping fsscript operation..."
else:
if "fsscript" in self.settings:
if os.path.exists(self.settings["controller_file"]):
cmd("/bin/bash "+self.settings["controller_file"]+\
" fsscript","fsscript script failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"fsscript")
+ touch(fsscript_resume)
def rcupdate(self):
+ rcupdate_resume = pjoin(self.settings["autoresume_path"], "rcupdate")
if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"rcupdate"):
+ and os.path.exists(rcupdate_resume):
print "Resume point detected, skipping rcupdate operation..."
else:
if os.path.exists(self.settings["controller_file"]):
cmd("/bin/bash "+self.settings["controller_file"]+" rc-update",\
"rc-update script failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"rcupdate")
+ touch(rcupdate_resume)
def clean(self):
+ clean_resume = pjoin(self.settings["autoresume_path"], "clean")
if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"clean"):
+ and os.path.exists(clean_resume):
print "Resume point detected, skipping clean operation..."
else:
for x in self.settings["cleanables"]:
@@ -1182,11 +1192,11 @@ class generic_stage_target(generic_target):
if os.path.exists(self.settings["controller_file"]):
cmd("/bin/bash "+self.settings["controller_file"]+" clean",\
"clean script failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"clean")
+ touch(clean_resume)
def empty(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"empty"):
+ empty_resume = pjoin(self.settings["autoresume_path"], "empty")
+ if "AUTORESUME" in self.settings and os.path.exists(empty_resume):
print "Resume point detected, skipping empty operation..."
else:
if self.settings["spec_prefix"]+"/empty" in self.settings:
@@ -1210,11 +1220,11 @@ class generic_stage_target(generic_target):
os.makedirs(myemp,0755)
os.chown(myemp,mystat[ST_UID],mystat[ST_GID])
os.chmod(myemp,mystat[ST_MODE])
- touch(self.settings["autoresume_path"]+"empty")
+ touch(empty_resume)
def remove(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"remove"):
+ remove_resume = pjoin(self.settings["autoresume_path"], "remove")
+ if "AUTORESUME" in self.settings and os.path.exists(remove_resume):
print "Resume point detected, skipping remove operation..."
else:
if self.settings["spec_prefix"]+"/rm" in self.settings:
@@ -1229,29 +1239,29 @@ class generic_stage_target(generic_target):
if os.path.exists(self.settings["controller_file"]):
cmd("/bin/bash "+self.settings["controller_file"]+\
" clean","Clean failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"remove")
+ touch(remove_resume)
except:
self.unbind()
raise
def preclean(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"preclean"):
+ preclean_resume = pjoin(self.settings["autoresume_path"], "preclean")
+ if "AUTORESUME" in self.settings and os.path.exists(preclean_resume):
print "Resume point detected, skipping preclean operation..."
else:
try:
if os.path.exists(self.settings["controller_file"]):
cmd("/bin/bash "+self.settings["controller_file"]+\
" preclean","preclean script failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"preclean")
+ touch(preclean_resume)
except:
self.unbind()
raise CatalystError, "Build failed, could not execute preclean"
def capture(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"capture"):
+ capture_resume = pjoin(self.settings["autoresume_path"], "capture")
+ if "AUTORESUME" in self.settings and os.path.exists(capture_resume):
print "Resume point detected, skipping capture operation..."
else:
""" Capture target in a tarball """
@@ -1272,18 +1282,18 @@ class generic_stage_target(generic_target):
self.gen_contents_file(self.settings["target_path"])
self.gen_digest_file(self.settings["target_path"])
- touch(self.settings["autoresume_path"]+"capture")
+ touch(capture_resume)
def run_local(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"run_local"):
+ run_local_resume = pjoin(self.settings["autoresume_path"], "run_local")
+ if "AUTORESUME" in self.settings and os.path.exists(run_local_resume):
print "Resume point detected, skipping run_local operation..."
else:
try:
if os.path.exists(self.settings["controller_file"]):
cmd("/bin/bash "+self.settings["controller_file"]+" run",\
"run script failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"run_local")
+ touch(run_local_resume)
except CatalystError:
self.unbind()
@@ -1350,8 +1360,8 @@ class generic_stage_target(generic_target):
self.chroot_lock.unlock()
def unmerge(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"unmerge"):
+ unmerge_resume = pjoin(self.settings["autoresume_path"], "unmerge")
+ if "AUTORESUME" in self.settings and os.path.exists(unmerge_resume):
print "Resume point detected, skipping unmerge operation..."
else:
if self.settings["spec_prefix"]+"/unmerge" in self.settings:
@@ -1379,22 +1389,25 @@ class generic_stage_target(generic_target):
except CatalystError:
self.unbind()
raise
- touch(self.settings["autoresume_path"]+"unmerge")
+ touch(unmerge_resume)
def target_setup(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"target_setup"):
+ target_setup_resume = pjoin(self.settings["autoresume_path"],
+ "target_setup")
+ if "AUTORESUME" in self.settings and os.path.exists(target_setup_resume):
print "Resume point detected, skipping target_setup operation..."
else:
print "Setting up filesystems per filesystem type"
cmd("/bin/bash "+self.settings["controller_file"]+\
" target_image_setup "+ self.settings["target_path"],\
"target_image_setup script failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"target_setup")
+ touch(target_setup_resume)
def setup_overlay(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"setup_overlay"):
+ setup_overlay_resume = pjoin(self.settings["autoresume_path"],
+ "setup_overlay")
+ if "AUTORESUME" in self.settings and \
+ os.path.exists(setup_overlay_resume):
print "Resume point detected, skipping setup_overlay operation..."
else:
if self.settings["spec_prefix"]+"/overlay" in self.settings:
@@ -1404,11 +1417,11 @@ class generic_stage_target(generic_target):
self.settings["target_path"],\
self.settings["spec_prefix"]+"overlay: "+x+\
" copy failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"setup_overlay")
+ touch(setup_overlay_resume)
def create_iso(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"create_iso"):
+ create_iso_resume = pjoin(self.settings["autoresume_path"], "create_iso")
+ if "AUTORESUME" in self.settings and os.path.exists(create_iso_resume):
print "Resume point detected, skipping create_iso operation..."
else:
""" Create the ISO """
@@ -1418,15 +1431,16 @@ class generic_stage_target(generic_target):
env=self.env)
self.gen_contents_file(self.settings["iso"])
self.gen_digest_file(self.settings["iso"])
- touch(self.settings["autoresume_path"]+"create_iso")
+ touch(create_iso_resume)
else:
print "WARNING: livecd/iso was not defined."
print "An ISO Image will not be created."
def build_packages(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+\
- "build_packages"):
+ build_packages_resume = pjoin(self.settings["autoresume_path"],
+ "build_packages")
+ if "AUTORESUME" in self.settings and \
+ os.path.exists(build_packages_resume):
print "Resume point detected, skipping build_packages operation..."
else:
if self.settings["spec_prefix"]+"/packages" in self.settings:
@@ -1442,7 +1456,7 @@ class generic_stage_target(generic_target):
cmd("/bin/bash "+self.settings["controller_file"]+\
" build_packages "+mypack,\
"Error in attempt to build packages",env=self.env)
- touch(self.settings["autoresume_path"]+"build_packages")
+ touch(build_packages_resume)
except CatalystError:
self.unbind()
raise CatalystError,self.settings["spec_prefix"]+\
@@ -1450,8 +1464,9 @@ class generic_stage_target(generic_target):
def build_kernel(self):
"Build all configured kernels"
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"build_kernel"):
+ build_kernel_resume = pjoin(self.settings["autoresume_path"],
+ "build_kernel")
+ if "AUTORESUME" in self.settings and os.path.exists(build_kernel_resume):
print "Resume point detected, skipping build_kernel operation..."
else:
if "boot/kernel" in self.settings:
@@ -1467,7 +1482,7 @@ class generic_stage_target(generic_target):
env=self.env)
for kname in mynames:
self._build_kernel(kname=kname)
- touch(self.settings["autoresume_path"]+"build_kernel")
+ touch(build_kernel_resume)
except CatalystError:
self.unbind()
raise CatalystError,\
@@ -1475,9 +1490,9 @@ class generic_stage_target(generic_target):
def _build_kernel(self, kname):
"Build a single configured kernel by name"
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]\
- +"build_kernel_"+kname):
+ kname_resume = pjoin(self.settings["autoresume_path"],
+ "build_kernel_" + kname)
+ if "AUTORESUME" in self.settings and os.path.exists(kname_resume):
print "Resume point detected, skipping build_kernel for "+kname+" operation..."
return
self._copy_kernel_config(kname=kname)
@@ -1519,8 +1534,7 @@ class generic_stage_target(generic_target):
cmd("rm -R "+self.settings["chroot_path"]+\
"/tmp/initramfs_overlay/",env=self.env)
- touch(self.settings["autoresume_path"]+\
- "build_kernel_"+kname)
+ touch(kname_resume)
"""
Execute the script that cleans up the kernel build
@@ -1573,29 +1587,30 @@ class generic_stage_target(generic_target):
"/initramfs_overlay"],env=self.env)
def bootloader(self):
- if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+"bootloader"):
+ bootloader_resume = pjoin(self.settings["autoresume_path"], "bootloader")
+ if "AUTORESUME" in self.settings and os.path.exists(bootloader_resume):
print "Resume point detected, skipping bootloader operation..."
else:
try:
cmd("/bin/bash "+self.settings["controller_file"]+\
" bootloader " + self.settings["target_path"],\
"Bootloader script failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"bootloader")
+ touch(bootloader_resume)
except CatalystError:
self.unbind()
raise CatalystError,"Script aborting due to error."
def livecd_update(self):
+ livecd_update_resume = pjoin(self.settings["autoresume_path"],
+ "livecd_update")
if "AUTORESUME" in self.settings \
- and os.path.exists(self.settings["autoresume_path"]+\
- "livecd_update"):
+ and os.path.exists(livecd_update_resume):
print "Resume point detected, skipping build_packages operation..."
else:
try:
cmd("/bin/bash "+self.settings["controller_file"]+\
" livecd-update","livecd-update failed.",env=self.env)
- touch(self.settings["autoresume_path"]+"livecd_update")
+ touch(livecd_update_resume)
except CatalystError:
self.unbind()
^ permalink raw reply related [flat|nested] 57+ messages in thread
end of thread, other threads:[~2024-10-13 20:33 UTC | newest]
Thread overview: 57+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-11 17:26 [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/ Mike Frysinger
-- strict thread matches above, loose matches on Subject: below --
2024-10-13 20:33 Andreas K. Hüttel
2024-10-13 20:33 Andreas K. Hüttel
2024-08-03 11:01 Andreas K. Hüttel
2024-08-03 9:06 Andreas K. Hüttel
2024-07-30 15:29 Andreas K. Hüttel
2024-07-30 15:28 Andreas K. Hüttel
2024-07-30 14:54 Andreas K. Hüttel
2024-07-30 14:45 Andreas K. Hüttel
2024-07-30 11:06 Andreas K. Hüttel
2024-07-30 11:06 Andreas K. Hüttel
2022-11-20 0:21 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2022-04-02 23:50 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2021-02-21 2:05 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-10-29 21:00 [gentoo-commits] proj/catalyst:wip/mattst88 " Matt Turner
2020-10-24 22:07 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2020-10-24 22:07 Matt Turner
2020-10-23 4:36 [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-10-24 22:07 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2020-06-05 21:13 Matt Turner
2020-06-05 21:13 Matt Turner
2020-05-20 3:39 [gentoo-commits] proj/catalyst:pending/mattst88 " Matt Turner
2020-05-17 22:54 ` [gentoo-commits] proj/catalyst:master " Matt Turner
2020-05-16 6:43 Matt Turner
2020-05-16 6:43 Matt Turner
2019-10-11 16:02 Ben Kohler
2019-07-01 15:35 Rick Farina
2018-10-01 16:30 Brian Dolbec
2018-07-21 18:54 Brian Dolbec
2018-04-05 18:21 Richard Farina
2018-01-04 19:09 Brian Dolbec
2017-12-18 16:57 Richard Farina
2017-11-29 17:20 Brian Dolbec
2016-03-21 5:09 Mike Frysinger
2015-12-23 4:30 Brian Dolbec
2015-12-15 17:13 Brian Dolbec
2015-12-15 17:13 Brian Dolbec
2015-12-15 17:13 Brian Dolbec
2015-12-15 17:13 Brian Dolbec
2015-12-15 17:13 Brian Dolbec
2015-11-12 16:24 Brian Dolbec
2015-10-11 17:26 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-11 17:26 Mike Frysinger
2015-10-09 21:06 Mike Frysinger
2015-10-08 22:09 Mike Frysinger
2015-10-08 3:53 Mike Frysinger
2015-10-06 15:31 Mike Frysinger
2015-09-15 21:48 Richard Farina
2015-09-09 17:42 Brian Dolbec
2015-02-26 20:12 Brian Dolbec
2015-02-26 19:25 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-02-26 20:12 ` [gentoo-commits] proj/catalyst:master " 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
2015-01-01 5:59 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-02-26 4:12 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2014-05-05 19:17 Brian Dolbec
2014-04-02 20:09 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2014-04-02 20:09 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2014-04-02 20:09 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2014-04-02 20:09 ` [gentoo-commits] proj/catalyst:master " Brian Dolbec
2014-04-02 20:09 [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2014-04-02 20:09 ` [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