From: Matt Turner <mattst88@gentoo.org>
To: gentoo-catalyst@lists.gentoo.org
Cc: Matt Turner <mattst88@gentoo.org>
Subject: [gentoo-catalyst] [PATCH 2/7] catalyst: Remove set_dest_path()
Date: Sat, 19 Dec 2020 21:28:43 -0500 [thread overview]
Message-ID: <20201220022848.249207-2-mattst88@gentoo.org> (raw)
In-Reply-To: <20201220022848.249207-1-mattst88@gentoo.org>
root_path is always set, so half of this function was dead. The other
half set the same thing as set_stage_path().
Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
catalyst/base/stagebase.py | 20 ++++++--------------
targets/support/target_image_setup.sh | 4 ++--
2 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index ba6b1a1b..ed4d1227 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -154,7 +154,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
self.set_source_path()
self.set_chroot_path()
self.set_autoresume_path()
- self.set_dest_path()
self.set_stage_path()
self.set_target_path()
@@ -426,13 +425,6 @@ class StageBase(TargetBase, ClearBase, GenBase):
self.generate_hash(self.settings["source_path"], "sha1")
log.notice('Source path set to %s', self.settings['source_path'])
- def set_dest_path(self):
- if "root_path" in self.settings:
- self.settings["destpath"] = normpath(self.settings["chroot_path"] +
- self.settings["root_path"])
- else:
- self.settings["destpath"] = normpath(self.settings["chroot_path"])
-
def set_cleanables(self):
self.settings['cleanables'] = [
"/etc/resolv.conf",
@@ -845,7 +837,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
"/root_overlay"]:
if os.path.exists(x):
log.info('Copying root_overlay: %s', x)
- cmd(['rsync', '-a', x + '/', self.settings['destpath']],
+ cmd(['rsync', '-a', x + '/', self.settings['stage_path']],
env=self.env)
def bind(self):
@@ -1095,7 +1087,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
else:
for x in self.settings["cleanables"]:
log.notice('Cleaning chroot: %s', x)
- clear_path(normpath(self.settings["destpath"] + x))
+ clear_path(normpath(self.settings["stage_path"] + x))
# Put /etc/hosts back into place
hosts_file = self.settings['chroot_path'] + '/etc/hosts'
@@ -1119,14 +1111,14 @@ class StageBase(TargetBase, ClearBase, GenBase):
log.debug("clean(), portage_preix = %s, no sticky-config",
self.settings["portage_prefix"])
for _dir in "package.accept_keywords", "package.keywords", "package.mask", "package.unmask", "package.use", "package.env", "env":
- target = pjoin(self.settings["destpath"],
+ target = pjoin(self.settings["stage_path"],
"etc/portage/%s" % _dir,
self.settings["portage_prefix"])
log.notice("Clearing portage_prefix target: %s", target)
clear_path(target)
# Remove hacks that should *never* go into stages
- target = pjoin(self.settings["destpath"], "etc/portage/patches")
+ target = pjoin(self.settings["stage_path"], "etc/portage/patches")
if os.path.exists(target):
log.warning("You've been hacking. Clearing target patches: %s", target)
clear_path(target)
@@ -1172,7 +1164,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
self.settings[self.settings["spec_prefix"] +
"/empty"].split()
for x in self.settings[self.settings["spec_prefix"] + "/empty"]:
- myemp = self.settings["destpath"] + x
+ myemp = self.settings["stage_path"] + x
if not os.path.isdir(myemp) or os.path.islink(myemp):
log.warning('not a directory or does not exist, '
'skipping "empty" operation: %s', x)
@@ -1192,7 +1184,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
# We're going to shell out for all these cleaning
# operations, so we get easy glob handling.
log.notice('%s: removing %s', self.settings["spec_prefix"], x)
- clear_path(self.settings["destpath"] + x)
+ clear_path(self.settings["stage_path"] + x)
try:
if os.path.exists(self.settings["controller_file"]):
cmd([self.settings['controller_file'], 'clean'],
diff --git a/targets/support/target_image_setup.sh b/targets/support/target_image_setup.sh
index fdc4a234..f9427eaf 100755
--- a/targets/support/target_image_setup.sh
+++ b/targets/support/target_image_setup.sh
@@ -7,11 +7,11 @@ mkdir -p "${1}"
echo "Creating ${clst_fstype} filesystem"
case ${clst_fstype} in
squashfs)
- gensquashfs -D "${clst_destpath}" -q ${clst_fsops} "${1}/image.squashfs" \
+ gensquashfs -D "${clst_stage_path}" -q ${clst_fsops} "${1}/image.squashfs" \
|| die "Failed to create squashfs filesystem"
;;
jffs2)
- mkfs.jffs2 --root="${clst_destpath}" --output="${1}/image.jffs" "${clst_fsops}" \
+ mkfs.jffs2 --root="${clst_stage_path}" --output="${1}/image.jffs" "${clst_fsops}" \
|| die "Failed to create jffs2 filesystem"
;;
esac
--
2.26.2
next prev parent reply other threads:[~2020-12-20 2:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-20 2:28 [gentoo-catalyst] [PATCH 1/7] catalyst: Set stage_path = chroot_path + root_path Matt Turner
2020-12-20 2:28 ` Matt Turner [this message]
2020-12-20 2:28 ` [gentoo-catalyst] [PATCH 3/7] catalyst: Remove some redundant set_stage_path()s Matt Turner
2020-12-20 2:28 ` [gentoo-catalyst] [PATCH 4/7] targets: Remove EBEEP_IGNORE / EPAUSE_IGNORE Matt Turner
2020-12-20 2:28 ` [gentoo-catalyst] [PATCH 5/7] targets: Pass separate arguments to run_merge() Matt Turner
2020-12-20 2:28 ` [gentoo-catalyst] [PATCH 6/7] targets: Remove make_destpath() function Matt Turner
2020-12-20 2:28 ` [gentoo-catalyst] [PATCH 7/7] targets: Emerge stage1 with --implicit-system-deps=n Matt Turner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201220022848.249207-2-mattst88@gentoo.org \
--to=mattst88@gentoo.org \
--cc=gentoo-catalyst@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox