Why absolute soft links?

A forum for general AmigaOS 4.x support questions that are not platform-specific
joerg
Posts: 371
Joined: Sat Mar 01, 2014 5:42 am

Re: Why absolute soft links?

Post by joerg »

colinw wrote:I can live with that, it should also allow it to work with existing filesystems, i'll see what I can do.
I can't, I just did some tests and here is a simple example of something you broke with your soft link changes:
3.sfs2:> makedir a
3.sfs2:> cd a
3.sfs2:a> echo test > b
3.sfs2:a> makelink soft c b
3.sfs2:a> type c
test
3.sfs2:a> /
3.sfs2:> rename a d
3.sfs2:> cd d
3.sfs2:d> type c
TYPE: Konnte Eingabedatei "c" nicht oeffnen.
TYPE: Objekt nicht gefunden
3.sfs2:d>


If you change "dhx:foo/bar" to ":foo/bar" I could copy directories with soft links, for example GCC: or SDK:, to other partitions again (even if only if I copy everything), but I still can't move them around inside the same partition.
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1716
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Why absolute soft links?

Post by nbache »

Slayer wrote:1) does converting softlinks into actual files cause problems AND
Yes. If the "mother" file is updated (e.g. a new version of an .so is installed), the previous links (now independent files) which were expected to give access to the same file, are now accessing (or rather are themselves) an obsolete version.
2) is there more to softlinks than saving space
Yes, it's a matter of being able to access a particular file under different names and making sure it's (physically) the same file.

Best regards,

Niels
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

Re: Why absolute soft links?

Post by xenic »

@joerg
I can't, I just did some tests and here is a simple example of something you broke with your soft link changes:
In simple terms: If you rename a directory that contains soft links to files in the same directory, the links are broken when they must be absolute links.

I can't live with that either. We were better off with the links the way they were. The user has a choice of whether to use relative or absolute soft links and backing up partitions with ASyncWB worked.

I don't use Linux but I wonder if it has the same problems with links.
AmigaOne X1000 with 2GB memory - OS4.1 FE
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

Re: Why absolute soft links?

Post by xenic »

@joerg
As long as we're on the subject of link issues, there is a strange difference between FFS and SFS2 when it comes to links on write protected partitions. If you create a directory soft link on an FFS partition to a directory on another partition and then write protect the FFS partition (lock command), you can copy files to the directory link. Of course the files are actually written to the linked (target) directory. If you create the directory link on an SFS2 partiton and write protect it, you can't copy files to the directory link. You will get a "Volume write-protected" AmigaDOS requester instead. It's not a big problem but I just wonder why it works that way.
AmigaOne X1000 with 2GB memory - OS4.1 FE
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1479
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: Why absolute soft links?

Post by tonyw »

As I said before, filesystems are not all the same. They were all written by different people, in the days before we wrote down the specification of how an Amiga FS has to work. None of the old filesystems has been upgraded to meet that specification, nor is likely to be.

I apologise for misleading you earlier. I knew that some things had changed, but I believed that none of the changes had been released yet.
cheers
tony
User avatar
Slayer
Beta Tester
Beta Tester
Posts: 851
Joined: Tue Dec 21, 2010 4:19 am
Location: New Zealand

Re: Why absolute soft links?

Post by Slayer »

That 'surprisingly' make perfect exact sense

Thank you Niels :D
~Yes I am a Kiwi, No, I did not appear as an extra in 'Lord of the Rings'~
1x AmigaOne X5000 2.0GHz 2gM RadeonR9280X AOS4.x
3x AmigaOne X1000 1.8GHz 2gM RadeonHD7970 AOS4.x
Post Reply