Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
e98bbd3b
Commit
e98bbd3b
authored
Dec 07, 2017
by
Moritz Angermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide --target-package-db flag
parent
1283d833
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
51 deletions
+68
-51
Cabal/Distribution/Simple/Setup.hs
Cabal/Distribution/Simple/Setup.hs
+59
-50
cabal-install/Distribution/Client/Setup.hs
cabal-install/Distribution/Client/Setup.hs
+9
-1
No files found.
Cabal/Distribution/Simple/Setup.hs
View file @
e98bbd3b
...
...
@@ -950,30 +950,35 @@ copyCommand = CommandUI
]
,
commandDefaultFlags
=
defaultCopyFlags
,
commandOptions
=
\
showOrParseArgs
->
[
optionVerbosity
copyVerbosity
(
\
v
flags
->
flags
{
copyVerbosity
=
v
})
(
filter
((`
notElem
`
[
"target-package-db"
])
.
optionName
))
$
copyOptions
showOrParseArgs
}
,
optionDistPref
copyDistPref
(
\
d
flags
->
flags
{
copyDistPref
=
d
})
showOrParseArgs
copyOptions
::
ShowOrParseArgs
->
[
OptionField
CopyFlags
]
copyOptions
showOrParseArgs
=
[
optionVerbosity
copyVerbosity
(
\
v
flags
->
flags
{
copyVerbosity
=
v
})
,
option
""
[
"destdir"
]
"directory to copy files to, prepended to installation directories"
copyDest
(
\
v
flags
->
case
copyDest
flags
of
Flag
(
CopyToDb
_
)
->
error
"Use either 'destdir' or 'target-package-db'."
_
->
flags
{
copyDest
=
v
})
(
reqArg
"DIR"
(
succeedReadE
(
Flag
.
CopyTo
))
(
\
f
->
case
f
of
Flag
(
CopyTo
p
)
->
[
p
];
_
->
[]
))
,
option
""
[
"target-package-db"
]
"package database to copy files into. Required when using ${pkgroot} prefix."
copyDest
(
\
v
flags
->
case
copyDest
flags
of
NoFlag
->
flags
{
copyDest
=
v
}
Flag
NoCopyDest
->
flags
{
copyDest
=
v
}
_
->
error
"Use either 'destdir' or 'target-package-db'."
)
(
reqArg
"DATABASE"
(
succeedReadE
(
Flag
.
CopyToDb
))
(
\
f
->
case
f
of
Flag
(
CopyToDb
p
)
->
[
p
];
_
->
[]
))
]
}
,
optionDistPref
copyDistPref
(
\
d
flags
->
flags
{
copyDistPref
=
d
})
showOrParseArgs
,
option
""
[
"destdir"
]
"directory to copy files to, prepended to installation directories"
copyDest
(
\
v
flags
->
case
copyDest
flags
of
Flag
(
CopyToDb
_
)
->
error
"Use either 'destdir' or 'target-package-db'."
_
->
flags
{
copyDest
=
v
})
(
reqArg
"DIR"
(
succeedReadE
(
Flag
.
CopyTo
))
(
\
f
->
case
f
of
Flag
(
CopyTo
p
)
->
[
p
];
_
->
[]
))
,
option
""
[
"target-package-db"
]
"package database to copy files into. Required when using ${pkgroot} prefix."
copyDest
(
\
v
flags
->
case
copyDest
flags
of
NoFlag
->
flags
{
copyDest
=
v
}
Flag
NoCopyDest
->
flags
{
copyDest
=
v
}
_
->
error
"Use either 'destdir' or 'target-package-db'."
)
(
reqArg
"DATABASE"
(
succeedReadE
(
Flag
.
CopyToDb
))
(
\
f
->
case
f
of
Flag
(
CopyToDb
p
)
->
[
p
];
_
->
[]
))
]
emptyCopyFlags
::
CopyFlags
emptyCopyFlags
=
mempty
...
...
@@ -1024,36 +1029,40 @@ installCommand = CommandUI
"Usage: "
++
pname
++
" install [FLAGS]
\n
"
,
commandDefaultFlags
=
defaultInstallFlags
,
commandOptions
=
\
showOrParseArgs
->
[
optionVerbosity
installVerbosity
(
\
v
flags
->
flags
{
installVerbosity
=
v
})
,
optionDistPref
installDistPref
(
\
d
flags
->
flags
{
installDistPref
=
d
})
showOrParseArgs
,
option
""
[
"inplace"
]
"install the package in the install subdirectory of the dist prefix, so it can be used without being installed"
installInPlace
(
\
v
flags
->
flags
{
installInPlace
=
v
})
trueArg
,
option
""
[
"shell-wrappers"
]
"using shell script wrappers around executables"
installUseWrapper
(
\
v
flags
->
flags
{
installUseWrapper
=
v
})
(
boolOpt
[]
[]
)
,
option
""
[
"package-db"
]
""
installPackageDB
(
\
v
flags
->
flags
{
installPackageDB
=
v
})
(
choiceOpt
[
(
Flag
UserPackageDB
,
(
[]
,[
"user"
]),
"upon configuration register this package in the user's local package database"
)
,
(
Flag
GlobalPackageDB
,
(
[]
,[
"global"
]),
"(default) upon configuration register this package in the system-wide package database"
)])
,
option
""
[
"target-package-db"
]
"package database to copy files into. Required when using ${pkgroot} prefix."
installDest
(
\
v
flags
->
flags
{
installDest
=
v
})
(
reqArg
"DATABASE"
(
succeedReadE
(
Flag
.
CopyToDb
))
(
\
f
->
case
f
of
Flag
(
CopyToDb
p
)
->
[
p
];
_
->
[]
))
]
(
filter
((`
notElem
`
[
"target-package-db"
])
.
optionName
))
$
installOptions
showOrParseArgs
}
installOptions
::
ShowOrParseArgs
->
[
OptionField
InstallFlags
]
installOptions
showOrParseArgs
=
[
optionVerbosity
installVerbosity
(
\
v
flags
->
flags
{
installVerbosity
=
v
})
,
optionDistPref
installDistPref
(
\
d
flags
->
flags
{
installDistPref
=
d
})
showOrParseArgs
,
option
""
[
"inplace"
]
"install the package in the install subdirectory of the dist prefix, so it can be used without being installed"
installInPlace
(
\
v
flags
->
flags
{
installInPlace
=
v
})
trueArg
,
option
""
[
"shell-wrappers"
]
"using shell script wrappers around executables"
installUseWrapper
(
\
v
flags
->
flags
{
installUseWrapper
=
v
})
(
boolOpt
[]
[]
)
,
option
""
[
"package-db"
]
""
installPackageDB
(
\
v
flags
->
flags
{
installPackageDB
=
v
})
(
choiceOpt
[
(
Flag
UserPackageDB
,
(
[]
,[
"user"
]),
"upon configuration register this package in the user's local package database"
)
,
(
Flag
GlobalPackageDB
,
(
[]
,[
"global"
]),
"(default) upon configuration register this package in the system-wide package database"
)])
,
option
""
[
"target-package-db"
]
"package database to install into. Required when using ${pkgroot} prefix."
installDest
(
\
v
flags
->
flags
{
installDest
=
v
})
(
reqArg
"DATABASE"
(
succeedReadE
(
Flag
.
CopyToDb
))
(
\
f
->
case
f
of
Flag
(
CopyToDb
p
)
->
[
p
];
_
->
[]
))
]
emptyInstallFlags
::
InstallFlags
emptyInstallFlags
=
mempty
...
...
cabal-install/Distribution/Client/Setup.hs
View file @
e98bbd3b
...
...
@@ -1630,12 +1630,20 @@ installCommand = CommandUI {
commandDefaultFlags
=
(
mempty
,
mempty
,
mempty
,
mempty
),
commandOptions
=
\
showOrParseArgs
->
liftOptions
get1
set1
-- Note: [Hidden Flags]
-- hide "constraint", "dependency", and
-- "exact-configuration" from the configure options.
(
filter
((`
notElem
`
[
"constraint"
,
"dependency"
,
"exact-configuration"
])
.
optionName
)
$
configureOptions
showOrParseArgs
)
++
liftOptions
get2
set2
(
configureExOptions
showOrParseArgs
ConstraintSourceCommandlineFlag
)
++
liftOptions
get3
set3
(
installOptions
showOrParseArgs
)
++
liftOptions
get3
set3
-- hide "target-package-db" flag from the
-- install options.
(
filter
((`
notElem
`
[
"target-package-db"
])
.
optionName
)
$
installOptions
showOrParseArgs
)
++
liftOptions
get4
set4
(
haddockOptions
showOrParseArgs
)
}
where
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment