1 |
On 30 May 2015 12:21, Zac Medico wrote: |
2 |
> On 05/30/2015 08:14 AM, Mike Frysinger wrote: |
3 |
> > + @classmethod |
4 |
> > + def list(cls, item, nofollow=False, namespace=None, _names_only=True): |
5 |
> > + cmd = ['getfattr', '-d', '--absolute-names', item] |
6 |
> |
7 |
> All getfattr calls need to use -m- ('-' pattern means match all) in |
8 |
> order to list all attributes. |
9 |
|
10 |
i use -m already. here's a bit more of that function: |
11 |
|
12 |
def list(cls, item, nofollow=False, namespace=None, _names_only=True): |
13 |
cmd = ['getfattr', '-d', '--absolute-names', item] |
14 |
if nofollow: |
15 |
cmd += ['-h'] |
16 |
cmd += ['-m', ('^%s[.]' % namespace) if namespace else ''] |
17 |
proc = cls._call(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
18 |
|
19 |
so when there's no namespace specified, it ends up doing: |
20 |
getfattr -d --absolute-names /path/file -m '' |
21 |
|
22 |
which is effectively the same thing, but i can change the '' to '-' since that's |
23 |
what the documentation suggests. |
24 |
-mike |