Closed bzizou closed 3 days ago
Thank! Maybe there is some other way (more python'ish) way of doing things instead of just os.system
? @andrewprzh Will you please take a look?
Thank! Maybe there is some other way (more python'ish) way of doing things instead of just
os.system
?
Sure! I did this as a quick fix, working, but dirty ;-)
@bzizou Will you please check if the updated patch resolves downstream issue?
@bzizou Will you please check if the updated patch resolves downstream issue?
checking right now...
I had to squash the commits, to be able to get a single patch for downstream. Now, testing the package with this...
That's ok! Patch resulting from this PR applied to the package (https://github.com/NixOS/nixpkgs/compare/c27bbb2094c2f855092cc8cf96b7045f8a8a8337..ea7dabc17148dd26457ce4986b0cad405844ede3) Tests are passing!
This is a quick fix coming from a hack I had to do for the packaging of Spades 4.0.0 into NixOS :
The proposed patch is currently into the proposed update for the Nix Spades package, but it would be great if the fix is done upstream. The problem is that once installed, a Nix package has all the files with no write permission at all (files coming from packages are stored into a read-only directory). The Spades pipeline copies some data files to an output directory, but keeps the modes, even if the
preserve_mode
argument is set tofalse
because it uses theshutil.copytree()
function that implies ashutil.copystat()
that can not be disabled (see https://github.com/python/cpython/blob/4bf17c381fb7b465f0f26aecb94a6c54cf9be2d3/Doc/library/shutil.rst?plain=1#L237). So the copied files are read-only and the test pipeline fails. Giving the write access to the owner is enough to solve the issue.Co-authored by: Andrey Prjibelski andrewprzh@gmail.com