Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 418818 Details for
Bug 560518
dev-util/catalyst: Create /etc/portage/repos.conf/gentoo.conf in stages
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
catalyst-repos.conf.patch
catalyst-repos.conf.patch (text/plain), 2.86 KB, created by
Arfrever Frehtes Taifersar Arahesis
on 2015-12-09 06:36:11 UTC
(
hide
)
Description:
catalyst-repos.conf.patch
Filename:
MIME Type:
Creator:
Arfrever Frehtes Taifersar Arahesis
Created:
2015-12-09 06:36:11 UTC
Size:
2.86 KB
patch
obsolete
>diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py >index 62950b5..86ca230 100644 >--- a/catalyst/base/stagebase.py >+++ b/catalyst/base/stagebase.py >@@ -1116,13 +1116,9 @@ class StageBase(TargetBase, ClearBase, GenBase): > for hostuseexpand in myuseexpandvars: > myf.write(hostuseexpand + '="' + ' '.join(myuseexpandvars[hostuseexpand]) + '"\n') > >- myf.write('PORTDIR="%s"\n' % self.settings['portdir']) > myf.write('DISTDIR="%s"\n' % self.settings['distdir']) > myf.write('PKGDIR="%s"\n' % self.settings['packagedir']) > >- # Setup the portage overlay >- if "portage_overlay" in self.settings: >- myf.write('PORTDIR_OVERLAY="/usr/local/portage"\n') > > # Set default locale for system responses. #478382 > myf.write( >@@ -1132,6 +1128,19 @@ class StageBase(TargetBase, ClearBase, GenBase): > 'LC_MESSAGES=C\n') > > myf.close() >+ >+ # Create repos.conf (for the chroot) >+ repos_conf_path = normpath(self.settings["chroot_path"] + self.settings["repos_conf"]) >+ cmd("rm -fr " + repos_conf_path, "Could not remove " + repos_conf_path, env=self.env) >+ cmd("mkdir -p " + repos_conf_path) >+ with open(os.path.join(repos_conf_path, "gentoo.conf"), "w") as myf: >+ myf.write("[gentoo]\nlocation = %s\n" % self.settings["portdir"]) >+ # Set up the local repository >+ if "portage_overlay" in self.settings: >+ with open(os.path.join(repos_conf_path, "local.conf"), "w") as myf: >+ myf.write("[local]\nlocation = %s\n" % self.settings["local_overlay"]) >+ >+ > self.resume.enable("chroot_setup") > > def fsscript(self): >@@ -1171,13 +1180,12 @@ class StageBase(TargetBase, ClearBase, GenBase): > self.settings["chroot_path"]+"/etc/hosts",\ > "Could not replace /etc/hosts",env=self.env) > >- # Remove our overlay >+ # Remove the local repository > if os.path.exists(self.settings["chroot_path"] + self.settings["local_overlay"]): > cmd("rm -rf " + self.settings["chroot_path"] + self.settings["local_overlay"], > "Could not remove " + self.settings["local_overlay"], env=self.env) >- cmd("sed -i '/^PORTDIR_OVERLAY/d' "+self.settings["chroot_path"]+\ >- self.settings["make_conf"],\ >- "Could not remove PORTDIR_OVERLAY from make.conf",env=self.env) >+ cmd("rm -f" + os.path.join(normpath(self.settings["chroot_path"] + self.settings["repos_conf"]), "local.conf"), >+ "Could not remove local repository from repos.conf",env=self.env) > > # Clean up old and obsoleted files in /etc > if os.path.exists(self.settings["stage_path"]+"/etc"): >diff --git a/catalyst/defaults.py b/catalyst/defaults.py >index c5162d6..28435e0 100644 >--- a/catalyst/defaults.py >+++ b/catalyst/defaults.py >@@ -32,6 +32,7 @@ confdefaults={ > "local_overlay": "/usr/local/portage", > "port_conf": "/etc/portage", > "make_conf": "%(port_conf)s/make.conf", >+ "repos_conf": "%(port_conf)s/repos.conf", > "options": set(), > "packagedir": "/usr/portage/packages", > "portdir": "/usr/portage",
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 560518
:
418818
|
420854
|
657204
|
657206