Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Jan 2000 11:27:23 +0100
From:      Stefan Esser <se@zpr.uni-koeln.de>
To:        MULLER Miklos <mmuller@gcs.hu>
Cc:        freebsd-stable@FreeBSD.ORG, Stefan Esser <se@freebsd.org>
Subject:   Re: Obtaining CTM deltas
Message-ID:  <20000103112723.A1520@dialup124.zpr.uni-koeln.de>
In-Reply-To: <200001011753.SAA01269@gcs.hu>; from mmuller@gcs.hu on Sat, Jan 01, 2000 at 06:53:09PM %2B0100
References:  <200001011753.SAA01269@gcs.hu>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2000-01-01 18:53 +0100, MULLER Miklos <mmuller@gcs.hu> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000103112723.A1520>