summaryrefslogtreecommitdiff
path: root/src/Propellor/Types/OS.hs
diff options
context:
space:
mode:
authorJoey Hess2014-10-10 11:27:54 -0400
committerJoey Hess2014-10-10 11:27:54 -0400
commit79ee61d958cdea43aec9ce7e63cbe88254641472 (patch)
tree3e37882a29c8b6ff7637533153456bec0737a662 /src/Propellor/Types/OS.hs
parent1e22e178b4080e70efc262e42943e615abfdb3b9 (diff)
stable suite changes
* Avoid encoding the current stable suite in propellor's code, since that poses a difficult transition around the release, and can easily be wrong if an older version of propellor is used. Instead, the os property for a stable system includes the suite name to use, eg Stable "wheezy". * stdSourcesList uses the stable suite name, to avoid unwanted immediate upgrades to the next stable release.
Diffstat (limited to 'src/Propellor/Types/OS.hs')
-rw-r--r--src/Propellor/Types/OS.hs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Propellor/Types/OS.hs b/src/Propellor/Types/OS.hs
index 23cc8a29..2529e7d8 100644
--- a/src/Propellor/Types/OS.hs
+++ b/src/Propellor/Types/OS.hs
@@ -13,15 +13,14 @@ data Distribution
| Ubuntu Release
deriving (Show, Eq)
-data DebianSuite = Experimental | Unstable | Testing | Stable | DebianRelease Release
+-- | Debian has several rolling suites, and a number of stable releases,
+-- such as Stable "wheezy".
+data DebianSuite = Experimental | Unstable | Testing | Stable Release
deriving (Show, Eq)
--- | The release that currently corresponds to stable.
-stableRelease :: DebianSuite
-stableRelease = DebianRelease "wheezy"
-
isStable :: DebianSuite -> Bool
-isStable s = s == Stable || s == stableRelease
+isStable (Stable _) = True
+isStable _ = False
type Release = String
type Architecture = String