From 8d91b5de6b43333ba77974053cdcdfa87409fb62 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 15 Nov 2014 17:02:25 -0400 Subject: Convert GpgKeyId to newtype --- src/Propellor/Property/Obnam.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Propellor/Property/Obnam.hs') diff --git a/src/Propellor/Property/Obnam.hs b/src/Propellor/Property/Obnam.hs index e18ca3f9..4dc895ef 100644 --- a/src/Propellor/Property/Obnam.hs +++ b/src/Propellor/Property/Obnam.hs @@ -48,8 +48,10 @@ backup dir crontimes params numclients = -- into root's keyring using Propellor.Property.Gpg.keyImported backupEncrypted :: FilePath -> Cron.CronTimes -> [ObnamParam] -> NumClients -> Gpg.GpgKeyId -> Property backupEncrypted dir crontimes params numclients keyid = - backup dir crontimes (("--encrypt-with=" ++ keyid):params) numclients + backup dir crontimes params' numclients `requires` Gpg.keyImported keyid "root" + where + params' = ("--encrypt-with=" ++ Gpg.getGpgKeyId keyid) : params -- | Does a backup, but does not automatically restore. backup' :: FilePath -> Cron.CronTimes -> [ObnamParam] -> NumClients -> Property -- cgit v1.3-2-g0d8e