public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] PATCH: Make lchown a no-op rather than aliasing to chown on Darwin (#98827)
@ 2005-07-18  3:13 Jason Stubbs
  2005-07-19 14:27 ` [gentoo-portage-dev] PATCH: Only use lchown on symlinks (#98827) Jason Stubbs
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Stubbs @ 2005-07-18  3:13 UTC (permalink / raw
  To: gentoo-portage-dev


[-- Attachment #1.1: Type: text/plain, Size: 595 bytes --]

http://bugs.gentoo.org/show_bug.cgi?id=98827

Author: Jason Stubbs

Portage presently alters permissions of the target of a symlink rather 
than the symlink itself on Darwin. As well as the possibility that 
the target's permissions are modified incorrectly, there is also the 
case that the symlink points somewhere on the live filesystem or 
doesn't point anywhere at all. The former case will is definately 
incorrect and the latter case will cause portage to fail with a 
traceback. Making lchown a no-op should fix all these cases without 
any regressions.

-- 
Jason Stubbs

[-- Attachment #1.2: 98827_darwin_noop_lchown.patch --]
[-- Type: text/x-diff, Size: 550 bytes --]

diff -uNr portage-stable/pym/portage_data.py portage-fixed/pym/portage_data.py
--- portage-stable/pym/portage_data.py	2005-05-15 19:20:58.000000000 +0900
+++ portage-fixed/pym/portage_data.py	2005-07-18 11:27:09.096800056 +0900
@@ -16,8 +16,9 @@
 	os.environ["XARGS"]="xargs -r"
 elif ostype == "Darwin":
 	userland="Darwin"
-	os.environ["XARGS"]="xargs"	
-	lchown=os.chown
+	os.environ["XARGS"]="xargs"
+	def lchown(*pos_args, **key_args):
+		pass
 elif ostype in ["FreeBSD","OpenBSD"]:
 	userland="BSD"
 	os.environ["XARGS"]="xargs"

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2005-07-19 14:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-18  3:13 [gentoo-portage-dev] PATCH: Make lchown a no-op rather than aliasing to chown on Darwin (#98827) Jason Stubbs
2005-07-19 14:27 ` [gentoo-portage-dev] PATCH: Only use lchown on symlinks (#98827) Jason Stubbs

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