Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 99025 Details for
Bug 150351
Gentoo/FreeBSD compatibility patch for catalyst
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
catalyst-2.0-fbsd.patch
catalyst-2.0-fbsd.patch (text/plain), 3.82 KB, created by
Diego Elio Pettenò (RETIRED)
on 2006-10-07 00:47:35 UTC
(
hide
)
Description:
catalyst-2.0-fbsd.patch
Filename:
MIME Type:
Creator:
Diego Elio Pettenò (RETIRED)
Created:
2006-10-07 00:47:35 UTC
Size:
3.82 KB
patch
obsolete
>Index: catalyst-2.0/modules/generic_stage_target.py >=================================================================== >--- catalyst-2.0.orig/modules/generic_stage_target.py >+++ catalyst-2.0/modules/generic_stage_target.py >@@ -163,14 +163,16 @@ class generic_stage_target(generic_targe > > # setup our mount points > if self.settings.has_key("SNAPCACHE"): >- self.mounts=[ "/proc","/dev","/dev/pts","/usr/portage","/usr/portage/distfiles" ] >+ self.mounts=[ "/proc","/dev","/usr/portage","/usr/portage/distfiles" ] > self.mountmap={"/proc":"/proc", "/dev":"/dev", "/dev/pts":"/dev/pts",\ > "/usr/portage":self.settings["snapshot_cache_path"]+"/portage",\ > "/usr/portage/distfiles":self.settings["distdir"]} > else: >- self.mounts=[ "/proc","/dev","/dev/pts","/usr/portage/distfiles" ] >+ self.mounts=[ "/proc","/dev","/usr/portage/distfiles" ] > self.mountmap={"/proc":"/proc", "/dev":"/dev", "/dev/pts":"/dev/pts",\ > "/usr/portage/distfiles":self.settings["distdir"]} >+ if os.uname()[0] == "Linux": >+ self.mounts.append("/dev/pts") > > self.set_mounts() > >@@ -768,7 +770,13 @@ class generic_stage_target(generic_targe > src=self.mountmap[x] > if self.settings.has_key("SNAPCACHE") and x == "/usr/portage": > self.snapshot_lock_object.read_lock() >- retval=os.system("mount --bind "+src+" "+self.settings["chroot_path"]+x) >+ if os.uname()[0] == "FreeBSD": >+ if src == "/dev": >+ retval=os.system("mount -t devfs none "+self.settings["chroot_path"]+x) >+ else: >+ retval=os.system("mount_nullfs "+src+" "+self.settings["chroot_path"]+x) >+ else: >+ retval=os.system("mount --bind "+src+" "+self.settings["chroot_path"]+x) > if retval!=0: > self.unbind() > raise CatalystError,"Couldn't bind mount "+src >@@ -788,7 +796,7 @@ class generic_stage_target(generic_targe > # it's not mounted, continue > continue > >- retval=os.system("umount "+mypath+x) >+ retval=os.system("umount "+os.path.join(mypath,x.lstrip(os.path.sep))) > > if retval!=0: > warn("First attempt to unmount: "+mypath+x+" failed.") >@@ -1278,6 +1286,8 @@ class generic_stage_target(generic_targe > # the proper perms and ownership > mystat=os.stat(myemp) > #cmd("rm -rf "+myemp, "Could not remove existing file: "+myemp,env=self.env) >+ if os.uname()[0] == "FreeBSD": # There's no easy way to change flags recursively in python >+ os.system("chflags -R noschg "+myemp) > shutil.rmtree(myemp) > os.makedirs(myemp,0755) > os.chown(myemp,mystat[ST_UID],mystat[ST_GID]) >Index: catalyst-2.0/targets/stage1/stage1-controller.sh >=================================================================== >--- catalyst-2.0.orig/targets/stage1/stage1-controller.sh >+++ catalyst-2.0/targets/stage1/stage1-controller.sh >@@ -57,10 +57,10 @@ case $1 in > # Clean out man, info and doc files > rm -rf usr/share/{man,doc,info}/* > # Zap all .pyc and .pyo files >- find -iname "*.py[co]" -exec rm -f {} \; >+ find . -iname "*.py[co]" -exec rm -f {} \; > # Cleanup all .a files except libgcc.a, *_nonshared.a and > # /usr/lib/portage/bin/*.a >- find -type f -iname "*.a" | grep -v 'libgcc.a' | grep -v 'nonshared.a' \ >+ find . -type f -iname "*.a" | grep -v 'libgcc.a' | grep -v 'nonshared.a' \ > | grep -v '/usr/lib/portage/bin/' | grep -v 'libgcc_eh.a' | xargs \ > rm -f > ;; >Index: catalyst-2.0/targets/support/chroot-functions.sh >=================================================================== >--- catalyst-2.0.orig/targets/support/chroot-functions.sh >+++ catalyst-2.0/targets/support/chroot-functions.sh >@@ -215,7 +215,11 @@ function copy_symlink() { > [ ! -e ${clst_root_path}/${1} ] && \ > cp -vfdp ${1} ${clst_root_path}/${1} > >- TARGET=`readlink -f ${1}` >+ if [[ -n $(type -p realpath) ]]; then >+ TARGET=`realpath ${1}` >+ else >+ TARGET=`readlink -f ${1}` >+ fi > if [ -h ${TARGET} ] > then > copy_symlink ${TARGET} ${STACK}
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 150351
: 99025