Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 699548 - sys-apps/portage - python install-xattr implementation incorrectly process -Z flag
Summary: sys-apps/portage - python install-xattr implementation incorrectly process -Z...
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Portage team
Keywords: InVCS
: 699552 (view as bug list)
Depends on:
Blocks: 697734 699552
  Show dependency tree
Reported: 2019-11-07 16:56 UTC by Raimonds Cicans
Modified: 2020-01-17 22:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

Just idea for fix (not tested) (portage-install-xattrs-Z.patch,454 bytes, patch)
2019-11-07 16:56 UTC, Raimonds Cicans
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Raimonds Cicans 2019-11-07 16:56:38 UTC
Created attachment 595240 [details, diff]
Just idea for fix (not tested)

Internal portage “install-xattr” implementation (aka PORTAGE_INSTALL_XATTR_IMPLEMENTATION=”python”) require “-Z” flag to have option(s), but “install” (which “install-xattr” tries to mimic) from package “sys-apps/coreutils” documentation clearly states that flag do not have any options.

Consequences: on selinux sistems which use “python” “install-xattr” implementation by default all builds containing calls to “install-xattr” with “-Z” flag will fail at installation phase.
Comment 1 Mike Gilbert gentoo-dev 2019-11-07 18:24:13 UTC
*** Bug 699552 has been marked as a duplicate of this bug. ***
Comment 3 Larry the Git Cow gentoo-dev 2019-11-08 16:02:05 UTC
The bug has been referenced in the following commit(s):

commit f6369a67d33fd5e95e02cf9b3cee41213a3b8804
Author:     Mike Gilbert <>
AuthorDate: 2019-11-07 18:16:09 +0000
Commit:     Mike Gilbert <>
CommitDate: 2019-11-08 15:59:47 +0000 ignore -Z / --context
    The --context option accepts an optional argument, but only if it is
    passed via --context=arg. The argparse module does not deal with this
    To work around this, have argparse ignore this option, and filter out
    any remaining arguments that start with a hyphen and do not occur after
    a "--" delimiter.
    Signed-off-by: Mike Gilbert <>
    Reviewed-by: Zec Medico <>

 bin/ | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)
Comment 4 Larry the Git Cow gentoo-dev 2019-11-09 05:22:58 UTC
The bug has been referenced in the following commit(s):

commit a95264dd3d846c10045644d5385d96826fbbae78
Author:     Zac Medico <>
AuthorDate: 2019-11-09 05:16:02 +0000
Commit:     Zac Medico <>
CommitDate: 2019-11-09 05:22:38 +0000

    sys-apps/portage: Bump to version 2.3.79
     #673400 emerge: fix error message for unknown options
     #699392 emirrordist: _recycle_copier_exit UnboundLocalError
     #699400 emirrordist: clean up FileCopier exception logging
     #699548 ignore -Z / --context
    Package-Manager: Portage-2.3.78, Repoman-2.3.17
    Signed-off-by: Zac Medico <>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-2.3.79.ebuild | 261 +++++++++++++++++++++++++++++++++
 2 files changed, 262 insertions(+)