Lines 19-25
class generic_stage_target(generic_target):
Link Here
|
19 |
self.valid_values.extend(["version_stamp","target","subarch",\ |
19 |
self.valid_values.extend(["version_stamp","target","subarch",\ |
20 |
"rel_type","profile","snapshot","source_subpath","portage_confdir",\ |
20 |
"rel_type","profile","snapshot","source_subpath","portage_confdir",\ |
21 |
"cflags","cxxflags","ldflags","cbuild","hostuse","portage_overlay",\ |
21 |
"cflags","cxxflags","ldflags","cbuild","hostuse","portage_overlay",\ |
22 |
"distcc_hosts","makeopts","pkgcache_path","kerncache_path"]) |
22 |
"distcc_hosts","makeopts","pkgcache_path","kerncache_path","tmpfs_opts"]) |
23 |
|
23 |
|
24 |
self.set_valid_build_kernel_vars(addlargs) |
24 |
self.set_valid_build_kernel_vars(addlargs) |
25 |
generic_target.__init__(self,myspec,addlargs) |
25 |
generic_target.__init__(self,myspec,addlargs) |
Lines 229-234
class generic_stage_target(generic_target):
Link Here
|
229 |
self.mountmap["/var/cache/icecream"]="/var/cache/icecream" |
229 |
self.mountmap["/var/cache/icecream"]="/var/cache/icecream" |
230 |
self.env["PATH"]="/usr/lib/icecc/bin:"+self.env["PATH"] |
230 |
self.env["PATH"]="/usr/lib/icecc/bin:"+self.env["PATH"] |
231 |
|
231 |
|
|
|
232 |
if self.settings.has_key("TMPFS"): |
233 |
self.mounts.append("/var/tmp/portage") |
234 |
self.mountmap["/var/tmp/portage"]="tmpfs" |
235 |
|
232 |
def override_cbuild(self): |
236 |
def override_cbuild(self): |
233 |
if self.makeconf.has_key("CBUILD"): |
237 |
if self.makeconf.has_key("CBUILD"): |
234 |
self.settings["CBUILD"]=self.makeconf["CBUILD"] |
238 |
self.settings["CBUILD"]=self.makeconf["CBUILD"] |
Lines 866-878
class generic_stage_target(generic_target):
Link Here
|
866 |
|
870 |
|
867 |
def bind(self): |
871 |
def bind(self): |
868 |
for x in self.mounts: |
872 |
for x in self.mounts: |
|
|
873 |
src=self.mountmap[x] |
869 |
if not os.path.exists(self.settings["chroot_path"]+x): |
874 |
if not os.path.exists(self.settings["chroot_path"]+x): |
870 |
os.makedirs(self.settings["chroot_path"]+x,0755) |
875 |
os.makedirs(self.settings["chroot_path"]+x,0755) |
871 |
|
876 |
|
872 |
if not os.path.exists(self.mountmap[x]): |
877 |
if (not os.path.exists(src)) and src != "tmpfs": |
873 |
os.makedirs(self.mountmap[x],0755) |
878 |
os.makedirs(self.mountmap[x],0755) |
874 |
|
879 |
|
875 |
src=self.mountmap[x] |
|
|
876 |
if self.settings.has_key("SNAPCACHE") and x == "/usr/portage": |
880 |
if self.settings.has_key("SNAPCACHE") and x == "/usr/portage": |
877 |
self.snapshot_lock_object.read_lock() |
881 |
self.snapshot_lock_object.read_lock() |
878 |
if os.uname()[0] == "FreeBSD": |
882 |
if os.uname()[0] == "FreeBSD": |
Lines 882-887
class generic_stage_target(generic_target):
Link Here
|
882 |
else: |
886 |
else: |
883 |
retval=os.system("mount_nullfs "+src+" "+\ |
887 |
retval=os.system("mount_nullfs "+src+" "+\ |
884 |
self.settings["chroot_path"]+x) |
888 |
self.settings["chroot_path"]+x) |
|
|
889 |
elif src == "tmpfs": |
890 |
tmpfs_o="" |
891 |
if self.settings.has_key("tmpfs_opts"): |
892 |
tmpfs_o="-o "+self.settings["tmpfs_opts"] |
893 |
retval=os.system("mount " + tmpfs_o +\ |
894 |
" -t tmpfs catalyst_tmpfs "+\ |
895 |
self.settings["chroot_path"]+x) |
885 |
else: |
896 |
else: |
886 |
retval=os.system("mount --bind "+src+" "+\ |
897 |
retval=os.system("mount --bind "+src+" "+\ |
887 |
self.settings["chroot_path"]+x) |
898 |
self.settings["chroot_path"]+x) |