diff options
| -rw-r--r-- | debian/changelog | 4 | ||||
| -rw-r--r-- | doc/forum/Using_ip_address_in_a_container/comment_5_338fa2c7d0fb389c0888ba8a9095719c._comment | 13 | ||||
| -rw-r--r-- | src/Propellor/Types/Info.hs | 5 |
3 files changed, 19 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog index 4739eecd..5aff022f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,10 @@ propellor (4.9.0) UNRELEASED; urgency=medium containing only "lost+found" as effectively empty, to support situations where the directory is a mount point of an EXT* filesystem. Thanks, Nicolas Schodet + * Make addInfo accumulate Info in order properties appear, not + reverse order. + This fixes a bug involving reverting Systemd.resolvConfed or + Systemd.linkJournal. -- Joey Hess <id@joeyh.name> Wed, 04 Oct 2017 12:46:23 -0400 diff --git a/doc/forum/Using_ip_address_in_a_container/comment_5_338fa2c7d0fb389c0888ba8a9095719c._comment b/doc/forum/Using_ip_address_in_a_container/comment_5_338fa2c7d0fb389c0888ba8a9095719c._comment new file mode 100644 index 00000000..10d2c91f --- /dev/null +++ b/doc/forum/Using_ip_address_in_a_container/comment_5_338fa2c7d0fb389c0888ba8a9095719c._comment @@ -0,0 +1,13 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 5""" + date="2017-10-25T16:51:54Z" + content=""" +@Nicolas, the reason it appears twice is that resolveConfed is added by +default, and then you added it again reverted. That display could certianly +be improved, perhaps by having it look to see if there's a resolveConfed +setting before adding in the default one. + +As to why reverting it didn't work, that was a Info ordering bug, which +I've now fixed. +"""]] diff --git a/src/Propellor/Types/Info.hs b/src/Propellor/Types/Info.hs index 5db1eb52..06c45ed2 100644 --- a/src/Propellor/Types/Info.hs +++ b/src/Propellor/Types/Info.hs @@ -55,16 +55,15 @@ data PropagateInfo -- | Any value in the `IsInfo` type class can be added to an Info. addInfo :: IsInfo v => Info -> v -> Info -addInfo (Info l) v = Info (InfoEntry v:l) +addInfo (Info l) v = Info (l++[InfoEntry v]) -- | Converts any value in the `IsInfo` type class into an Info, -- which is otherwise empty. toInfo :: IsInfo v => v -> Info toInfo = addInfo mempty --- The list is reversed here because addInfo builds it up in reverse order. fromInfo :: IsInfo v => Info -> v -fromInfo (Info l) = mconcat (mapMaybe extractInfoEntry (reverse l)) +fromInfo (Info l) = mconcat (mapMaybe extractInfoEntry l) -- | Maps a function over all values stored in the Info that are of the -- appropriate type. |
