Gentoo Archives: gentoo-alt

From: Alan Hourihane <alanh@×××××××××××.uk>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] unemerging causes a bad symlink removal
Date: Sat, 05 Sep 2009 20:44:51
Message-Id: 1252183527.9701.1.camel@jetpack.demon.co.uk
In Reply to: Re: [gentoo-alt] unemerging causes a bad symlink removal by Fabian Groffen
1 On Sat, 2009-09-05 at 14:46 +0200, Fabian Groffen wrote:
2 > On 01-09-2009 15:56:28 +0100, Alan Hourihane wrote:
3 > > > I have to see the context of it to say for sure, but it looks as if it
4 > > > just prevents it from removing symlinks, which is not what we want
5 > > > either, of course.
6 > >
7 > > O.k, any ideas ?
8 >
9 > looks like Portage already tries to avoid doing something wrong:
10 >
11 > if pkgfiles[objkey][0] == "dir":
12 > if statobj is None or not stat.S_ISDIR(statobj.st_mode):
13 > show_unmerge("---", unmerge_desc["!dir"], file_type, obj)
14 > continue
15 > mydirs.append(obj)
16 >
17 > it only removes directories that are in mydirs, and technically it
18 > should never find your /usr dir, so that seems to be the bug to me
19
20 Yeah, I think it should be using lstatobj and not statobj because it'll
21 end up stating the symlinks pointer.
22
23 Alan.

Replies

Subject Author
Re: [gentoo-alt] unemerging causes a bad symlink removal Fabian Groffen <grobian@g.o>