[25773] in Source-Commits

home help back first fref pref prev next nref lref last post

Re: /svn/athena r25222 - trunk/debathena/scripts/installer

daemon@ATHENA.MIT.EDU (Liz A. Denys)
Fri Jul 8 23:50:52 2011

Date: Fri, 8 Jul 2011 23:47:43 -0400 (EDT)
From: "Liz A. Denys" <lizdenys@MIT.EDU>
To: Jonathan Reed <jdreed@MIT.EDU>
cc: Geoffrey Thomas <geofft@MIT.EDU>, "andrew m. boardman" <amb@MIT.EDU>,
   source-commits@MIT.EDU
In-Reply-To: <CD58FD72-F29E-4878-9F36-1841616405AA@mit.edu>
Message-ID: <alpine.DEB.2.00.1107082346360.20981@echo>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Fri, 8 Jul 2011, Jonathan Reed wrote:
> Andrew and I also discussed making the fields not dependent on each other, in that "apt_release development" will only get you -development, and you need "apt_release proposed" to also get proposed.  (We currently support that, in that alpha-linux sets both apt_release development and apt_release proposed, but we shortcut it in auto-update's clusterinfo code).

I like this idea as well.

-Liz


> I think I favor the latter solution.
>
> -Jon
>
> On Jul 8, 2011, at 11:08 PM, Geoffrey Thomas wrote:
>
>> I really really don't like that we're depending on "bleeding", "development", and "proposed" being alphabetically in order, because that's the kind of thing we're going to get wrong one day and not notice. Can we at least document that more explicitly?
>>
>> But better would be something on the order of
>>
>> hesclusters=$(dig +short +bufsize=2048 ${hostname}.cluster.ns.athena.mit.edu TXT \
>>   |sed -e 's/"$//' -ne 's/^"apt_release //p')
>> for i in bleeding development proposed; do
>> if echo "$hesclusters" | grep -fqx "$i"; then
>>   hescluster=$i
>>   break
>> fi
>> done
>>
>> --
>> Geoffrey Thomas
>> geofft@mit.edu
>>
>> On Fri, 8 Jul 2011, andrew m. boardman wrote:
>>
>>> Author: amb
>>> Date: 2011-07-08 22:03:39 -0400 (Fri, 08 Jul 2011)
>>> New Revision: 25222
>>>
>>> Modified:
>>> trunk/debathena/scripts/installer/install-debathena.beta.sh
>>> Log:
>>> Extract only one line of the hesiod cluster info, which can contain
>>> multiple entries.
>>>
>>>
>>> Modified: trunk/debathena/scripts/installer/install-debathena.beta.sh
>>> ===================================================================
>>> --- trunk/debathena/scripts/installer/install-debathena.beta.sh	2011-07-05 18:32:09 UTC (rev 25221)
>>> +++ trunk/debathena/scripts/installer/install-debathena.beta.sh	2011-07-09 02:03:39 UTC (rev 25222)
>>> @@ -244,8 +244,11 @@
>>> sourceslist=/etc/apt/sources.list.d/debathena.list
>>> clustersourceslist=/etc/apt/sources.list.d/debathena.clusterinfo.list
>>> if [ -z "$hostname" ] ; then hostname=`hostname` ; fi
>>> +
>>> +# Note that hesiod may contain multiple apt_release lines.  We want, in order
>>> +# of priority, just one of "bleeding" (maybe), "development", or "proposed".
>>> hescluster=$(dig +short +bufsize=2048 ${hostname}.cluster.ns.athena.mit.edu TXT \
>>> -    |sed -e 's/"$//' -ne 's/^"apt_release //p') || hescluster=""
>>> +    |sed -e 's/"$//' -ne 's/^"apt_release //p'|sort|head -1) || hescluster=""
>>>
>>> if [ ! -e "$sourceslist" ] || ! grep -q debathena "$sourceslist"; then
>>> if [ -e "$sourceslist" ]; then
>>>
>>>
>
>

home help back first fref pref prev next nref lref last post