New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjust write tests for DISTDIR and PORTAGE_TMPDIR to work with automount directories #1051
Adjust write tests for DISTDIR and PORTAGE_TMPDIR to work with automount directories #1051
Conversation
4ea5141
to
afe5f7e
Compare
If anyone wants to test this, you can set up an automount using systemd via an fstab entry like this:
Then run |
I'll test this out tomorrow, thank you! |
The patch lgtm, but I couldn't reproduce the bug with:
I could see this when I start the automount:
And after Portage tries to use it with
The merge succeeded. |
To reproduce the original issue, I guess you would need to include "/portage" in the mount point. For example:
Then, set |
Ah, thanks! I should've clocked that. Let me try. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reproduced, thanks!
It might be nice to put that in the commit message but it's not a big deal if you object.
Can do. |
Calling os.access() on ${PORTAGE_TMPDIR}/portage will not trigger any automount that the user may have configured there. Instead, just try to create a file and catch PermissionError. Bug: https://bugs.gentoo.org/890812 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
If DISTDIR is an automount, os.stat() will not trigger it. Just try to create a file instead. Bug: https://bugs.gentoo.org/485100 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
afe5f7e
to
62906c2
Compare
Bug: https://bugs.gentoo.org/485100
Bug: https://bugs.gentoo.org/890812