Gentoo Archives: gentoo-portage-dev

From: Jason Stubbs <jstubbs@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] PATCH: Use lchown and lchgrp no-op functions when operating on symlinks (#99616)
Date: Thu, 21 Jul 2005 23:50:01
Message-Id: 200507220849.43700.jstubbs@gentoo.org
In Reply to: Re: [gentoo-portage-dev] PATCH: Use lchown and lchgrp no-op functions when operating on symlinks (#99616) by "Brian D. Harring"
1 On Friday 22 July 2005 02:17, Brian D. Harring wrote:
2 > On Thu, Jul 21, 2005 at 11:13:34PM +0900, Jason Stubbs wrote:
3 > > diff -uNr portage-2.0.51.22-r2/bin/ebuild.sh portage-patched/bin/ebuild.sh
4 > > --- portage-2.0.51.22-r2/bin/ebuild.sh 2005-07-19 19:38:32.949904000 +0900
5 > > +++ portage-patched/bin/ebuild.sh 2005-07-21 23:03:58.429898000 +0900
6 > > @@ -85,6 +85,11 @@
7 > > export SANDBOX_PREDICT="$SANDBOX_PREDICT:$1"
8 > > }
9 > >
10 > > +lchown()
11 > > +{ 0; }
12 > > +
13 > > +lchgrp()
14 > > +{ 0; }
15 >
16 > Default being negation of funcs, and forcing profiles to override it?
17 > Why not reverse it, a default func that works, with profiles
18 > overriding if/when it doesn't work?
19
20 I don't really like the idea of adding yet another >& /dev/null. With a GNU
21 userland, it would be something like:
22
23 lchown()
24 { chown -h $* }
25
26 If the many errors that will occur when the userland's chown doesn't support
27 this flag are okay, putting in working defaults are fine. The main reasons I
28 went with no-ops are that symlink ownership is purely cosmetic (afaik) and
29 to try to keep userland specific stuff out.
30
31 --
32 Jason Stubbs

Replies