[25865] in Source-Commits
Re: /svn/athena r25267 -
daemon@ATHENA.MIT.EDU (Benjamin Kaduk)
Thu Jul 21 13:48:52 2011
Date: Thu, 21 Jul 2011 13:48:43 -0400 (EDT)
From: Benjamin Kaduk <kaduk@MIT.EDU>
To: Jonathan D Reed <jdreed@MIT.EDU>
cc: source-commits@MIT.EDU
In-Reply-To: <201107202044.p6KKi5JM028389@drugstore.mit.edu>
Message-ID: <alpine.GSO.1.10.1107211324130.7526@multics.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
So, this will run update-grub every time there is an update to the
cluster-login-config package, right? Zephyr discussion indicated (IIRC)
that update-grub is kind of heavyweight, taking some 30 seconds; it would
be nice to avoid doing that every time, since we only need to run
update-grub once after we've dropped the new configuration file in grub.d.
I think what we want to do is always run update-grub, unless the
previously configured version is one that has already run update-grub.
We can go ahead and make the simplifying assumption that only the current
version of the package (or a future one based on us) will have correctly
ran update-grub. Translating into a positive condition for when to
actually run update-grub, this would then be:
if dpkg --compare-versions "$1" le 1.35.2~
update-grub
fi
while bumping the version to 1.35.2.
Does that sound reasonable?
-Ben
On Wed, 20 Jul 2011, Jonathan D Reed wrote:
> Author: jdreed
> Date: 2011-07-20 16:44:05 -0400 (Wed, 20 Jul 2011)
> New Revision: 25267
>
> Modified:
> trunk/debathena/config/cluster-login-config/debian/changelog
> trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.postinst
> Log:
> In cluster-login-config:
> * Actually run update-grub
>
>
> Modified: trunk/debathena/config/cluster-login-config/debian/changelog
> ===================================================================
> --- trunk/debathena/config/cluster-login-config/debian/changelog 2011-07-20 20:34:15 UTC (rev 25266)
> +++ trunk/debathena/config/cluster-login-config/debian/changelog 2011-07-20 20:44:05 UTC (rev 25267)
> @@ -1,3 +1,9 @@
> +debathena-cluster-login-config (1.35.1) unstable; urgency=low
> +
> + * Actually run update-grub
> +
> + -- Jonathan Reed <jdreed@mit.edu> Wed, 20 Jul 2011 16:44:00 -0400
> +
> debathena-cluster-login-config (1.35) unstable; urgency=low
>
> * Run update-grub (and depend grub, I guess)
>
> Modified: trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.postinst
> ===================================================================
> --- trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.postinst 2011-07-20 20:34:15 UTC (rev 25266)
> +++ trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.postinst 2011-07-20 20:44:05 UTC (rev 25267)
> @@ -97,7 +97,7 @@
> fi
> fi
>
> - if dpkg --compare-versions "$1" lt 1.34~; then
> + if dpkg --compare-versions "$1" ge-nl 1.34~; then
> update-grub
> fi
>
>
>