From owner-freebsd-stable Mon Jan 3 2:25:35 2000 Delivered-To: freebsd-stable@freebsd.org Received: from dialup124.zpr.uni-koeln.de (1-126.K.dial.o-tel-o.net [212.144.1.126]) by hub.freebsd.org (Postfix) with ESMTP id 64E5015188; Mon, 3 Jan 2000 02:25:28 -0800 (PST) (envelope-from se@zpr.uni-koeln.de) Received: by dialup124.zpr.uni-koeln.de (Postfix, from userid 200) id A54B6E3F; Mon, 3 Jan 2000 11:27:24 +0100 (CET) Date: Mon, 3 Jan 2000 11:27:23 +0100 From: Stefan Esser To: MULLER Miklos Cc: freebsd-stable@FreeBSD.ORG, Stefan Esser Subject: Re: Obtaining CTM deltas Message-ID: <20000103112723.A1520@dialup124.zpr.uni-koeln.de> Reply-To: se@freebsd.org References: <200001011753.SAA01269@gcs.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200001011753.SAA01269@gcs.hu>; from mmuller@gcs.hu on Sat, Jan 01, 2000 at 06:53:09PM +0100 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 2000-01-01 18:53 +0100, MULLER Miklos wrote: > "18.3.2.3. Starting off with CTM for the first time > > ... > > Ok i have a release 3.0 and a release 3.3. CD, i unpack all the sources, > say from the 3.3 release cd. > Then how do i figure out which will be my starting delta? > i can figure out the last modification time in the source tree > and use deltas from the next day, but i'm not convinced, that this > is the right way to do it. I use CTM to update my CVS repository, but I guess the following also applies to the case of CTM deltas based on source files: You have to find the first CTM delta, that contains modifications that had not been tagged for the release you want to start from. (CTM generation and tagging are not synchronized, but you may be able to identify a small number of CTM files, based on the release date and files that tend to be touched last.) That CTM delta contains segments, that have to be applied to your CVS tree. Problem is, it probably also contains segments that are based on the previous version of a file (i.e. your CD already has the new version) and CTM will complain because of a mismatch of pre-edit hashes. The solution (and that's what I have been using for more than a year, but forgot to submit it to PHK) is to make CTM accept the new hash of a file (and ignore the segment that obviously has been applied before). There is an "... already applied" message for each file that already had the new MD5, but I decided to make this feature not depend on the "Force" option. I have been working with this for more than a year (probably more than two). The reason to modify CTM was that I had suffered from partially applied CTM deltas for a time, and just wanted to be able to continue without editing the delta to account for the already applied segments. Regards, STefan Index: /usr/src/usr.sbin/ctm/ctm_pass2.c =================================================================== RCS file: /usr/cvs/src/usr.sbin/ctm/ctm/ctm_pass2.c,v retrieving revision 1.17 diff -u -2 -r1.17 ctm_pass2.c --- ctm/ctm_pass2.c 1999/08/28 01:16:00 1.17 +++ ctm/ctm_pass2.c 2000/01/03 09:55:50 @@ -155,5 +155,10 @@ fprintf(stderr," %s: %s md5 mismatch.\n", sp->Key,name); - 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; + } else if(j & CTM_Q_MD5_Force) { if(Force) fprintf(stderr," Can and will force.\n"); @@ -166,7 +171,8 @@ } break; - } - if(j & CTM_Q_MD5_After) { - GETFIELDCOPY(md5,sep); + } else if(j & CTM_Q_MD5_After) { + if(md5 == NULL) { + GETFIELDCOPY(md5,sep); + } break; } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message