Re: :assertpkg with path?

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

> I tried to install agide using aap --install. The install
> itself went fine, the only problem was finding the
> additional packages like gvim and mingw. I'm not
> always a fan of putting everything in the path. gvim
> is no problem in that respect, but as I have both
> mingw and cygwin installed, I never have more than
> one of them in the path. At the moment, that is not
> mingw and thus aap --install didn't find it.

"aap --install agide" doesn't look for MinGW specifically, it looks for
a "gdb" command.  If it is not found then you are offered to install
MinGW, since that's the best way to get a working gdb command (as far as
I know).

I also have various sets of gcc/gdb on my system.  I have to be careful
to set the $PATH before starting Agide.  That's not a nice solution, but
it's difficult to make all the tools work when $PATH isn't right.

> I looked at the assert_pkg function and it was easy
> to let the user add a path to search. This isn't useful
> until agide can find this path at runtime, though.

Thus your idea is: When Aap cannot find "gdb", ask the user where it is
located.  This indeed is only useful when the path is stored somewhere.
Otherwise the user could simply chose to skip installing a package.

> Should assertpkg have the possibility to return the
> path provided by the user so that it can be stored in
> a config file?

This is possible.  There already is a config file, I sometimes use this
to test different versions of gvim.  But it currently only exists in the
home directory of the user.  For this path we need an installation-wide
config file.

> Of course this wouldn't help with mingw as the agide
> bootstrap recipe don't use assertpkg but progsearch
> and some other stuff.
> 
> Maybe a :progpath command would be of use?
> 
> :progpath varname progname...
> 
> which lets the user supply a path if the program is
> not found in $PATH and put in the variable varname.
>
> When the programpaths are ready, it's up to the
> bootstrap recipe to put it into the relevant config file.

I don't see how this helps.  The Agide bootstrap recipe cannot contain
user choices.  We simply can't find "gdb" when it's not in the path.

For recipes that the user writes he can include the path in the command
name, e.g. "GCC = d:\Mingw\bin\gcc".  You can put this in your
~/.aap/startup/default.aap recipe.

-- 
Engineers understand that their appearance only bothers other people and
therefore it is not worth optimizing.
				(Scott Adams - The Dilbert principle)

 /// 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 is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
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.