summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog8
-rw-r--r--src/Propellor/Property/Sbuild.hs15
2 files changed, 15 insertions, 8 deletions
diff --git a/debian/changelog b/debian/changelog
index 81684955..c2078f6f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
-propellor (3.1.3) UNRELEASED; urgency=medium
+propellor (3.2.0) UNRELEASED; urgency=medium
* Sbuild.built & Sbuild.piupartsConf: add an additional alias to sid chroots
This is for compatibility with `dgit sbuild`.
- * Fix Sbuild.hs haddock formatting error.
+ * Sbuild.piupartsConf: no longer takes an Apt.Url. (API Change)
+ * Sbuild.piupartsConf & Sbuild.piupartsConfFor: does nothing if corresponding
+ schroot not built.
+ Previously, this property built the schroot if it was missing.
+ * Further improvements to Sbuild.hs haddock.
-- Sean Whitton <spwhitton@spwhitton.name> Mon, 05 Sep 2016 11:14:52 -0700
diff --git a/src/Propellor/Property/Sbuild.hs b/src/Propellor/Property/Sbuild.hs
index 909aae65..35b73ec6 100644
--- a/src/Propellor/Property/Sbuild.hs
+++ b/src/Propellor/Property/Sbuild.hs
@@ -292,9 +292,8 @@ fixConfFile s@(SbuildSchroot suite arch) =
-- documentation for why you might want to use this property, and sample config.
piupartsConfFor :: System -> Property DebianLike
piupartsConfFor sys = property' ("piuparts schroot conf for " ++ show sys) $
- \w -> case (schrootFromSystem sys, stdMirror sys) of
- (Just s, Just u) -> ensureProperty w $
- piupartsConf s u
+ \w -> case schrootFromSystem sys of
+ Just s -> ensureProperty w $ piupartsConf s
_ -> errorMessage
("don't know how to debootstrap " ++ show sys)
@@ -319,9 +318,13 @@ piupartsConfFor sys = property' ("piuparts schroot conf for " ++ show sys) $
-- > '--fail-if-inadequate',
-- > '--fail-on-broken-symlinks',
-- > ];
-piupartsConf :: SbuildSchroot -> Apt.Url -> Property DebianLike
-piupartsConf s@(SbuildSchroot _ arch) u = go
- `requires` (setupRevertableProperty $ built s u)
+--
+-- This property has no effect if the corresponding sbuild schroot does not
+-- exist (i.e. you also need 'Sbuild.built' or 'Sbuild.builtFor').
+piupartsConf :: SbuildSchroot -> Property DebianLike
+piupartsConf s@(SbuildSchroot _ arch) =
+ check (doesFileExist (schrootConf s)) go
+ `requires` installed
where
go :: Property DebianLike
go = property' desc $ \w -> do