addpkg(main/python-trash-cli): 0.24.5.26#28877
Conversation
ddfbc97 to
e738897
Compare
|
The data being mocked here does vary slightly between different devices, for example on Samsung Galaxy S III it's this, but this is expected to be an approximation close enough for |
be3c052 to
ada948a
Compare
|
Ok now, on samsung galaxy S III I can see that |
|
this is sufficient to allow the commands |
ada948a to
aa932b4
Compare
psutil.disk_partitions()/storage/emulated/0 mountpoint for the Termux derivative of the XDG Trash specification in Python packages
aa932b4 to
0022358
Compare
/storage/emulated/0 mountpoint for the Termux derivative of the XDG Trash specification in Python packages0022358 to
783787e
Compare
- termux#28186 but for Python ecosystem instead of Rust ecosystem - Implement the fake `/storage/emulated/0` mountpoint for the Termux derivative of the XDG Trash specification in `python-trash-cli` In some Termux packages, a fake mountpoint at `/storage/emulated/0` is mocked because it successfully causes Trashing files from `/storage/emulated/0` and subfolders to go to a new or existing `.Trash-$(id -u)` folder in `/storage/emulated/0` instead of `/storage/emulated` being detected as the real mountpoint (it is) and causing permission denied errors because Termux only has permission for `/storage/emulated/0`, not `/storage/emulated`. Doing that also reportedly allows Termux to detect and manage `.Trash-$(id -u)` folders created in `/storage/emulated/0` by desktop PCs when the Android device was plugged into them and files were then Trashed from the PC file browser, because there, that location does technically use a real mountpoint. While such a behavior of special-casing `/storage/emulated/0` when it's not actually a real mountpoint is not part of the XDG Trash specification, it has been reported that the most natural expected behavior for users trying to use XDG Trash tools in Termux is for them to treat `/storage/emulated/0` as though it were a mountpoint that should be calculated as a valid directory for `.Trash-$(id -u)` folders, so this is deviating from the XDG Trash specification in the same way as the Rust packages currently are, meaning that this will allow Python to be able to find and manage the same Trashed files that were Trashed from the Rust packages like `yazi`, and vice versa. - Fixes the error `Permission denied: '/proc/filesystems'` in the command `python -c "import psutil; print(psutil.disk_partitions())"` - Fixes this series of commands: ``` pip install trash-cli termux-setup-storage cd /storage/emulated/0 touch tempfile trash-put tempfile ```
783787e to
b25a93f
Compare
fix(main/yazi): force-enable
trash-rssupport on Android #28186 but for Python ecosystem instead of Rust ecosystemImplement the fake
/storage/emulated/0mountpoint for the Termux derivative of the XDG Trash specification inpython-trash-cliIn some Termux packages, a fake mountpoint at
/storage/emulated/0is mocked because it successfully causes Trashing files from
/storage/emulated/0and subfolders to go to a new or existing
.Trash-$(id -u)folder in/storage/emulated/0instead of/storage/emulatedbeing detected as the real mountpoint (it is) and causingpermission denied errors because Termux only has permission for
/storage/emulated/0,not
/storage/emulated.Doing that also reportedly allows Termux to detect and manage
.Trash-$(id -u)folderscreated in
/storage/emulated/0by desktop PCs when the Androiddevice was plugged into them and files were then Trashed from the PC file browser,
because there, that location does technically use a real mountpoint.
While such a behavior of special-casing
/storage/emulated/0when it's notactually a real mountpoint is not part of the XDG Trash specification,
it has been reported that the most natural expected behavior for users trying to
use XDG Trash tools in Termux is for them to treat
/storage/emulated/0as thoughit were a mountpoint that should be calculated as a valid directory for
.Trash-$(id -u)folders, so this is deviating from the XDG Trash specification in the same way as the Rust packages currently are, meaning that this will allow Python to be able to find and manage the same Trashed files that were Trashed from the Rust packages likeyazi, and vice versa.Fixes the error
Permission denied: '/proc/filesystems'in the commandpython -c "import psutil; print(psutil.disk_partitions())"Fixes this series of commands: