Gentoo Archives: gentoo-alt

From: Fabian Groffen <grobian@g.o>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] [PREFIX] FreeBSD support added
Date: Fri, 19 Oct 2007 08:56:40
Message-Id: 20071019084555.GB2499@gentoo.org
In Reply to: Re: [gentoo-alt] [PREFIX] FreeBSD support added by Zac Medico
1 On 18-10-2007 09:47:57 -0700, Zac Medico wrote:
2 > -----BEGIN PGP SIGNED MESSAGE-----
3 > Hash: SHA1
4 >
5 > Matt Michalowski wrote:
6 > > 2060, in mergeme
7 > > dflags = mydstat.st_flags
8 > > AttributeError: 'posix.stat_result' object has no attribute 'st_flags'
9 >
10 > What version of python is reported by `python -V`? The attached
11 > patch should prevent that error from being triggered, but I'm
12 > curious why that attribute is missing.
13
14 Thanks Zac!
15
16 I'm affraid it has to do with the bsdflags thing not being built in
17 prefix, yet. The reason why is that on my FreeBSD install I didn't get
18 this error, neither did I find any problem with not having that extra
19 thing being built. It is on my todo-list to find out what the
20 implications of not having it on BSD actually means...
21
22
23 > Index: pym/portage/__init__.py
24 > ===================================================================
25 > --- pym/portage/__init__.py (revision 8171)
26 > +++ pym/portage/__init__.py (working copy)
27 > @@ -68,6 +68,10 @@
28 > return _chflags(path, flags, opts="-h")
29 > bsd_chflags.chflags = _chflags
30 > bsd_chflags.lchflags = _lchflags
31 > + if not hasattr(os.lstat("/"), "st_flags"):
32 > + sys.stderr.write("WARNING: BSD chflags are disabled since the st_flags attribute is missing!\n")
33 > + sys.stderr.flush()
34 > + bsd_chflags = None
35 >
36 > try:
37 > from portage.cache.cache_errors import CacheError
38
39
40
41 --
42 Fabian Groffen
43 Gentoo on a different level
44 --
45 gentoo-alt@g.o mailing list

Replies

Subject Author
Re: [gentoo-alt] [PREFIX] FreeBSD support added Zac Medico <zmedico@g.o>