Re: [Haskell-cafe] cabal --user question

2005-07-11 Thread Frederik Eaton
Hi Isaac,

Is there a way to specify a particular package.conf for use when
installing and registering packages with Cabal? I'm trying to
Cabal-ize WASH which has a number of packages which depend on each
other. The problem is that in order to build the next package, the
previous one has to be installed, yet users typically want to do a
full build *before* installing anything. I was thinking that for the
'make' step it could just install each package locally and register it
in a local package.conf (i.e. somewhere in the project tree), and then
'make install' would rerun the install commands with the final install
location and final package database as arguments. But I can't figure
out how to specify the local package.conf to 'configure' or 'install',
there are just the '--user' and '--global' commands which aren't quite
enough.

Frederik
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal --user question

2005-07-10 Thread Frederik Eaton
I forgot to say, when I run configure like

runghc Setup.hs configure --with-hc-pkg="ghc-pkg --user" --prefix=$HOME

and then run 'install', it exits with code 127 but displays no error
message. Maybe something to look into...

Frederik

On Sun, Jul 10, 2005 at 05:00:13PM -0700, Frederik Eaton wrote:
> Thanks for the quick reply!
> 
> > > How do I install a package in the user package.conf with cabal? It is
> > > not clear to me how to do this, looking at the output of 'configure
> > > --help'. There is an option "--user" to get dependencies from the user
> > > cabal file but this still, somewhat counterintuitively, tries to
> > > install the package in the global location (why would one want such
> > > behavior?). Specifying '--with-hc-pkg="ghc-pkg --user"' doesn't seem
> > > to work either, when I do this then 'install' and 'unregister'
> > > complete without error but apparently have no effect.
> > 
> > ./setup configure --user #if it depends on user-local packages
> > ./setup build
> > ./setup install --user
> 
> Ah, I see.
> 
> > Perhaps install --user should be the default if you configure --user.
> 
> Yeah, it seems somewhat inconsistent - everything about the
> installation of a package is usually controlled by 'configure' options
> (e.g. in autoconf), even in cabal the prefix is still part of
> 'configure' but the other relevant installation parameter is specified
> as an option to 'install'...
> 
> For one, it means that I can't just call "./setup unregister" to
> unregister my package, I have to remember which arguments I passed to
> 'register' or 'install'. It seems like a bad design to me. At the very
> least, I should be able to specify the default behavior (user or
> global) at configure time so that if I run these commands without
> arguments they behave in a way that is consistent with each other and
> with the package configuration.
> 
> Is there a reason why there is no 'uninstall' command, by the way? It
> might be useful.
> 
> Also, I would shorten the '--copy-prefix' argument to 'copy' to just
> '--prefix' unless there is a good reason for having it that way. The
> "copy-" part seems reduntant to me. That's my opinion.
> 
> > The user's guide is here:
> > 
> > http://www.haskell.org/ghc/docs/latest/html/Cabal/
> 
> Thanks,
> 
> Frederik
> 
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal --user question

2005-07-10 Thread Frederik Eaton
Thanks for the quick reply!

> > How do I install a package in the user package.conf with cabal? It is
> > not clear to me how to do this, looking at the output of 'configure
> > --help'. There is an option "--user" to get dependencies from the user
> > cabal file but this still, somewhat counterintuitively, tries to
> > install the package in the global location (why would one want such
> > behavior?). Specifying '--with-hc-pkg="ghc-pkg --user"' doesn't seem
> > to work either, when I do this then 'install' and 'unregister'
> > complete without error but apparently have no effect.
> 
> ./setup configure --user #if it depends on user-local packages
> ./setup build
> ./setup install --user

Ah, I see.

> Perhaps install --user should be the default if you configure --user.

Yeah, it seems somewhat inconsistent - everything about the
installation of a package is usually controlled by 'configure' options
(e.g. in autoconf), even in cabal the prefix is still part of
'configure' but the other relevant installation parameter is specified
as an option to 'install'...

For one, it means that I can't just call "./setup unregister" to
unregister my package, I have to remember which arguments I passed to
'register' or 'install'. It seems like a bad design to me. At the very
least, I should be able to specify the default behavior (user or
global) at configure time so that if I run these commands without
arguments they behave in a way that is consistent with each other and
with the package configuration.

Is there a reason why there is no 'uninstall' command, by the way? It
might be useful.

Also, I would shorten the '--copy-prefix' argument to 'copy' to just
'--prefix' unless there is a good reason for having it that way. The
"copy-" part seems reduntant to me. That's my opinion.

> The user's guide is here:
> 
> http://www.haskell.org/ghc/docs/latest/html/Cabal/

Thanks,

Frederik
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] cabal --user question

2005-07-10 Thread Isaac Jones
Frederik Eaton <[EMAIL PROTECTED]> writes:

> Hi,
>
> How do I install a package in the user package.conf with cabal? It is
> not clear to me how to do this, looking at the output of 'configure
> --help'. There is an option "--user" to get dependencies from the user
> cabal file but this still, somewhat counterintuitively, tries to
> install the package in the global location (why would one want such
> behavior?). Specifying '--with-hc-pkg="ghc-pkg --user"' doesn't seem
> to work either, when I do this then 'install' and 'unregister'
> complete without error but apparently have no effect.

./setup configure --user #if it depends on user-local packages
./setup build
./setup install --user

Perhaps install --user should be the default if you configure --user.


The user's guide is here:

http://www.haskell.org/ghc/docs/latest/html/Cabal/

peace,

  isaac
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] cabal --user question

2005-07-10 Thread Frederik Eaton
Hi,

How do I install a package in the user package.conf with cabal? It is
not clear to me how to do this, looking at the output of 'configure
--help'. There is an option "--user" to get dependencies from the user
cabal file but this still, somewhat counterintuitively, tries to
install the package in the global location (why would one want such
behavior?). Specifying '--with-hc-pkg="ghc-pkg --user"' doesn't seem
to work either, when I do this then 'install' and 'unregister'
complete without error but apparently have no effect.

Thanks in advance,

Frederik
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe