Commit 0986e11b authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺
Browse files

Revert accidental renaming of `packageKey`

This was introduced accidentally via
b083151f

/cc @ezyang
parent 6c28361b
...@@ -555,8 +555,8 @@ data IndexCacheEntry = CachePackageId PackageId BlockNo ...@@ -555,8 +555,8 @@ data IndexCacheEntry = CachePackageId PackageId BlockNo
| CachePreference Dependency | CachePreference Dependency
deriving (Eq) deriving (Eq)
installedUnitId, blocknoKey, buildTreeRefKey, preferredVersionKey :: String packageKey, blocknoKey, buildTreeRefKey, preferredVersionKey :: String
installedUnitId = "pkg:" packageKey = "pkg:"
blocknoKey = "b#" blocknoKey = "b#"
buildTreeRefKey = "build-tree-ref:" buildTreeRefKey = "build-tree-ref:"
preferredVersionKey = "pref-ver:" preferredVersionKey = "pref-ver:"
...@@ -565,7 +565,7 @@ readIndexCacheEntry :: BSS.ByteString -> Maybe IndexCacheEntry ...@@ -565,7 +565,7 @@ readIndexCacheEntry :: BSS.ByteString -> Maybe IndexCacheEntry
readIndexCacheEntry = \line -> readIndexCacheEntry = \line ->
case BSS.words line of case BSS.words line of
[key, pkgnamestr, pkgverstr, sep, blocknostr] [key, pkgnamestr, pkgverstr, sep, blocknostr]
| key == BSS.pack installedUnitId && sep == BSS.pack blocknoKey -> | key == BSS.pack packageKey && sep == BSS.pack blocknoKey ->
case (parseName pkgnamestr, parseVer pkgverstr [], case (parseName pkgnamestr, parseVer pkgverstr [],
parseBlockNo blocknostr) of parseBlockNo blocknostr) of
(Just pkgname, Just pkgver, Just blockno) (Just pkgname, Just pkgver, Just blockno)
...@@ -609,7 +609,7 @@ readIndexCacheEntry = \line -> ...@@ -609,7 +609,7 @@ readIndexCacheEntry = \line ->
showIndexCacheEntry :: IndexCacheEntry -> String showIndexCacheEntry :: IndexCacheEntry -> String
showIndexCacheEntry entry = unwords $ case entry of showIndexCacheEntry entry = unwords $ case entry of
CachePackageId pkgid b -> [ installedUnitId CachePackageId pkgid b -> [ packageKey
, display (packageName pkgid) , display (packageName pkgid)
, display (packageVersion pkgid) , display (packageVersion pkgid)
, blocknoKey , blocknoKey
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment