Summary: | portage.tests.emerge.test_simple.SimpleEmergeTestCase test failure with app-alternatives/tar[libarchive] | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Sam James <sam> |
Component: | Binary packages support | Assignee: | Portage team <dev-portage> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | base-system, boris.staletic, flow, gentoo, mgorny |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 891393 |
Description
Sam James
2023-03-20 04:25:48 UTC
$ grep -rsin -- --xattrs-include lib/_emerge/BinpkgExtractorAsync.py:48: tar_options = ["--xattrs", "--xattrs-include='*'"] grep: lib/_emerge/__pycache__/BinpkgExtractorAsync.cpython-39.pyc: binary file matches lib/portage/dbapi/vartree.py:1094: tar_cmd = ("tar", "-x", "--xattrs", "--xattrs-include=*", "-C", dest_dir) --xattrs is supported by bsdtar.
--xattrs-include isn't, though there is a feature request for it. [0]
I couldn't find the definitive reference, but as far as I can tell, bsdtar's --xattrs does mean "all extended attribute". That would make --xattrs-include redundant. I would feel more confident if this were explicitly stated in the man page for example.
> lib/_emerge/BinpkgExtractorAsync.py:48: tar_options = ["--xattrs", "--xattrs-include='*'"]
This one is preceeded by "if --xattrs in (tar --help).stdout" (pseudocode).
bsdtar's help is very brief, so portage misses that bsdtar actually supports xattrs. I guess portage could do without that check and just assume that every version of tar supports xattrs?
Alternatively, the same check could be repurposed to distinguish between gtar and bsdtar, but... ew. That's a big too hacky.
Using os.path.realpath() and shutil.which() could also help distinguish gtar from bsdtar.
|