Lines 1116-1128
class StageBase(TargetBase, ClearBase, GenBase):
Link Here
|
1116 |
for hostuseexpand in myuseexpandvars: |
1116 |
for hostuseexpand in myuseexpandvars: |
1117 |
myf.write(hostuseexpand + '="' + ' '.join(myuseexpandvars[hostuseexpand]) + '"\n') |
1117 |
myf.write(hostuseexpand + '="' + ' '.join(myuseexpandvars[hostuseexpand]) + '"\n') |
1118 |
|
1118 |
|
1119 |
myf.write('PORTDIR="%s"\n' % self.settings['portdir']) |
|
|
1120 |
myf.write('DISTDIR="%s"\n' % self.settings['distdir']) |
1119 |
myf.write('DISTDIR="%s"\n' % self.settings['distdir']) |
1121 |
myf.write('PKGDIR="%s"\n' % self.settings['packagedir']) |
1120 |
myf.write('PKGDIR="%s"\n' % self.settings['packagedir']) |
1122 |
|
1121 |
|
1123 |
# Setup the portage overlay |
|
|
1124 |
if "portage_overlay" in self.settings: |
1125 |
myf.write('PORTDIR_OVERLAY="/usr/local/portage"\n') |
1126 |
|
1122 |
|
1127 |
# Set default locale for system responses. #478382 |
1123 |
# Set default locale for system responses. #478382 |
1128 |
myf.write( |
1124 |
myf.write( |
Lines 1132-1137
class StageBase(TargetBase, ClearBase, GenBase):
Link Here
|
1132 |
'LC_MESSAGES=C\n') |
1128 |
'LC_MESSAGES=C\n') |
1133 |
|
1129 |
|
1134 |
myf.close() |
1130 |
myf.close() |
|
|
1131 |
|
1132 |
# Create repos.conf (for the chroot) |
1133 |
repos_conf_path = normpath(self.settings["chroot_path"] + self.settings["repos_conf"]) |
1134 |
cmd("rm -fr " + repos_conf_path, "Could not remove " + repos_conf_path, env=self.env) |
1135 |
cmd("mkdir -p " + repos_conf_path) |
1136 |
with open(os.path.join(repos_conf_path, "gentoo.conf"), "w") as myf: |
1137 |
myf.write("[gentoo]\nlocation = %s\n" % self.settings["portdir"]) |
1138 |
# Set up the local repository |
1139 |
if "portage_overlay" in self.settings: |
1140 |
with open(os.path.join(repos_conf_path, "local.conf"), "w") as myf: |
1141 |
myf.write("[local]\nlocation = %s\n" % self.settings["local_overlay"]) |
1142 |
|
1143 |
|
1135 |
self.resume.enable("chroot_setup") |
1144 |
self.resume.enable("chroot_setup") |
1136 |
|
1145 |
|
1137 |
def fsscript(self): |
1146 |
def fsscript(self): |
Lines 1171-1183
class StageBase(TargetBase, ClearBase, GenBase):
Link Here
|
1171 |
self.settings["chroot_path"]+"/etc/hosts",\ |
1180 |
self.settings["chroot_path"]+"/etc/hosts",\ |
1172 |
"Could not replace /etc/hosts",env=self.env) |
1181 |
"Could not replace /etc/hosts",env=self.env) |
1173 |
|
1182 |
|
1174 |
# Remove our overlay |
1183 |
# Remove the local repository |
1175 |
if os.path.exists(self.settings["chroot_path"] + self.settings["local_overlay"]): |
1184 |
if os.path.exists(self.settings["chroot_path"] + self.settings["local_overlay"]): |
1176 |
cmd("rm -rf " + self.settings["chroot_path"] + self.settings["local_overlay"], |
1185 |
cmd("rm -rf " + self.settings["chroot_path"] + self.settings["local_overlay"], |
1177 |
"Could not remove " + self.settings["local_overlay"], env=self.env) |
1186 |
"Could not remove " + self.settings["local_overlay"], env=self.env) |
1178 |
cmd("sed -i '/^PORTDIR_OVERLAY/d' "+self.settings["chroot_path"]+\ |
1187 |
cmd("rm -f" + os.path.join(normpath(self.settings["chroot_path"] + self.settings["repos_conf"]), "local.conf"), |
1179 |
self.settings["make_conf"],\ |
1188 |
"Could not remove local repository from repos.conf",env=self.env) |
1180 |
"Could not remove PORTDIR_OVERLAY from make.conf",env=self.env) |
|
|
1181 |
|
1189 |
|
1182 |
# Clean up old and obsoleted files in /etc |
1190 |
# Clean up old and obsoleted files in /etc |
1183 |
if os.path.exists(self.settings["stage_path"]+"/etc"): |
1191 |
if os.path.exists(self.settings["stage_path"]+"/etc"): |