This module implements the local package cache. The local package cache is located in the .cpm/package_cache of the current package. It contains symlinks to all dependencies used by the current package. Package files are copied from the local cache to the runtime cache when they need to be used. The package manager usually creates symlinks to the global package cache. Symlinks to other locations can be used to include modified versions of packages that are not yet published to the package repository or installed in the global cache.
cacheDir
:: String -> String
The cache directory of the local package cache. |
allPackages
:: String -> ErrorLogger [Package]
Reads all packages specifications from the local package cache. |
createLinkToGlobalCache
:: Config -> String -> Package -> ErrorLogger ()
Creates a link to a package from the global cache in the local cache. |
linkPackages
:: Config -> String -> [Package] -> ErrorLogger ()
Links a list of packages from the global cache into the local cache. |
doesLinkPointToGlobalCache
:: Config -> String -> String -> IO Bool
Tests whether a link in the local package cache points to a package in the global package cache. |
packageDir
:: String -> Package -> String
Calculates the local package path of the given package |
isPackageInCache
:: String -> Package -> IO Bool
Checks whether a package is in the local cache. |
clearCache
:: String -> ErrorLogger ()
Clear the local package cache. |
createLink
:: String -> String -> String -> Bool -> ErrorLogger ()
Create a link from a directory into the local package cache. |
The cache directory of the local package cache.
|
Reads all packages specifications from the local package cache.
|
Creates a link to a package from the global cache in the local cache. Does not overwrite existing links.
|
Links a list of packages from the global cache into the local cache. Does not overwrite existing links.
|
Tests whether a link in the local package cache points to a package in the global package cache.
|
Calculates the local package path of the given package
|
Checks whether a package is in the local cache.
|
Clear the local package cache.
|
Create a link from a directory into the local package cache.
|