Re: :action depend for D

Bram Moolenaar <[email protected]>
Newsgroups gmane.comp.tools.aap.devel
Message-ID <[email protected]>
Lars Ivar Igesund wrote:

> > I didn't try it, but it looks like it should work OK if the user can
> > become root when necessary.  But it won't work for an ordinary user.
> > I'm not sure how to solve this.  We should offer the choice whether the
> > user wants to become root and install globally, or install in his home
> > directory only.  But that last option is something new, I don't know
> > what directory to use then.  ~/bin would be obvious, but not everybody
> > has that in $PATH.
> 
> I've attached a diff for what I think is the best solution or at least on
> the path to the best solution. What do you think? It worked as
> expected for me. I haven't tested it thouroughly though.

Asking the user for a path to install in at least offers a solution that
can work.  This is a step in the right direction.

The wording of the choices could be a bit better.  The user must have a
good idea of what happens when he makes the choice.

	----------
	The "ddepcheck" program cannot be found.
	Aap can build and install it for you, but you don't have write
	access to the Aap binaries directory.

	1. Become root and install in the Aap binaries directory.
	2. Specify another location to install ddepcheck.
	q. Quit
	Select an option: 

It's nice to make a loop, so that a retry is done for an invalid answer.

Note that with the seocnd choice, for this one instance Aap knows where
ddepcheck is located, thus Aap can continue.  Only the next time the
directory must be in $PATH.

A luxury version would parse $PATH and offer a choice in which of the
directories to install (only writable directories to be offered).

-- 
hundred-and-one symptoms of being an internet addict:
19. All of your friends have an @ in their names.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///


-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.