From d9c8497f8f0019c0646c3f191d890a310d2f3e1e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 25 Oct 2017 12:58:50 -0400 Subject: Make addInfo accumulate Info in order properties appear, not reverse order This fixes a bug involving reverting Systemd.resolvConfed or Systemd.linkJournal. addInfo was prepending to the list for efficiency. But, that was in conflict with mappend of two Info, which appended the second to the first. In the case where Systemd.resolvConfed was added reverted, to override the one added by default, that led to a list of info that had first the reversion and then the default, so the default won. Which was wrong. So, make addInfo accumulate in the same order mappend combines things, even though it's a little less efficient. The efficiency probably does not matter; there is not typically a whole lot of info. There's some risk this change has unexpected consequences, if something relied on the old addInfo order without using fromInfo to access to info. But if so, that something would have been broken before when two Info properties were combined. With this change, it would just be broken the other way around. This commit was sponsored by Jochen Bartl on Patreon. --- .../comment_5_338fa2c7d0fb389c0888ba8a9095719c._comment | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 doc/forum/Using_ip_address_in_a_container/comment_5_338fa2c7d0fb389c0888ba8a9095719c._comment (limited to 'doc/forum/Using_ip_address_in_a_container') 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. +"""]] -- cgit v1.2.3