Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

AndroWish: "./lib" in auto_path -> so not allowed to change pwd ?

34 views
Skip to first unread message

Harald Oehlmann

unread,
Apr 12, 2019, 11:32:23 AM4/12/19
to
Hi TCL'ers,

still exploring AndroWish.

% set auto_path:
/assets/tcl8.6 /assets ./lib /assets/vfs1.4.2/template /assets/sdl2tk8.6
/assets/sdl2tk8.6/ttk
% pwd
/
% glob /lib/*
/lib/armeabi

I am surprised, that "./lib" is by default in the auto_path.

Does that mean, that it is not allowed to change the current path (pwd)?

Thank you,
Harald

Rich

unread,
Apr 12, 2019, 2:42:51 PM4/12/19
to
Harald Oehlmann <wort...@yahoo.de> wrote:
> Hi TCL'ers,
>
> still exploring AndroWish.
>
> % set auto_path:
> /assets/tcl8.6 /assets ./lib /assets/vfs1.4.2/template /assets/sdl2tk8.6
> /assets/sdl2tk8.6/ttk
> % pwd
> /
> % glob /lib/*
> /lib/armeabi
>
> I am surprised, that "./lib" is by default in the auto_path.

Wow, I was surprised enough by that I had to look on the androwish on
my phone.

Yep, I've got a ./lib entry too.

That entry seems "not right" for the system inserted paths. So I
suspect it may be an overlooked 'file normalize' call during the setup.

> Does that mean, that it is not allowed to change the current path
> (pwd)?

Unsure, but certianly if anything Tcl needed a file from "./lib" and
you changed the working directory, the lookup would fail. But
/lib/armeabi sounds like an android system library path, so it is
unlikely to contain anything Tcl, so changing pwd is unlikely to
produce any different outcomes. Which may be why it has not been
noticed until now.

I'd suggest you report it to the androwish developers and see what they
have to say.

undro...@gmail.com

unread,
Apr 12, 2019, 5:17:33 PM4/12/19
to
Ooooopsie, you found a bug, see fix in https://www.androwish.org/index.html/info/3f0769cc0a01e355

[info nameofexecutable] reports an empty string on Android due to the very
different startup by some black magic called zygote (although I meanwhile
believe it is a black whole in the Android/Java/Dalvik/Matrix/whatever
universe which only sometimes allows to escape other things like Tcl/Tk).

Take care,
Christian

Harald Oehlmann

unread,
Apr 13, 2019, 6:13:49 AM4/13/19
to
Thank you, Christian,

what I understand from the fix is, that the path component "./lib" is
not important and may be removed and will be removed in future.

Thanks,
Harald

undro...@gmail.com

unread,
Apr 13, 2019, 6:43:49 AM4/13/19
to
Am Samstag, 13. April 2019 12:13:49 UTC+2 schrieb Harald Oehlmann:

> what I understand from the fix is, that the path component "./lib" is
> not important and may be removed and will be removed in future.

Yes, exactly. It never was needed, escaped a thorough review, and will
be eliminated … and hopefully isn't relied on by some application.

All the best,
Christian

Harald Oehlmann

unread,
Apr 13, 2019, 6:48:55 AM4/13/19
to
Great! thank you, Christian, for the continuous work,
Harald
0 new messages