Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
2e604aa0
Commit
2e604aa0
authored
Jul 10, 2016
by
Edward Z. Yang
Browse files
Correctly pass setup options to sdist invocation.
Signed-off-by:
Edward Z. Yang
<
ezyang@cs.stanford.edu
>
parent
4f796f22
Changes
3
Hide whitespace changes
Inline
Side-by-side
cabal-install/Distribution/Client/ProjectBuilding.hs
View file @
2e604aa0
...
...
@@ -1197,7 +1197,7 @@ buildInplaceUnpackedPackage verbosity
--TODO: [required eventually] this doesn't track file
--non-existence, so we could fail to rebuild if someone
--adds a new file which changes behavior.
allSrcFiles
<-
allPackageSourceFiles
verbosity
srcdir
allSrcFiles
<-
allPackageSourceFiles
verbosity
scriptOptions
srcdir
updatePackageBuildFileMonitor
packageFileMonitor
srcdir
timestamp
pkg
buildStatus
...
...
cabal-install/Distribution/Client/Sandbox/Timestamp.hs
View file @
2e604aa0
...
...
@@ -38,6 +38,7 @@ import Distribution.Client.SrcDist (allPackageSourceFiles)
import
Distribution.Client.Sandbox.Index
(
ListIgnoredBuildTreeRefs
(
ListIgnored
),
RefTypesToList
(
OnlyLinks
)
,
listBuildTreeRefs
)
import
Distribution.Client.SetupWrapper
import
Distribution.Compat.Exception
(
catchIO
)
import
Distribution.Compat.Time
(
ModTime
,
getCurTime
,
...
...
@@ -227,7 +228,9 @@ withActionOnCompilerTimestamps f sandboxDir compId platform act = do
isDepModified
::
Verbosity
->
ModTime
->
AddSourceTimestamp
->
IO
Bool
isDepModified
verbosity
now
(
packageDir
,
timestamp
)
=
do
debug
verbosity
(
"Checking whether the dependency is modified: "
++
packageDir
)
depSources
<-
allPackageSourceFiles
verbosity
packageDir
-- TODO: we should properly plumb the correct options through
-- instead of using defaultSetupScriptOptions
depSources
<-
allPackageSourceFiles
verbosity
defaultSetupScriptOptions
packageDir
go
depSources
where
...
...
cabal-install/Distribution/Client/SrcDist.hs
View file @
2e604aa0
...
...
@@ -33,7 +33,7 @@ import Distribution.Simple.Program (requireProgram, simpleProgram, programPath)
import
Distribution.Simple.Program.Db
(
emptyProgramDb
)
import
Distribution.Text
(
display
)
import
Distribution.Verbosity
(
Verbosity
,
normal
,
lessVerbose
)
import
Distribution.Version
(
Version
(
..
),
orLaterVersion
)
import
Distribution.Version
(
Version
(
..
),
orLaterVersion
,
intersectVersionRanges
)
import
Distribution.Client.Utils
(
tryFindAddSourcePackageDesc
)
...
...
@@ -147,8 +147,8 @@ createZipArchive verbosity pkg tmpDir targetPref = do
-- | List all source files of a given add-source dependency. Exits with error if
-- something is wrong (e.g. there is no .cabal file in the given directory).
allPackageSourceFiles
::
Verbosity
->
FilePath
->
IO
[
FilePath
]
allPackageSourceFiles
verbosity
packageDir
=
do
allPackageSourceFiles
::
Verbosity
->
SetupScriptOptions
->
FilePath
->
IO
[
FilePath
]
allPackageSourceFiles
verbosity
setupOpts0
packageDir
=
do
pkg
<-
do
let
err
=
"Error reading source files of package."
desc
<-
tryFindAddSourcePackageDesc
packageDir
err
...
...
@@ -161,9 +161,11 @@ allPackageSourceFiles verbosity packageDir = do
then
lessVerbose
verbosity
else
verbosity
,
sDistListSources
=
Flag
file
}
setupOpts
=
defaultSetupScriptOptions
{
setupOpts
=
setupOpts0
{
-- 'sdist --list-sources' was introduced in Cabal 1.18.
useCabalVersion
=
orLaterVersion
$
Version
[
1
,
18
,
0
]
[]
,
useCabalVersion
=
intersectVersionRanges
(
orLaterVersion
$
Version
[
1
,
18
,
0
]
[]
)
(
useCabalVersion
setupOpts0
),
useWorkingDir
=
Just
packageDir
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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