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

Bug 649528

Summary: prepstrip: Preservation of extended attributes using xattr-helper.py broken
Product: Portage Development Reporter: Arfrever Frehtes Taifersar Arahesis <arfrever.fta>
Component: CoreAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: kfm
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 651804    
Attachments: Patch

Description Arfrever Frehtes Taifersar Arahesis 2018-03-04 02:42:40 UTC
When getfattr or setfattr is unavailable:

https://gitweb.gentoo.org/proj/portage.git/tree/bin/ebuild-helpers/prepstrip?id=891926ba231380c4aa0768be0aa0ae1ed2bc6ae7#n43

As of now, this code does not work for unknown reasons.
Comment 1 Arfrever Frehtes Taifersar Arahesis 2018-03-04 05:34:03 UTC
In xattr-helper.py, restore_xattrs() reads standard input:
https://gitweb.gentoo.org/proj/portage.git/tree/bin/xattr-helper.py?id=aff97baa3625cabdf71fea9a0256381282040860#n125

Standard input was exhausted since:
https://gitweb.gentoo.org/proj/portage.git/commit/?id=345c54de9e8c9daac190fbb07d33bf40e7bac5a9
+	if not options.paths:
+		options.paths += [x for x in file_in.read().split(b'\0') if x]
Comment 2 Arfrever Frehtes Taifersar Arahesis 2018-03-04 05:34:32 UTC
Created attachment 522262 [details, diff]
Patch
Comment 3 Larry the Git Cow gentoo-dev 2018-03-04 18:22:37 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=56350cb6b1ee0b93a86e27bc59f7d3a0e73ad220

commit 56350cb6b1ee0b93a86e27bc59f7d3a0e73ad220
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
AuthorDate: 2018-03-04 05:32:20 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2018-03-04 18:22:05 +0000

    xattr-helper.py: Make restoring of extended attributes work again.
    
    Set options.paths using standard input only in dump mode.
    Also fix support for paths passed as arguments.
    
    Bug: https://bugs.gentoo.org/649528
    Fixes: 345c54de9e8c9daac190fbb07d33bf40e7bac5a9

 bin/xattr-helper.py | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)}
Comment 4 Zac Medico gentoo-dev 2018-03-04 18:26:17 UTC
Thanks!
Comment 5 Zac Medico gentoo-dev 2018-07-02 18:46:45 UTC
Fixed in portage-2.3.40-r1.