bug-standards
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU standards: DESTDIR with symlinks


From: Adrian Mariano
Subject: Re: GNU standards: DESTDIR with symlinks
Date: Tue, 27 Sep 2022 18:42:41 -0400

On Tue, Sep 27, 2022 at 10:00:30AM -0400, Paul Smith wrote:
> On Mon, 2022-09-26 at 17:07 -0400, Adrian Mariano wrote:
> > > Speaking as someone who does a lot of relocating of things, IMO the
> > > correct solution is that the symlink resolves to a relative path,
> > > not a fully-qualified path, so that it works correctly regardless
> > > of whether the installation is used in-place or after relocation.
> > 
> > Surely when this is an option it would be the way to go.  But in my
> > case, a relative path between the files is not known because the link
> > is between datadir and sharedstatedir.
> 
> The only way it can be the case that you can have a fully-qualified
> path but not a relative path is if you are allowing the "origin" to be
> relocatable, but not the "target".
> 
> Else, it's quite feasible to turn any fully-qualified path into a
> relative path although it may require some shell (or makefile, if you
> require GNU make) trickery.

Well, assuming you're on a file system where there is one root, you
can presumably work your way back up to the root and then down to the
other file.  I don't know if that's true of every file system.
Someone who packages for CYGWIN was just complaining that lots of gnu
packages make assumptions that fail in his environment.  (The
assumption of one root clearly fails under Windows, where you have A:,
B:, C:, etc.)  

However, even if it is possible, is it *reasonable* to create a link like
../../../../../usr/share/foo?  I think not.  

I'll also note that under debian, it appears there is a program called
dh_link which applies symlink policy when a package is installed.
Apparently policy may actually prohibit relative links at least in
some cases, so they get converted.  



reply via email to

[Prev in Thread] Current Thread [Next in Thread]