bug-coreutils
[Top][All Lists]
Advanced

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

Re: Add redirection to "install" for package managers


From: Alfred M\. Szmidt
Subject: Re: Add redirection to "install" for package managers
Date: Fri, 13 Feb 2009 01:21:37 +0100

   I hope so. I'll creating that package, including a script named
   "install", and see if I don't need to patch GNU install.  That'll
   work for many cases.  (I plan to use the environment variable is
   REDIR_DESTDIR.)

   If it works EXCEPT that too many people invoke /usr/bin/install
   directly, then I'll gen up a modification of GNU install to do it,
   and return to this mailing list to pitch for it.

Just replacing install will not fix things, for example if a Makefile
invokes ln, cp, mv, install-info, or just pipes stuff, then your
scheme will not work at all.

It will also not work if one invokes chmod for some special case, the
permissioons where install puts the files will not be updated, and you
will end up at worst changing the permissions of a file directly under
prefix/exec-prefix; and at best have make barf that it couldn't find
the file.

It is also not reversible, `make uninstall DESTDIR=/foo' will not
work; and thus removing things in the wrong place in the worst case.

There is really only one correct solution to the problem, and that is
DESTDIR.  Intercepting file-system calls does not work, since it is
very OS specific, so it is not portable, nor will it work in all
cases.

If a Makefile does not honour DESTDIR, then it is a very serious bug,
and should be fixed upstreams, just like any random build bug since
that is what it is.

Cheers.




reply via email to

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