public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-catalyst] Patches for stagebase.py
@ 2017-12-28 21:08 Ben Kohler
  2017-12-29  0:48 ` Brian Dolbec
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Kohler @ 2017-12-28 21:08 UTC (permalink / raw
  To: gentoo-catalyst

[-- Attachment #1: Type: text/plain, Size: 74 bytes --]

Sorry about formatting of previous patches, here they are attached.

-Ben

[-- Attachment #2: 0002-stagebase.py-add-package.accept_keywords-to-cleanup-.patch --]
[-- Type: text/x-patch, Size: 958 bytes --]

From 8363bbfa77d6658ccb823c638166b6f5c77f61b8 Mon Sep 17 00:00:00 2001
From: Ben Kohler <bkohler@gmail.com>
Date: Thu, 28 Dec 2017 14:19:09 -0600
Subject: [PATCH 2/2] stagebase.py: add package.accept_keywords to cleanup list

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

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 999bf8df..3c60783b 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1217,7 +1217,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 		# optionally clean up portage configs
 		if ("portage_prefix" in self.settings and
 			"sticky-config" not in self.settings["options"]):
-			for _dir in "keywords", "mask", "unmask", "use":
+			for _dir in "accept_keywords", "keywords", "mask", "unmask", "use":
 				target = pjoin([self.settings['chroot_path'],
 					"etc/portage/package.%s" % _dir,
 					self.settings["portage_prefix"]])
-- 
2.13.6


[-- Attachment #3: 0001-stagebase.py-strip-leading-slash-from-etc-portage-in.patch --]
[-- Type: text/x-patch, Size: 1041 bytes --]

From 10a0c31b5a839cc4759736c054e2ffea2aab1708 Mon Sep 17 00:00:00 2001
From: Ben Kohler <bkohler@gmail.com>
Date: Thu, 28 Dec 2017 14:18:37 -0600
Subject: [PATCH 1/2] stagebase.py: strip leading slash from /etc/portage in
 pjoin

Only the first component passed to pjoin can have a leading slash,
otherwise the component will be treated as an absolute path and all
preceding components are discarded.
---
 catalyst/base/stagebase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index a6a32f5a..999bf8df 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1219,7 +1219,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
 			"sticky-config" not in self.settings["options"]):
 			for _dir in "keywords", "mask", "unmask", "use":
 				target = pjoin([self.settings['chroot_path'],
-					"/etc/portage/package.%s" % _dir,
+					"etc/portage/package.%s" % _dir,
 					self.settings["portage_prefix"]])
 				clear_path(target)
 
-- 
2.13.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-29  0:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-28 21:08 [gentoo-catalyst] Patches for stagebase.py Ben Kohler
2017-12-29  0:48 ` Brian Dolbec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox