Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
66 user(s) are online (48 user(s) are browsing Forums)

Members: 0
Guests: 66

more...

Headlines

 
  Register To Post

APPDIR: and its implicitly created "symbolic links". (Removing the feature) [SOLVED]
Not too shy to talk
Not too shy to talk


See User information
I know I have posted quite a lot, but I am learning things about the AmigaOS 4 and I am really curious about what is happening.

Here is a classic example of what has been happening to me recently:

1. Try some cross compilation which inevitably is to build an executable built for my Amiga named "main"

2. SCP main to the Amiga's RAM Disk

3. Forget about the protection flags and run "main" in Shell

4. Get confused as to why when I do that a completely different program that I created called "main" gets executed!

So, since I am used to Linux it is quite a bewildering feature that the other MAIN program has a "symbolic link" in APPDIR: and since the AmigaOS does not see the actual "main" that I SCP'd as executable, it goes and runs the one that has a symbolic link created for it in APPDIR: since that is on the PATH.

I have to note that AmigaOS 4 is not Linux, but this is an.. interesting feature.


Edited by rjd324 on 2022/8/15 9:34:21
Go to top
Re: APPDIR: and its implicitly created "symbolic links"
Home away from home
Home away from home


See User information
@rjd324

Never *ever* think you posted *too much*.
There is no such thing, post as often as you want.

There is too less noise going on anyway...to my liking.

Yeah, AmigaOs is "special"
I like the Appdir feature, it even provides an automatic system-wide assign to all kinds of binaries.

People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top
Re: APPDIR: and its implicitly created "symbolic links"
Not too shy to talk
Not too shy to talk


See User information
APPDIR could be really useful. Unfortunately no one seems to have bothered to document how it works or how to stop it from doing stupid things.

Go to top
Re: APPDIR: and its implicitly created "symbolic links"
Just can't stay away
Just can't stay away


See User information
@rjd324

Quote:
3. Forget about the protection flags and run "main" in Shell.

4. Get confused as to why when I do that a completely different program that I created called "main" gets executed!

So, since I am used to Linux
But if you forgot to set the executable bit in Linux, wouldn't you potentially see the same, depending on your search path and the existance of other programs in it with the same name?

Normally, the APPDIR feature shouldn't cause any problems, because it is set to be last in the path by default.

Best regards,

Niels

Go to top
Re: APPDIR: and its implicitly created "symbolic links"
Not too shy to talk
Not too shy to talk


See User information
@nbache
Can't argue with that, you are right. The point was really about my realisation of the APPDIR:.

At this point I cannot really see how it is useful, but after using this more I may very well change my opinion.

And, if I do not like it, I can just remove it from the path.

Go to top
Re: APPDIR: and its implicitly created "symbolic links"
Just can't stay away
Just can't stay away


See User information
@rjd324

The intent of the appdir feature is that for most "normal" users, they can just use the program name in a shell (with no path) or in the default tool of a project, and it will launch the program from wherever it was last run, which would normally be what you want.

For some users (us beta testers for example), it can sometimes be a bit of a nuisance, and if the above description does not match what you normally want, you have to think about how (or whether) you use it. E.g. by explicitly stating paths, or by launching a program from within its directory (current dir is always earlier in the path than appdir - unless you've changed the default setup).

In cases of doubt, a "Which <program> ALL" is your friend.

Best regards,

Niels

Go to top
Re: APPDIR: and its implicitly created "symbolic links"
Home away from home
Home away from home


See User information
@NinjaCyborg

SYS:Documentation/appdir-handler.doc

Go to top
Re: APPDIR: and its implicitly created "symbolic links"
Just popping in
Just popping in


See User information
@rjd324
Also, make sure you have S:startup-sequence 53.12 as it changed in the way the appdir: path was added.
For example, it used to just be on the end of the "Path" line, now it is no longer there but instead has its own area just before the "LoadWB" line as;

Assign >nil: exists APPDIR:
if NOT WARN
Path ADD APPDIR:
endif

The reason it was done like this is to allow people that have the SDK installed to get the APPDIR: path always at the very end, and to also provide a test so that you don't get a pester-requester, if you happen to turn it off.

Enjoy...

Go to top
Re: APPDIR: and its implicitly created "symbolic links"
Not too shy to talk
Not too shy to talk


See User information
Hello,

yes, I use 53.12. I have just commented out that section of the startup-sequence.

Regards.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: APPDIR: and its implicitly created "symbolic links"
Not too shy to talk
Not too shy to talk


See User information
Back to this thread.

I still do not use AppDir, in the sense that I comment out the adding of it to the path in the ss file. In fact, every boot I delete the contents of it. Futile, of course because the OS will continue to create links there every session.

Some 3rd party scripts rely on it.

There is no way to actually stop the OS from creating links in APPDIR:, right?

BTW, I can see the benefits of it. It means that I don't need to hack 3rd party scripts and provide the path to my own installations etc. Regardless, still wondering if you can disable the creation of links in full.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: APPDIR: and its implicitly created "symbolic links"
Not too shy to talk
Not too shy to talk


See User information
@rjd324

I think you can just move the DEVS:DOSdrivers/APPDIR entry to
the SYS:Storage/DOSdrivers/ directory and reboot... et viola,
it's gone?

I agree with nbache, APPDIR: evolved into a reasonable solution
for most common user cases. Run something once and things then
just work for them the vast majority of the time.

Otherwise, using complete paths, assignments and so forth are
the easy solutions of pro-users for overriding control.

Good luck!

PJS

Go to top
Re: APPDIR: and its implicitly created "symbolic links"
Just popping in
Just popping in


See User information
@rjd324
Of course you can disable it simply by moving the APPDIR icon (via workbench)
from the DEVS/DOSDRIVERS drawer to STORAGE/DOSDRIVERS drawer
and then doing a reboot.

Don't edit the startup-sequence as you mentioned, just leave it as it was
so you can still get it auto-added to the path when required.

If you want to mount APPDIR afterwards, you can just double click on the
icon in STORAGE/DOSDRIVERS yourself, or in a shell, type; Mount APPDIR:
(Note the colon on the end).

Go to top
Re: APPDIR: and its implicitly created "symbolic links"
Not too shy to talk
Not too shy to talk


See User information
@colinw
@pjs

Thank you both.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: APPDIR: and its implicitly created "symbolic links". (Removing the feature) [SOLVED]
Just popping in
Just popping in


See User information
By the way, APPDIR can also be dismounted on request.
In a shell, type; Dismount APPDIR:
It will dismount nicely.

Go to top
Re: APPDIR: and its implicitly created "symbolic links"
Quite a regular
Quite a regular


See User information
@rjd324
I'd suggest you use the dismount to deactivate it when you specifically don't want it. I'm sure there are scripts and even programs that use the appdir feature to find and execute external applications. These might fail if appdir is disabled.

AmigaOne X1000, uA1
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project