Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 612090

Summary: sys-apps/portage: add support for PROPERTIES="sparse-files" in ebuilds
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: Core - Ebuild SupportAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: normal CC: chutzpah
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 607868    
Bug Blocks: 193766    

Description Zac Medico gentoo-dev 2017-03-09 03:53:15 UTC
It would be nice if ebuilds could set RESTRICT="sparse-files" to assert that sparse files are supported.
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2017-03-09 19:24:56 UTC
Isn't that backwards???

RESTRICT="sparse-files"  means to me that they are NOT supported.
Comment 2 Zac Medico gentoo-dev 2017-03-09 19:29:39 UTC
I suppose we could make it PROPERTIES="sparse-files" instead. Patrick, sounds good to you?
Comment 3 Patrick McLean gentoo-dev 2017-03-09 19:33:27 UTC
I am fine with that, the main thing I want is the ability to have the package manager bomb out rather than happily merge a ~100G sparse file as something that is not sparse.
Comment 4 Zac Medico gentoo-dev 2017-12-09 22:25:56 UTC
The tar --sparse option is not currently used to pack binary packages.

Current versions of quickpkg do not support creation of sparse entries, and python's tarfile documentation states that sparse file support is read-only:

https://docs.python.org/3/library/tarfile.html#supported-tar-formats

Maybe there's some way to make the tarfile API write sparse entries that have been manually created somehow. The tar manual has an informative "Storing Sparse Files" section:

https://www.gnu.org/software/tar/manual/html_section/tar_92.html