Skip to contentSkip to conversation

ketchup - support new -post releases

PATCH In review Dave Hansen 3 participants 4 messages Aug 20, 2004 – Aug 21, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ketchup - support new -post releases

Since 2.6.8.1 came out, I'm sure a lot of automated tools stopped working, ketchup included.

I'm sure this patch isn't complete, but it does work to patch from 2.6.8 -> 2.6.8.1 or 2.6.8.1-mm*, so it is at least a start.

-- Dave

ketchup-0.8 renamed from ketchup-0.8.orig +22 -10
@@ -126,35 +126,42 @@
     return r
 
 def pre(ver):
-    try: return re.match(r'\d+\.\d+\.\d+-((rc|pre)\d+)', ver).group(1)
+    try: return re.match(r'\d+\.\d+\.\d+(\.\d+)?-((rc|pre)\d+)', ver).group(2)
+    except: return None
+
+def post(ver):
+    try: return re.match(r'(\d+\.\d+\.\d+\.\d+)', ver).group(1)
     except: return None
 
 def pretype(ver):
-    try: return re.match(r'\d+\.\d+\.\d+-((rc|pre)\d+)', ver).group(2)
+    try: return re.match(r'\d+\.\d+\.\d+(\.\d+)?-((rc|pre)\d+)', ver).group(3)
     except: return None
 
 def prenum(ver):
-    try: return int(re.match(r'\d+\.\d+\.\d+-((rc|pre)(\d+))', ver).group(3))
+    try: return int(re.match(r'\d+\.\d+\.\d+-((rc|pre)(\d+))', ver).group(4))
     except: return None
 
 def prebase(ver):
-    return re.match(r'(\d+\.\d+\.\d+(-(rc|pre)\d+)?)', ver).group(1)
+    return re.match(r'(\d+\.\d+\.\d+((-(rc|pre)|\.)\d+)?)', ver).group(1)
 
 def base(ver):
-    return "%s.%s" % (tree(ver), rev(ver))
+    if post(ver):
+	return prebase(ver)
+    else:
+    	return "%s.%s" % (tree(ver), rev(ver))
 
 def forkname(ver):
-    try: return re.match(r'\d+.\d+.\d+(-(rc|pre)\d+)?(-(\w+?)\d+)?',
-                         ver).group(4)
+    try: return re.match(r'\d+.\d+.\d+(\.\d+)?(-(rc|pre)\d+)?(-(\w+?)\d+)?',
+                         ver).group(5)
     except: return None
 
 def forknum(ver):
-    try: return int(re.match(r'\d+.\d+.\d+(-(rc|pre)\d+)?(-(\w+?)(\d+))?',
-                             ver).group(5))
+    try: return int(re.match(r'\d+.\d+.\d+(\.\d+)?(-(rc|pre)\d+)?(-(\w+?)(\d+))?',
+                             ver).group(6))
     except: return None
 
 def fork(ver):
-    try: return re.match(r'\d+.\d+.\d+(-(rc|pre)\d+)?(-(\w+))?', ver).group(4)
+    try: return re.match(r'\d+.\d+.\d+(\.\d+)?(-(rc|pre)\d+)?(-(\w+))?', ver).group(4)
     except: return None
 
 def get_ver(makefile):
@@ -484,6 +491,11 @@
         if pre(a):
             apply_patch(a, 1)
             a = base(a)
+	# need a loop here to apply all of the post patches
+	if post(b):
+	    apply_patch(prebase(b), 0)
+	# need a loop here to back out any a post patches
+	    
         ra, rb = rev(a), rev(b)
         if ra > rb:
             for r in range(ra, rb, -1):
#1 lore raw

ketchup versus patch-kernel

Quoted 2 lines · Dave Hansen

Since 2.6.8.1 came out, I'm sure a lot of automated tools stopped working, ketchup included.

Can someone please explain to me what is the difference between patch-kernel and ketchup?

With difference I ask for what problem they solve (and mayby how). I know very well ketchup uses phython - thats an implementation detail.

Rationale behind the question is if we should include both patch-kernel and ketchup in the kernel.

Sam

#2 lore raw

Re: ketchup versus patch-kernel

Quoted 6 lines · Sam Ravnborg
Quoted 2 lines · Dave Hansen

Since 2.6.8.1 came out, I'm sure a lot of automated tools stopped working, ketchup included.

Can someone please explain to me what is the difference between patch-kernel and ketchup?

In my view, there's no basic difference in their intention: turn one kernel version into another. Although, ketchup does handle a few more things like downloads, gpg, and a wider variety of trees like -mm, -mjb and -tiny.
-- Dave

#3 lore raw
In reply to Dave Hansen
Quoted 5 lines · Dave Hansen

Since 2.6.8.1 came out, I'm sure a lot of automated tools stopped working, ketchup included.

I'm sure this patch isn't complete, but it does work to patch from 2.6.8 -> 2.6.8.1 or 2.6.8.1-mm*, so it is at least a start.

Unfortunately, we don't yet know how deltas from x.y.z.1 to x.y.z.2 will be handled in the archives, eg relative to x.y.z or incrementally.

Signature · 1 line
Mathematics is the supreme nostalgia of our time.