From: Felix Bier <Felix.Bier@rohde-schwarz.com>
To: "gentoo-catalyst@lists.gentoo.org" <gentoo-catalyst@lists.gentoo.org>
Subject: [gentoo-catalyst] [PATCH 2/5] Rename config option 'portage_overlay' -> 'repos'
Date: Thu, 4 Feb 2021 00:35:52 +0000 [thread overview]
Message-ID: <3b390728d68d34123b63a956b3180704cb79d1e2.camel@rohde-schwarz.com> (raw)
This commit renames the config option 'portage_overlay' to 'repos'.
Also, it renames the method 'portage_overlay' to 'process_repos'
and 'set_portage_overlay' to 'set_repos'. Motivation:
1) The Gentoo wiki states 'repository' as the preferred term,
and 'overlay' only as a colloquial
(https://wiki.gentoo.org/wiki/Ebuild_repository),
reducing the distinction between the main repository
and other 'overlay' repositories.
3) This avoids confusion with filesystem overlays
(via the config option 'overlay' and 'root_overlay').
2) The plural form highlights the possibility of specifying
multiple repositories, continuing 2861038a.
Signed-off-by: Felix Bier <felix.bier@rohde-schwarz.com>
---
catalyst/base/stagebase.py | 30 ++++++++++++++--------------
catalyst/targets/livecd_stage2.py | 2 +-
catalyst/targets/stage1.py | 6 +++---
catalyst/targets/stage2.py | 6 +++---
catalyst/targets/stage3.py | 6 +++---
catalyst/targets/stage4.py | 2 +-
doc/catalyst-config.5.txt | 2 +-
doc/catalyst-spec.5.txt | 2 +-
examples/generic_stage_template.spec | 4 ++--
examples/livecd-stage1_template.spec | 4 ++--
examples/livecd-stage2_template.spec | 4 ++--
examples/netboot_template.spec | 4 ++--
examples/stage4_template.spec | 4 ++--
13 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 46cb1fda..fedc8f87 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -81,14 +81,14 @@ class StageBase(TargetBase, ClearBase, GenBase):
"ldflags",
"pkgcache_path",
"portage_confdir",
- "portage_overlay",
+ "repos",
"portage_prefix",
])
self.prepare_sequence = [
self.unpack,
self.config_profile_link,
self.setup_confdir,
- self.portage_overlay,
+ self.process_repos,
]
self.build_sequence = [
self.bind,
@@ -206,7 +206,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
self.set_linuxrc()
self.set_busybox_config()
self.set_overlay()
- self.set_portage_overlay()
+ self.set_repos()
self.set_root_overlay()
# This next line checks to make sure that the specified variables exist on disk.
@@ -586,13 +586,13 @@ class StageBase(TargetBase, ClearBase, GenBase):
del self.settings[self.settings["spec_prefix"] +
"/busybox_config"]
- def set_portage_overlay(self):
- if "portage_overlay" in self.settings:
- if isinstance(self.settings['portage_overlay'], str):
- self.settings["portage_overlay"] = \
- self.settings["portage_overlay"].split()
- log.info('portage_overlay directories are set to: %s',
- ' '.join(self.settings['portage_overlay']))
+ def set_repos(self):
+ if 'repos' in self.settings:
+ if isinstance(self.settings['repos'], str):
+ self.settings['repos'] = \
+ self.settings['repos'].split()
+ log.info('repos directories are set to: %s',
+ ' '.join(self.settings['repos']))
def set_overlay(self):
if self.settings["spec_prefix"] + "/overlay" in self.settings:
@@ -831,10 +831,10 @@ class StageBase(TargetBase, ClearBase, GenBase):
except OSError as e:
raise CatalystError(f'Could not write {repo_conf_chroot}: {e}') from e
- def portage_overlay(self):
+ def process_repos(self):
""" We copy the contents of our repos to get_repo_location(repo_name) """
- if "portage_overlay" in self.settings:
- for x in self.settings["portage_overlay"]:
+ if 'repos' in self.settings:
+ for x in self.settings['repos']:
if os.path.exists(x):
name = get_repo_name(x)
@@ -1145,8 +1145,8 @@ class StageBase(TargetBase, ClearBase, GenBase):
clear_path(target)
# Remove our overlays
- if "portage_overlay" in self.settings:
- for repo_path in self.settings["portage_overlay"]:
+ if 'repos' in self.settings:
+ for repo_path in self.settings['repos']:
repo_name = get_repo_name(repo_path)
repo_conf = self.get_repo_conf_path(repo_name)
diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py
index ff4ea62a..774702f8 100644
--- a/catalyst/targets/livecd_stage2.py
+++ b/catalyst/targets/livecd_stage2.py
@@ -42,7 +42,7 @@ class livecd_stage2(StageBase):
"livecd/xdm",
"livecd/xinitrc",
"livecd/xsession",
- "portage_overlay",
+ "repos",
])
def __init__(self, spec, addlargs):
diff --git a/catalyst/targets/stage1.py b/catalyst/targets/stage1.py
index 5a154e76..0ea5f92b 100644
--- a/catalyst/targets/stage1.py
+++ b/catalyst/targets/stage1.py
@@ -66,9 +66,9 @@ class stage1(StageBase):
if "ldflags" in self.settings:
self.settings["LDFLAGS"] = self.settings["ldflags"]
- def set_portage_overlay(self):
- StageBase.set_portage_overlay(self)
- if "portage_overlay" in self.settings:
+ def set_repos(self):
+ StageBase.set_repos(self)
+ if "repos" in self.settings:
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"
diff --git a/catalyst/targets/stage2.py b/catalyst/targets/stage2.py
index 0b7244e3..786f1020 100644
--- a/catalyst/targets/stage2.py
+++ b/catalyst/targets/stage2.py
@@ -39,9 +39,9 @@ class stage2(StageBase):
if "ldflags" in self.settings:
self.settings["LDFLAGS"] = self.settings["ldflags"]
- def set_portage_overlay(self):
- StageBase.set_portage_overlay(self)
- if "portage_overlay" in self.settings:
+ def set_repos(self):
+ StageBase.set_repos(self)
+ if "repos" in self.settings:
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"
diff --git a/catalyst/targets/stage3.py b/catalyst/targets/stage3.py
index cfc0dbf9..d20ed679 100644
--- a/catalyst/targets/stage3.py
+++ b/catalyst/targets/stage3.py
@@ -17,9 +17,9 @@ class stage3(StageBase):
def __init__(self, spec, addlargs):
StageBase.__init__(self, spec, addlargs)
- def set_portage_overlay(self):
- StageBase.set_portage_overlay(self)
- if "portage_overlay" in self.settings:
+ def set_repos(self):
+ StageBase.set_repos(self)
+ if "repos" in self.settings:
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"
diff --git a/catalyst/targets/stage4.py b/catalyst/targets/stage4.py
index f8383f75..ff1d4dca 100644
--- a/catalyst/targets/stage4.py
+++ b/catalyst/targets/stage4.py
@@ -15,7 +15,7 @@ class stage4(StageBase):
])
valid_values = required_values | frozenset([
"boot/kernel",
- "portage_overlay",
+ "repos",
"stage4/empty",
"stage4/fsscript",
"stage4/gk_mainargs",
diff --git a/doc/catalyst-config.5.txt b/doc/catalyst-config.5.txt
index ebd99b55..003d40b6 100644
--- a/doc/catalyst-config.5.txt
+++ b/doc/catalyst-config.5.txt
@@ -115,7 +115,7 @@ Defaults to `${storedir}/repos`.
*repo_basedir*::
The target repository directory to contain the primary repo (e.g.,
-gentoo repo) and any overlays. The default location is
+gentoo repo) and any other repos. The default location is
`/var/db/repos`.
*repo_name*::
diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt
index 4c1df857..10eb0bb8 100644
--- a/doc/catalyst-spec.5.txt
+++ b/doc/catalyst-spec.5.txt
@@ -80,7 +80,7 @@ This is an optional directory containing portage configuration files
`/etc/portage` and should be consistent across all targets to minimize
problems.
-*portage_overlay*::
+*repos*::
This option specifies the location of the ebuild repositories that you would
like to have used when building this target. It takes a space-separated list
of directory names. (example: `/usr/local/portage`).
diff --git a/examples/generic_stage_template.spec b/examples/generic_stage_template.spec
index 8c8889bf..9d91d07d 100644
--- a/examples/generic_stage_template.spec
+++ b/examples/generic_stage_template.spec
@@ -93,8 +93,8 @@ portage_confdir:
# like to have used when building this target. It takes a space-separated list
# of directory names.
# example:
-# portage_overlay: /usr/local/portage
-portage_overlay:
+# repos: /usr/local/portage
+repos:
# This allows the optional directory containing the output packages for
# catalyst. Mainly used as a way for different spec files to access the same
diff --git a/examples/livecd-stage1_template.spec b/examples/livecd-stage1_template.spec
index 269a1e3d..b9edb87d 100644
--- a/examples/livecd-stage1_template.spec
+++ b/examples/livecd-stage1_template.spec
@@ -56,8 +56,8 @@ portage_confdir:
# like to have used when building this target. It takes a space-separated list
# of directory names.
# example:
-# portage_overlay: /usr/local/portage
-portage_overlay:
+# repos: /usr/local/portage
+repos:
# This allows the optional directory containing the output packages for
# catalyst. Mainly used as a way for different spec files to access the same
diff --git a/examples/livecd-stage2_template.spec b/examples/livecd-stage2_template.spec
index 4f50919f..8db17ed7 100644
--- a/examples/livecd-stage2_template.spec
+++ b/examples/livecd-stage2_template.spec
@@ -56,8 +56,8 @@ portage_confdir:
# like to have used when building this target. It takes a space-separated list
# of directory names.
# example:
-# portage_overlay: /usr/local/portage
-portage_overlay:
+# repos: /usr/local/portage
+repos:
# This allows the optional directory containing the output packages for
# catalyst. Mainly used as a way for different spec files to access the same
diff --git a/examples/netboot_template.spec b/examples/netboot_template.spec
index ad9d993c..07b3b53f 100644
--- a/examples/netboot_template.spec
+++ b/examples/netboot_template.spec
@@ -10,8 +10,8 @@ source_subpath: default/stage3-mips-uclibc-mips3-2006.126
# like to have used when building this target. It takes a space-separated list
# of directory names.
# example:
-# portage_overlay: /usr/local/portage
-portage_overlay:
+# repos: /usr/local/portage
+repos:
boot/kernel: ip22r4k ip22r5k ip27r10k ip28r10k ip30r10k ip32r5k
boot/kernel/ip22r4k/sources: =mips-sources-2.6.14.5
diff --git a/examples/stage4_template.spec b/examples/stage4_template.spec
index aea70e86..5fbf6a50 100644
--- a/examples/stage4_template.spec
+++ b/examples/stage4_template.spec
@@ -56,8 +56,8 @@ portage_confdir:
# like to have used when building this target. It takes a space-separated list
# of directory names.
# example:
-# portage_overlay: /usr/local/portage
-portage_overlay:
+# repos: /usr/local/portage
+repos:
# This allows the optional directory containing the output packages for
# catalyst. Mainly used as a way for different spec files to access the same
--
2.30.0
reply other threads:[~2021-02-04 0:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=3b390728d68d34123b63a956b3180704cb79d1e2.camel@rohde-schwarz.com \
--to=felix.bier@rohde-schwarz.com \
--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