Gentoo Archives: gentoo-portage-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] xattr: centralize the various shims in one place
Date: Thu, 17 Oct 2013 02:51:19
Message-Id: 201310162251.18290.vapier@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH] xattr: centralize the various shims in one place by Arfrever Frehtes Taifersar Arahesis
1 On Wednesday 16 October 2013 20:02:50 Arfrever Frehtes Taifersar Arahesis
2 wrote:
3 > 2013-10-16 23:03 Mike Frysinger napisaƂ(a):
4 > > Rather than each module implementing its own shim around the various
5 > > methods for accessing extended attributes, start a dedicated module
6 > > that exports a consistent API.
7 >
8 > Some things are incompatible with Python 3.
9 > See other comments below.
10
11 i can run a linter on the code (probably should make this a git hook). i'm
12 interested more in review on the bigger picture.
13
14 also, please snip context you aren't actually replying to. it makes it much
15 harder to read replies when you don't do that.
16
17 > > + @staticmethod
18 > > + def set(item, name, value, flags=0, namespace=None):
19 > > + if namespace:
20 > > + name = '%s.%s' % (namespace, name)
21 > > + cmd = ['setfattr', '-n', name, '-v', value, item]
22 >
23 > Calling setfattr once per attribute is slower than once per file (as is
24 > now).
25
26 true, however:
27 - setfattr is the fallback logic, not the primary code path
28 - the # of attributes per file is low (rarely more than 2)
29 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies