From owner-freebsd-hackers Wed Apr 29 15:48:01 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA24602 for freebsd-hackers-outgoing; Wed, 29 Apr 1998 15:48:01 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from Octopussy.MI.Uni-Koeln.DE (Octopussy.MI.Uni-Koeln.DE [134.95.166.20]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA24527; Wed, 29 Apr 1998 15:47:27 -0700 (PDT) (envelope-from se@dialup124.zpr.uni-koeln.de) Received: from dialup124.zpr.Uni-Koeln.DE (dialup124.zpr.Uni-Koeln.DE [134.95.219.124]) by Octopussy.MI.Uni-Koeln.DE (8.8.8/8.8.8) with ESMTP id AAA07396; Thu, 30 Apr 1998 00:45:54 +0200 (MET DST) Received: (from se@localhost) by dialup124.zpr.Uni-Koeln.DE (8.8.8/8.6.9) id AAA01597; Thu, 30 Apr 1998 00:29:55 +0200 (CEST) X-Face: " Date: Thu, 30 Apr 1998 00:29:54 +0200 From: Stefan Esser To: Warner Losh , Mark Murray Cc: hackers@FreeBSD.ORG, Stefan Esser Subject: Re: ctm question Mail-Followup-To: Warner Losh , Mark Murray , hackers@FreeBSD.ORG, Stefan Esser References: <199804280603.IAA19498@greenpeace.grondar.za> <199804280606.AAA01869@harmony.village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89i In-Reply-To: <199804280606.AAA01869@harmony.village.org>; from Warner Losh on Tue, Apr 28, 1998 at 12:06:16AM -0600 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 1998-04-28 00:06 -0600, Warner Losh wrote: > In message <199804280603.IAA19498@greenpeace.grondar.za> Mark Murray writes: > : You are SOL. A partially applied CTM delta breaks everything :-( > > I'm thinking about hacking ctm to have a mode that ignores the delta > if the md5 already matches the new md5 in the ctm package. That way > if there is a mismatch with the old one, it will try to apply it, keep > quiet about the ones that are up to date and whine (but not die) if > there is one that doesn't match either of the md5's. This would let > me recover from 95% of the partially applied CTM delta problems I've > run into over the years. It would at least let me KNOW what is > corrupted and take whatever action I need to to recover. > > I've not even looked at the code, nor at the ctmmd5 stuff that chuck > pointed me at. Would there be any interest in this? > > Warner Well, I already implemented this, a long time ago ... I had the same problem of a partially applied delta some time last year, and decided to make ctm check both the pre and post MD5 for a possible match. Don't remember, whether the "force" option is required for this feature, haven't needed it for quite some time :) Please check out the following patch: Index: /usr/src/usr.sbin/ctm/ctm/ctm_pass2.c =================================================================== RCS file: /usr/cvs/src/usr.sbin/ctm/ctm/ctm_pass2.c,v retrieving revision 1.16 diff -r1.16 ctm_pass2.c 157c157,163 < if(j & CTM_Q_MD5_Force) { --- > GETFIELDCOPY(md5,sep); > if(md5 != NULL && strcmp(tmp,md5) == 0) { > fprintf(stderr," %s: %s already applied.\n", > sp->Key,name); > match = CTM_FILTER_DISABLE; > /* ret |= Exit_Forcible; /* XXX Testing Only */ > } else if(j & CTM_Q_MD5_Force) { 168,170c174,177 < } < if(j & CTM_Q_MD5_After) { < GETFIELDCOPY(md5,sep); --- > } else if(j & CTM_Q_MD5_After) { > if(md5 == NULL) { > GETFIELDCOPY(md5,sep); > } Regards, STefan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message