From 6bb39d0125c8b1cb65eb33cb04fb300601fd4f93 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 2 Mar 2016 14:47:46 -0400 Subject: avoid repeated rebuilds, more type safely buildFirst re-runs propellor with --continue, which is supposed to make defaultMain bypass subsequent calls to buildFirst. But, use of a Bool to do that caused the code to be unclear, and some of the cases lost track of that. --continue SimpleRun would buildFirst, and if the binary changed, would --continue SimpleRun. This could loop repatedly, on systems such as FreeBSD where building re-links the binary even when there are no changes. As discussed in github pull #11 Fixed by introducing a CanRebuild data type, which buildFirst and updateFirst require in order to do any work makes it more clear what's going on. It's not a type-level proof that propellor won't rebuild repeatedly, but gets closer to one. (Only remaining way such a bug could slip in is if the CanRebuild value was reused in a call to buildFirst and also inside the IO action passed to it.) There were some other weirdnesses around repeated builds. In particular, Run as non-root did an updateFirst, followed by a buildFirst. I think this redundant build was an accident, and have removed it. --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c5b27741..156e010c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ propellor (2.16.1) UNRELEASED; urgency=medium * Apt.upgrade: Run dpkg --configure -a first, to recover from interrupted upgrades. * Apt: Add safeupgrade. + * Avoid repeated re-building on systems such as FreeBSD where building + re-links the binary even when there are no changes. -- Joey Hess Mon, 29 Feb 2016 17:58:08 -0400 -- cgit v1.3-2-g0d8e