You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
install-method and overwrite-policy in .cabal/config are ignored #5942
So, this is more complex than I thought. Seems like those two flags, when absent, do not generate a NoFlag, but a Flag mempty, which overrides the configured one. Oddly, other new-install flags like --env-file, DO generate a NoFlag when absent.
The v2-configure / v2-build command with --prefix seems to have no effects. The default prefix $HOME/.cabal... is still used, and does not being written to cabal.project.local. It even does not go through path checkings, where it should complain on non-absolute paths.
@andy0130tw if I remember correctly --prefix is a Cabal-the-library flag, which does not have effect on cabal-install. It's only there in the --help because cabal-installdoes accept some Cabal flags, so the whole set of options was put in there.
I might be wrong though. Did it have an effect on v1-build?
Also maybe --store-dir, which set the store directory, could be what you need
@fgaz: I was mainly compiling Agda and needed to specify datadir pointing to its libraries. Soon I realized that the --prefix argument is what I wanted. I used apt install in Debian Stretch, and there was only v1 in the repository.
Apparently, the prefix argument worked in v1, but not in v2 and later.
Activity
fgaz commentedon Mar 17, 2019
Good catch! I think I know why it happens, should be quick to fix
fgaz commentedon Mar 23, 2019
So, this is more complex than I thought. Seems like those two flags, when absent, do not generate a
NoFlag, but aFlag mempty, which overrides the configured one. Oddly, other new-install flags like --env-file, DO generate aNoFlagwhen absent.benjaminselfridge commentedon Apr 2, 2019
@fgaz Any update on this?
fgaz commentedon Apr 17, 2019
@benjaminselfridge nope. I'ts next on my cabal todo list though
saurabhkukade commentedon May 14, 2020
I am still facing this issue.
I have entry of flag in my ~/.cabal/config file as
-- overwrite-policy: alwaysbut still
cabal installis ignoring the flag.phadej commentedon May 14, 2020
--starts a comment line.andy0130tw commentedon Aug 14, 2020
The
v2-configure/v2-buildcommand with--prefixseems to have no effects. The default prefix$HOME/.cabal... is still used, and does not being written tocabal.project.local. It even does not go through path checkings, where it should complain on non-absolute paths.fgaz commentedon Aug 14, 2020
@andy0130tw if I remember correctly --prefix is a
Cabal-the-library flag, which does not have effect oncabal-install. It's only there in the--helpbecausecabal-installdoes accept someCabalflags, so the whole set of options was put in there.I might be wrong though. Did it have an effect on v1-build?
Also maybe
--store-dir, which set the store directory, could be what you needandy0130tw commentedon Aug 17, 2020
@fgaz: I was mainly compiling Agda and needed to specify
datadirpointing to its libraries. Soon I realized that the--prefixargument is what I wanted. I usedapt installin Debian Stretch, and there was only v1 in the repository.Apparently, the prefix argument worked in v1, but not in v2 and later.
fgaz commentedon Aug 19, 2020
@andy0130tw
Could you explain further? I'm not sure I understand the use case
edit: also I think you should open a separate issue for this, as it's a separate problem