* [gentoo-catalyst] [PATCH 1/5] catalyst: Fix indentation
@ 2020-10-23 4:50 Matt Turner
2020-10-23 4:50 ` [gentoo-catalyst] [PATCH 2/5] catalyst: Drop stray vim modeline Matt Turner
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Matt Turner @ 2020-10-23 4:50 UTC (permalink / raw
To: gentoo-catalyst; +Cc: Matt Turner
This code was initially committed with tabs and didn't work. I ran
autopep8 on it but did not realize that the indentation was still
incorrect.
Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
catalyst/base/stagebase.py | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index be7b96c8..603e49d9 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1132,16 +1132,16 @@ class StageBase(TargetBase, ClearBase, GenBase):
if os.path.exists(hosts_file + '.catalyst'):
os.rename(hosts_file + '.catalyst', hosts_file)
- # optionally clean up binary interpreter
- if "interpreter" in self.settings:
- if os.path.exists(self.settings['chroot_path'] + '/' + self.settings['interpreter'] + '.catalyst'):
- os.rename(
- self.settings['chroot_path'] + '/' +
- self.settings['interpreter'] + '.catalyst',
- self.settings['chroot_path'] + '/' + self.settings['interpreter'])
- else:
- os.remove(
- self.settings['chroot_path'] + '/' + self.settings['interpreter'])
+ # optionally clean up binary interpreter
+ if "interpreter" in self.settings:
+ if os.path.exists(self.settings['chroot_path'] + '/' + self.settings['interpreter'] + '.catalyst'):
+ os.rename(
+ self.settings['chroot_path'] + '/' +
+ self.settings['interpreter'] + '.catalyst',
+ self.settings['chroot_path'] + '/' + self.settings['interpreter'])
+ else:
+ os.remove(
+ self.settings['chroot_path'] + '/' + self.settings['interpreter'])
# optionally clean up portage configs
if ("portage_prefix" in self.settings and
--
2.26.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-catalyst] [PATCH 2/5] catalyst: Drop stray vim modeline
2020-10-23 4:50 [gentoo-catalyst] [PATCH 1/5] catalyst: Fix indentation Matt Turner
@ 2020-10-23 4:50 ` Matt Turner
2020-10-23 4:50 ` [gentoo-catalyst] [PATCH 3/5] catalyst: Drop useless stage3 set_cleanables() Matt Turner
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Matt Turner @ 2020-10-23 4:50 UTC (permalink / raw
To: gentoo-catalyst; +Cc: Matt Turner
This was the only one in catalyst. We should have an EditorConfig file
instead.
Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
catalyst/base/stagebase.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 603e49d9..e71ce344 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1611,5 +1611,3 @@ class StageBase(TargetBase, ClearBase, GenBase):
@staticmethod
def _debug_pause_():
input("press any key to continue: ")
-
-# vim: ts=4 sw=4 sta et sts=4 ai
--
2.26.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-catalyst] [PATCH 3/5] catalyst: Drop useless stage3 set_cleanables()
2020-10-23 4:50 [gentoo-catalyst] [PATCH 1/5] catalyst: Fix indentation Matt Turner
2020-10-23 4:50 ` [gentoo-catalyst] [PATCH 2/5] catalyst: Drop stray vim modeline Matt Turner
@ 2020-10-23 4:50 ` Matt Turner
2020-10-23 4:50 ` [gentoo-catalyst] [PATCH 4/5] catalyst: Explicitly keep /etc/resolv.conf in stage4 Matt Turner
2020-10-23 4:50 ` [gentoo-catalyst] [PATCH 5/5] catalyst: Don't delete /usr/share/zoneinfo from stage1 Matt Turner
3 siblings, 0 replies; 5+ messages in thread
From: Matt Turner @ 2020-10-23 4:50 UTC (permalink / raw
To: gentoo-catalyst; +Cc: Matt Turner
Signed-off-by: Matt Turner <mattst88@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)
--
2.26.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-catalyst] [PATCH 4/5] catalyst: Explicitly keep /etc/resolv.conf in stage4
2020-10-23 4:50 [gentoo-catalyst] [PATCH 1/5] catalyst: Fix indentation Matt Turner
2020-10-23 4:50 ` [gentoo-catalyst] [PATCH 2/5] catalyst: Drop stray vim modeline Matt Turner
2020-10-23 4:50 ` [gentoo-catalyst] [PATCH 3/5] catalyst: Drop useless stage3 set_cleanables() Matt Turner
@ 2020-10-23 4:50 ` Matt Turner
2020-10-23 4:50 ` [gentoo-catalyst] [PATCH 5/5] catalyst: Don't delete /usr/share/zoneinfo from stage1 Matt Turner
3 siblings, 0 replies; 5+ messages in thread
From: Matt Turner @ 2020-10-23 4:50 UTC (permalink / raw
To: gentoo-catalyst; +Cc: Matt Turner
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@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'] = [
--
2.26.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-catalyst] [PATCH 5/5] catalyst: Don't delete /usr/share/zoneinfo from stage1
2020-10-23 4:50 [gentoo-catalyst] [PATCH 1/5] catalyst: Fix indentation Matt Turner
` (2 preceding siblings ...)
2020-10-23 4:50 ` [gentoo-catalyst] [PATCH 4/5] catalyst: Explicitly keep /etc/resolv.conf in stage4 Matt Turner
@ 2020-10-23 4:50 ` Matt Turner
3 siblings, 0 replies; 5+ messages in thread
From: Matt Turner @ 2020-10-23 4:50 UTC (permalink / raw
To: gentoo-catalyst; +Cc: Matt Turner
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@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 :-(
--
2.26.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-10-23 4:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-23 4:50 [gentoo-catalyst] [PATCH 1/5] catalyst: Fix indentation Matt Turner
2020-10-23 4:50 ` [gentoo-catalyst] [PATCH 2/5] catalyst: Drop stray vim modeline Matt Turner
2020-10-23 4:50 ` [gentoo-catalyst] [PATCH 3/5] catalyst: Drop useless stage3 set_cleanables() Matt Turner
2020-10-23 4:50 ` [gentoo-catalyst] [PATCH 4/5] catalyst: Explicitly keep /etc/resolv.conf in stage4 Matt Turner
2020-10-23 4:50 ` [gentoo-catalyst] [PATCH 5/5] catalyst: Don't delete /usr/share/zoneinfo from stage1 Matt Turner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox