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: David A. Wheeler
Subject: Re: Add redirection to "install" for package managers
Date: Sat, 14 Feb 2009 08:55:08 -0500
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)

Alfred M. Szmidt wrote:
   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.

I intend to wrap a few of the most common programs such as "cp" and "ln". Piping will work fine, as long as it pipes to a program that invokes them without a "/" prefix.

...

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

Not relevant for my needs. I'm trying to (easily) create .rpm and .deb packages, not actually installing the programs directly. Once I create the rpm/deb file, I intend to erase the entire DESTDIR subdirectory anyway. The rpm/deb packages would then be installed and uninstalled. If it _was_ relevant, I could wrap rm and rmdir.

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.

You can always add DESTDIR support to the install script; nothing I do will eliminate that approach. Indeed, I expect that there will cases that continue to need it.

But lots of software's install scripts essentially boil down to running "install", "cp", "mkdir", and "ln" to deal with directories like /usr/bin and /usr/lib... so I just want to automate a common case.

--- David A. Wheeler





reply via email to

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