The script can't find resetprop if it isn't run from within it's directory. #101

Open
opened 2023-06-29 01:48:55 -04:00 by niobium93 · 1 comment
niobium93 commented 2023-06-29 01:48:55 -04:00 (Migrated from github.com)

The waydroid-script-git AUR package installs waydroid_script into /opt/waydroid-script/ and symlinks main.py to /usr/bin/waydroid-extras. This mostly seems to work, but when running the script from any random directory it sometimes fails like this:
sudo waydroid-extras install libndk

INFO: Downloading libndktranslation.zip now to /home/andrius/.cache/waydroid-script/downloads/libndktranslation.zip .....
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 14.4M/14.4M [00:00<00:00, 21.5MiB/s]
INFO: Extracting /home/andrius/.cache/waydroid-script/downloads/libndktranslation.zip to /tmp/libndkunpack
INFO: Copying libndk library files ...
Traceback (most recent call last):
  File "/usr/bin/waydroid-extras", line 343, in <module>
    main()
  File "/usr/bin/waydroid-extras", line 336, in main
    args.func(args)
  File "/usr/bin/waydroid-extras", line 107, in install_app
    item.install()
  File "/opt/waydroid-script/stuff/general.py", line 180, in install
    self.add_props()
  File "/opt/waydroid-script/stuff/general.py", line 76, in add_props
    shutil.copy(os.path.join(
  File "/usr/lib/python3.11/shutil.py", line 419, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.11/shutil.py", line 256, in copyfile
    with open(src, 'rb') as fsrc:
         ^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: './bin/x86_64/resetprop'

cd /opt/waydroid-script is a workaround, but it would be nice if the script could find it's own location and find dependencies based on that.

The [waydroid-script-git](https://aur.archlinux.org/packages/waydroid-script-git) AUR package installs waydroid_script into `/opt/waydroid-script/` and symlinks `main.py` to `/usr/bin/waydroid-extras`. This mostly seems to work, but when running the script from any random directory it sometimes fails like this: `sudo waydroid-extras install libndk` ``` INFO: Downloading libndktranslation.zip now to /home/andrius/.cache/waydroid-script/downloads/libndktranslation.zip ..... 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 14.4M/14.4M [00:00<00:00, 21.5MiB/s] INFO: Extracting /home/andrius/.cache/waydroid-script/downloads/libndktranslation.zip to /tmp/libndkunpack INFO: Copying libndk library files ... Traceback (most recent call last): File "/usr/bin/waydroid-extras", line 343, in <module> main() File "/usr/bin/waydroid-extras", line 336, in main args.func(args) File "/usr/bin/waydroid-extras", line 107, in install_app item.install() File "/opt/waydroid-script/stuff/general.py", line 180, in install self.add_props() File "/opt/waydroid-script/stuff/general.py", line 76, in add_props shutil.copy(os.path.join( File "/usr/lib/python3.11/shutil.py", line 419, in copy copyfile(src, dst, follow_symlinks=follow_symlinks) File "/usr/lib/python3.11/shutil.py", line 256, in copyfile with open(src, 'rb') as fsrc: ^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: './bin/x86_64/resetprop' ``` `cd /opt/waydroid-script` is a workaround, but it would be nice if the script could find it's own location and find dependencies based on that.
austinrojers commented 2023-07-01 13:29:14 -04:00 (Migrated from github.com)

Yup, same issue here.
But it works after the first time we run it from /opt/waydroid-script/ directory.

Yup, same issue here. But it works after the first time we run it from `/opt/waydroid-script/` directory.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wbruno/waydroid_script#101