-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow ${pkgroot} prefix. #4892
Allow ${pkgroot} prefix. #4892
Conversation
@23Skidoo, @hvr this is not good, AppVeyor seems dead:
|
I'm OK with adding an undocumented dangerous feature, but it'd be nice if @dcoutts could take a look. |
I think I'll go and add |
1819704
to
e3dd744
Compare
@23Skidoo how does this look now? |
@23Skidoo, @hvr any chance I can get a review of this an a prelimiary one of #4874? As the general plan (as I understood @bgamari) now is to try to go ahead with snowleopard/hadrian#445 for 8.4, both are pre-requisits. And I'd like to get them finished in Cabal as soon as I can. As such any critique or "please do this and that" would be much appreciated! Sorry to bother :( |
@@ -1663,6 +1665,12 @@ installOptions showOrParseArgs = | |||
"Do not install anything, only print what would be installed." | |||
installDryRun (\v flags -> flags { installDryRun = v }) | |||
trueArg | |||
|
|||
, option "" ["target-package-db"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this a hidden option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you give me a pointer where I can find a hidden option? I've tried looking for hiddenOption, and anything with hidden and option, but didn't turn anything up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
-- |The location prefix for the /copy/ command. | ||
data CopyDest | ||
= NoCopyDest | ||
| CopyTo FilePath | ||
deriving (Eq, Show) | ||
| CopyToDb FilePath |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a Haddock comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
Cabal/Distribution/Simple/Setup.hs
Outdated
copyDest (\v flags -> case copyDest flags of | ||
NoFlag -> flags { copyDest = v } | ||
Flag NoCopyDest -> flags { copyDest = v } | ||
_ -> error "Use either 'destdir' or 'target-package-db'.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use either 'destdir' or 'target-package-db'
, but not both? I think that this breaks --destdir=foo --destdir=bar
, which used to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, if --target-package-db
is given, --destdir
makes no sense. But allowing to specify --destdir
twice (that would just take the latter one, I believe), if that used to be the behaviour should definitely stay that way.
@angerman Hidden flags are currently implemented in a somewhat ad hoc way, see https://github.com/haskell/cabal/blob/master/cabal-install/Distribution/Client/Setup.hs#L1617 for an example. |
Note to self: hidden flag is missing to for this to close. |
This change adds the ability to pass `--prefix=\${pkgroot}`. It is on purpose undocumented, as it should be only used with absolute care.
9e40864
to
e98bbd3
Compare
@23Skidoo is this good to go with the hidden flags? (assuming CI doesn't throw up). |
@angerman Yep, this is good to go. |
This change adds the ability to pass
--prefix=\${pkgroot}
. It is on purpose undocumented, as it should be only used with absolute care.Please include the following checklist in your PR:
[ci skip]
is used to avoid triggering the build bots.Please also shortly describe how you tested your change. Bonus points for added tests!
Fixes #4872