Skip to content
GitLab
Menu
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
9382e60d
Commit
9382e60d
authored
Jun 21, 2016
by
Duncan Coutts
Committed by
GitHub
Jun 21, 2016
Browse files
Merge pull request #3505 from dcoutts/master
Change install lock to just a registration lock
parents
298af87d
1acc00f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
cabal-install/Distribution/Client/ProjectBuilding.hs
View file @
9382e60d
...
...
@@ -587,7 +587,7 @@ rebuildTargets verbosity
jobControl
<-
if
isParallelBuild
then
newParallelJobControl
buildSettingNumJobs
else
newSerialJobControl
install
Lock
<-
newLock
-- serialise
install
ation
register
Lock
<-
newLock
-- serialise
registr
ation
cacheLock
<-
newLock
-- serialise access to setup exe cache
--TODO: [code cleanup] eliminate setup exe cache
...
...
@@ -610,7 +610,7 @@ rebuildTargets verbosity
verbosity
distDirLayout
buildSettings
downloadMap
install
Lock
cacheLock
register
Lock
cacheLock
sharedPackageConfig
pkg
pkgBuildStatus
...
...
@@ -634,7 +634,7 @@ rebuildTarget :: Verbosity
rebuildTarget
verbosity
distDirLayout
@
DistDirLayout
{
distBuildDirectory
}
buildSettings
downloadMap
install
Lock
cacheLock
register
Lock
cacheLock
sharedPackageConfig
rpkg
@
(
ReadyPackage
pkg
)
pkgBuildStatus
=
...
...
@@ -684,7 +684,7 @@ rebuildTarget verbosity
buildAndInstall
srcdir
builddir
=
buildAndInstallUnpackedPackage
verbosity
distDirLayout
buildSettings
install
Lock
cacheLock
buildSettings
register
Lock
cacheLock
sharedPackageConfig
rpkg
srcdir
builddir'
...
...
@@ -696,7 +696,7 @@ rebuildTarget verbosity
--TODO: [nice to have] use a relative build dir rather than absolute
buildInplaceUnpackedPackage
verbosity
distDirLayout
buildSettings
cacheLock
buildSettings
registerLock
cacheLock
sharedPackageConfig
rpkg
buildStatus
...
...
@@ -984,7 +984,7 @@ buildAndInstallUnpackedPackage verbosity
buildSettingNumJobs
,
buildSettingLogFile
}
install
Lock
cacheLock
register
Lock
cacheLock
pkgshared
@
ElaboratedSharedConfig
{
pkgConfigPlatform
=
platform
,
pkgConfigCompiler
=
compiler
,
...
...
@@ -1020,11 +1020,7 @@ buildAndInstallUnpackedPackage verbosity
-- Install phase
mipkg
<-
criticalSection
installLock
$
annotateFailure
InstallFailed
$
do
--TODO: [research required] do we need the installLock for copying? can we not do that in
-- parallel? Isn't it just registering that we have to lock for?
--TODO: [required eventually] need to lock installing this ipkig so other processes don't
-- stomp on our files, since we don't have ABI compat, not safe to replace
...
...
@@ -1066,7 +1062,8 @@ buildAndInstallUnpackedPackage verbosity
++
display
ipkgid
++
" but it actually produced info for "
++
intercalate
", "
(
map
(
display
.
Installed
.
installedUnitId
)
ipkgs'
)
forM_
ipkgs'
$
\
ipkg'
->
criticalSection
registerLock
$
forM_
ipkgs'
$
\
ipkg'
->
Cabal
.
registerPackage
verbosity
compiler
progdb
HcPkg
.
MultiInstance
(
pkgRegisterPackageDBStack
pkg
)
ipkg'
...
...
@@ -1138,7 +1135,7 @@ buildAndInstallUnpackedPackage verbosity
buildInplaceUnpackedPackage
::
Verbosity
->
DistDirLayout
->
BuildTimeSettings
->
Lock
->
BuildTimeSettings
->
Lock
->
Lock
->
ElaboratedSharedConfig
->
ElaboratedReadyPackage
->
BuildStatusRebuild
...
...
@@ -1150,7 +1147,7 @@ buildInplaceUnpackedPackage verbosity
distPackageCacheDirectory
}
BuildTimeSettings
{
buildSettingNumJobs
}
cacheLock
registerLock
cacheLock
pkgshared
@
ElaboratedSharedConfig
{
pkgConfigCompiler
=
compiler
,
pkgConfigCompilerProgs
=
progdb
...
...
@@ -1255,7 +1252,8 @@ buildInplaceUnpackedPackage verbosity
-- Case C
_
->
assert
(
any
((
==
ipkgid
)
.
Installed
.
installedUnitId
)
ipkgs
)
ipkgs
forM_
ipkgs'
$
\
ipkg'
->
criticalSection
registerLock
$
forM_
ipkgs'
$
\
ipkg'
->
Cabal
.
registerPackage
verbosity
compiler
progdb
HcPkg
.
NoMultiInstance
(
pkgRegisterPackageDBStack
pkg
)
ipkg'
...
...
Write
Preview
Supports
Markdown
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