From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id E77CD138CD0 for ; Sat, 30 May 2015 19:59:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F3B35E08E2; Sat, 30 May 2015 19:59:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7D858E08E1 for ; Sat, 30 May 2015 19:59:49 +0000 (UTC) Received: from vapier (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with SMTP id 5B33D340CEF for ; Sat, 30 May 2015 19:59:47 +0000 (UTC) Date: Sat, 30 May 2015 15:59:46 -0400 From: Mike Frysinger To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] [PATCH v3] xattr: centralize the various shims in one place Message-ID: <20150530195946.GA4496@vapier> Mail-Followup-To: gentoo-portage-dev@lists.gentoo.org References: <1381957406-21749-1-git-send-email-vapier@gentoo.org> <1432998844-15210-1-git-send-email-vapier@gentoo.org> <556A0D9D.7080400@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="+QahgC5+KEYLbs62" Content-Disposition: inline In-Reply-To: <556A0D9D.7080400@gentoo.org> X-Archives-Salt: abfd7109-a657-4e71-ae08-0bf49ed70311 X-Archives-Hash: 743c8aba1d03670e1b80f0cd2a6ffeb8 --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 30 May 2015 12:21, Zac Medico wrote: > On 05/30/2015 08:14 AM, Mike Frysinger wrote: > > + @classmethod > > + def list(cls, item, nofollow=3DFalse, namespace=3DNone, _names_only= =3DTrue): > > + cmd =3D ['getfattr', '-d', '--absolute-names', item] >=20 > All getfattr calls need to use -m- ('-' pattern means match all) in > order to list all attributes. i use -m already. here's a bit more of that function: def list(cls, item, nofollow=3DFalse, namespace=3DNone, _names_only=3DT= rue): cmd =3D ['getfattr', '-d', '--absolute-names', item] if nofollow: cmd +=3D ['-h'] cmd +=3D ['-m', ('^%s[.]' % namespace) if namespace else ''] proc =3D cls._call(cmd, stdout=3Dsubprocess.PIPE, stderr=3Dsubproce= ss.PIPE) so when there's no namespace specified, it ends up doing: getfattr -d --absolute-names /path/file -m '' which is effectively the same thing, but i can change the '' to '-' since t= hat's=20 what the documentation suggests. -mike --+QahgC5+KEYLbs62 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVahayAAoJEEFjO5/oN/WBLx8P/0JOr+uGfxgioVwPfD1Yn7Hk erG3D6Mdy39l4VZvI+8PrE6CR7puRdlfiQ0lV3Sd1XayUcNL30LUrZP9PPt5HUO7 WuxIq+wXEAgVdqFqUxsGvN8O8V/xk0SQFNCBdfmTpjs6hRIyO6LgWOhn7nri5u7B BudOxClYWQr2Gn8hgWip2oAVyTOV/VNfDK+nGU9PgSHHDV2hi+2i0ScV/3gEO1B4 ZMcmmUAONHRCUKW0zr+lS9wFCpFaL7/Jt2TFPI+oEZ/pkcgHCNoNR5ABIa3orjge uj6GAJXiEaD1F5NT1RnKT/wfPXcnwdqCmLXqPcA6Xwsud8gh2GDX1dn+PsBvhbK3 sE51N3hQ9uWOl7YkUgwBEmv76MTGsHlK0XYmSZNd0Ley8G/nCU739EzkNBnt+LhV llmWx/kToejUF86ZBxHR/BL5PgeFhJOR2C4pXqCfTmFgGNb2SU3lrxOklrcKcfq1 0AU6X5kaNGWj41b9ryMPKqveKenb06q41IisAZiYfS1eoBiRS/NFLIiWxcGDQklp ToZ0R74gXUVVuSeDLQEXAnmMGzR0fjUV0B25M3XGO7mnb+7URc/Pq38CqQBMkNUy MkMZL2rjxEFb5z05FvuXVYryCmGQwh+equrVeZh239mdZrpl5/lL781MWjG86XlR t1fCOeSZyYM93eGRh5Sk =kGpI -----END PGP SIGNATURE----- --+QahgC5+KEYLbs62--