fix recompute --reproducible run on a VURL key
This avoids "Cannot generate a key for backend VURL", and makes it use the usual hashing backend.
This commit is contained in:
parent
0f998f0698
commit
0712ae020c
2 changed files with 7 additions and 2 deletions
|
@ -52,6 +52,7 @@ optParser desc = AddComputedOptions
|
|||
<*> parseReproducible
|
||||
|
||||
newtype Reproducible = Reproducible { isReproducible :: Bool }
|
||||
deriving (Show, Eq)
|
||||
|
||||
parseReproducible :: Parser (Maybe Reproducible)
|
||||
parseReproducible = r <|> unr
|
||||
|
|
|
@ -21,7 +21,7 @@ import Annex.GitShaKey
|
|||
import Git.FilePath
|
||||
import Logs.Location
|
||||
import Command.AddComputed (Reproducible(..), parseReproducible, getInputContent, getInputContent', addComputed)
|
||||
import Backend (maybeLookupBackendVariety, unknownBackendVarietyMessage)
|
||||
import Backend (maybeLookupBackendVariety, unknownBackendVarietyMessage, chooseBackend)
|
||||
import Types.Key
|
||||
|
||||
import qualified Data.Map as M
|
||||
|
@ -200,7 +200,11 @@ perform o r file origkey origstate = do
|
|||
logStatus NoLiveUpdate origkey InfoMissing
|
||||
return True
|
||||
|
||||
choosebackend _outputfile
|
||||
choosebackend outputfile
|
||||
-- When converting a VURL to reproducible, can't use
|
||||
-- the VURL backend.
|
||||
| recomputingvurl && reproducible o == Just (Reproducible True) =
|
||||
chooseBackend outputfile
|
||||
-- Use the same backend as was used to compute it before,
|
||||
-- so if the computed file is the same, there will be
|
||||
-- no change.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue