From: Pavel Machek <pavel@ucw.cz>
To: Jean Delvare <khali@linux-fr.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
lasse.collin@tukaani.org,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: ketchup was Re: [kernel.org users] XZ Migration discussion
Date: Sun, 21 Feb 2010 20:28:55 +0100 [thread overview]
Message-ID: <20100221192854.GA2217@ucw.cz> (raw)
In-Reply-To: <20100221152621.4e3d5389@hyperion.delvare>
On Sun 2010-02-21 15:26:21, Jean Delvare wrote:
> On Sun, 21 Feb 2010 14:53:41 +0100, Pavel Machek wrote:
> > On Tue 2010-02-16 17:27:45, Pavel Machek wrote:
> > > Add --only-dl option -- when you want to cache the needed patches but
> > > not apply anything yet.
> >
> > Actually, you'll probably get a better patch if you relace 'only-dl'
> > with just 'dl'. Mistaking --only-dl and --dl-only is just too easy.
>
> Or --download. Acronyms just suck.
Works for me.
And here's quick patch to show what I'm doing: it teaches ketchup
about 2.6.33-rc1-rc2 patches, thus saving lot of bandwidth. Of course,
I'll need to get it to work for more than 2.6.A->2.6.B-rcC case,
but...
If there are some comments, or maybe better approach, let me know...
diff --git a/ketchup b/ketchup
index 3249cbc..dc1bbf8 100755
--- a/ketchup
+++ b/ketchup
@@ -107,19 +107,28 @@ local_trees = {}
# Functions to parse version strings
def tree(ver):
+ """returns 2.6"""
return float(re.match(r'(\d+\.\d+)', ver).group(1))
def rev(ver):
+ """given 2.6.31 or 2.6.32-rc1 returns 31"""
p = pre(ver)
r = int(re.match(r'\d+\.\d+\.(\d+)', ver).group(1))
if p: r = r - 1
return r
def pre(ver):
+ """returns rc5"""
try: return re.match(r'\d+\.\d+\.\d+(\.\d+)?-((rc|pre)\d+)', ver).group(2)
except: return None
+def next_pre(ver):
+ s = pre(ver)
+ i = int(re.match(r'rc(\d+)', s).group(1))
+ return "rc%d" % (i+1)
+
def post(ver):
+ """given 2.6.27.1 returns 1"""
try: return re.match(r'\d+\.\d+\.\d+\.(\d+)', ver).group(1)
except: return None
@@ -132,9 +141,15 @@ def prenum(ver):
except: return None
def prebase(ver):
+ """returns 2.6.13-rc1"""
return re.match(r'(\d+\.\d+\.\d+((-(rc|pre)|\.)\d+)?)', ver).group(1)
+def preincr(ver):
+ """only use when incremental patches are requested"""
+ return re.match(r'(\d+\.\d+\.\d+((-(rc|pre)|\.).+)?)', ver).group(1)
+
def revbase(ver):
+ """returns 2.6.23 for 2.6.23.15 or 2.6.24-rc5"""
return "%s.%s" % (tree(ver), rev(ver))
def base(ver):
@@ -283,8 +298,12 @@ def find_info(ver):
f = forkname(ver)
p = pre(ver)
+ print "find_info (ver) ", ver, "f=", f
+
s = b
- if f:
+ if re.match(".*rc.*rc.*", ver):
+ s = "%s-incrc" %b
+ elif f:
s = "%s-%s" % (b, f)
elif p:
s = "%s-pre" % b
@@ -297,11 +316,14 @@ def version_urls(ver):
if type(i) != type([]):
i = [i]
+ print "version urls i = ", i
+
v = {
'full': ver,
'tree': tree(ver),
'base': base(ver),
- 'prebase': prebase(ver)
+ 'prebase': prebase(ver),
+ 'preincr': preincr(ver),
}
l = []
@@ -399,6 +421,7 @@ def get_patch(ver):
def apply_patch(ver, reverse = 0):
"""Find the patch to upgrade from the predecessor of ver to ver and
apply or reverse it."""
+ print 'apply patch ', ver, ' reverse = ', reverse
p = get_patch(ver)
r = ""
if reverse:
@@ -501,6 +524,15 @@ def find_ver(ver):
else:
return ver
+def remove_pre(a):
+ print 'remove -pre ' + a
+ apply_patch(a, 1)
+
+def goto_pre(a):
+ print 'goto -pre ' + a
+ apply_patch(base(a)+'-rc1', 0)
+ return base(a)+'-rc1'
+
def transform(a, b):
if a == b:
qprint("Nothing to do!")
@@ -514,9 +546,16 @@ def transform(a, b):
if fork(a):
apply_patch(a, 1)
a = prebase(a)
+
+ if base(a) == base(b):
+ if pre(a) and pre(b) and pre(a) < pre(b):
+ print a, ' to ', b, ' possible small steps'
+
if prebase(a) != prebase(b):
+ print 'prebase ', a, ' is not prebase ', b
if pre(a):
- apply_patch(a, 1)
+ print 'pre (a)', pre(a)
+ remove_pre(a)
a = base(a)
if post(a) and (post(a) != post(b) or rev(a) != rev(b)):
@@ -536,8 +575,21 @@ def transform(a, b):
a = base(b)
if pre(b):
- apply_patch(prebase(b))
- a = prebase(b)
+ print "Now at ", a, " should go to ", b
+ rb = rev(a)
+ rc1base = "%s.%s" % (t, rb+1)
+ print "... ", rc1base
+ a = goto_pre(rc1base)
+
+ print "Now at ", a
+
+ while pre(a) < pre(b):
+ s = ("%s-%s-%s" % (rc1base, pre(a), next_pre(a)))
+ print "Applying ", s
+ apply_patch(s, 0)
+ a = "%s-%s" % (rc1base, next_pre(a))
+ print "Should be at ", a
+
if fork(b):
a = apply_patch(b)
@@ -573,6 +625,10 @@ version_info = {
kernel_url + "/v2.6" + "/patch-%(prebase)s.bz2",
r'patch-(.*?).bz2',
1, "current stable kernel series"),
+ '2.6-incrc': (latest_dir,
+ kernel_url + "/v2.6" + "/testing/incr/patch-%(preincr)s.bz2",
+ r'patch-(.*?).bz2',
+ 1, "current stable kernel series prereleases -- incremental"),
'2.6-rc': (latest_dir,
kernel_url + "/v2.6" + "/testing/patch-%(prebase)s.bz2",
r'patch-(.*?).bz2',
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2010-02-21 19:29 UTC|newest]
Thread overview: 106+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-11 18:36 J.H.
2010-02-11 19:44 ` david
2010-02-11 19:48 ` H. Peter Anvin
2010-02-12 0:14 ` [kernel.org mirrors] " Carlos Carvalho
2010-02-11 20:22 ` [kernel.org users] " Willy Tarreau
2010-02-11 20:51 ` Pavel Machek
2010-02-11 22:22 ` H. Peter Anvin
2010-02-12 14:35 ` Jean Delvare
2010-02-13 17:10 ` Jean Delvare
2010-02-13 18:49 ` Geert Uytterhoeven
2010-02-13 19:30 ` Randy Dunlap
2010-02-16 14:55 ` Steven Rostedt
2010-02-13 23:28 ` Stefan Richter
2010-02-14 9:07 ` Jean Delvare
2010-02-13 23:52 ` Phillip Lougher
2010-02-14 9:23 ` Jean Delvare
2010-02-14 9:33 ` Justin P. Mattock
2010-02-14 9:49 ` Willy Tarreau
2010-02-14 12:43 ` Jean Delvare
2010-02-15 21:31 ` James Cloos
2010-02-17 5:40 ` Willy Tarreau
2010-02-17 5:54 ` H. Peter Anvin
2010-02-17 10:22 ` Petri Kaukasoina
2010-02-17 10:25 ` Petri Kaukasoina
2010-02-14 9:56 ` Andi Kleen
2010-02-18 23:59 ` Jan Engelhardt
2010-02-14 10:16 ` Lasse Collin
2010-02-12 14:01 ` Jean Delvare
2010-02-12 15:21 ` Linus Torvalds
2010-02-12 19:02 ` J.H.
2010-02-12 19:23 ` Jean Delvare
2010-02-12 23:07 ` Willy Tarreau
2010-02-13 6:20 ` Pavel Machek
2010-02-13 10:06 ` Stefan Richter
2010-02-13 10:21 ` Stefan Richter
2010-02-14 9:56 ` Lasse Collin
2010-02-13 8:17 ` Jean Delvare
2010-02-13 9:59 ` Stefan Richter
2010-02-13 10:18 ` Avi Kivity
2010-02-13 21:37 ` [kernel] " Mr. James W. Laferriere
2010-02-13 22:39 ` Bernd Petrovitsch
2010-02-15 19:33 ` [kernel.org users] [kernel] " Steve French
2010-02-16 9:16 ` Bernd Petrovitsch
2010-02-16 15:13 ` J.H.
2010-02-14 17:13 ` [kernel.org users] " Pavel Machek
2010-02-14 17:33 ` Stefan Richter
2010-02-14 20:51 ` Pavel Machek
2010-02-15 8:48 ` Stefan Richter
2010-02-15 23:32 ` Tom Rini
2010-02-16 8:21 ` Stefan Richter
2010-02-14 17:07 ` Pavel Machek
2010-02-14 18:39 ` Stefan Richter
2010-02-14 21:04 ` david
2010-02-14 21:32 ` Jean Delvare
2010-02-14 18:59 ` H. Peter Anvin
2010-02-14 19:08 ` Jean Delvare
2010-02-15 15:15 ` tytso
2010-02-16 15:29 ` J.H.
2010-02-16 16:03 ` Jean Delvare
2010-02-17 1:36 ` David Rees
2010-02-16 14:00 ` Pavel Machek
2010-02-19 0:08 ` Jan Engelhardt
2010-02-19 4:38 ` J.H.
2010-02-12 15:25 ` Steven Rostedt
2010-02-12 16:11 ` Jean Delvare
2010-02-12 16:30 ` Steven Rostedt
2010-02-12 16:44 ` Jean Delvare
2010-02-12 20:34 ` Junio C Hamano
2010-02-12 21:16 ` Steven Rostedt
2010-02-16 15:39 ` ketchup was " Pavel Machek
2010-02-16 16:17 ` Steven Rostedt
2010-02-16 16:27 ` Pavel Machek
2010-02-21 13:53 ` Pavel Machek
2010-02-21 14:26 ` Jean Delvare
2010-02-21 19:28 ` Pavel Machek [this message]
2010-02-22 18:59 ` Pavel Machek
2010-02-23 13:14 ` Steven Rostedt
2010-02-23 20:32 ` Pavel Machek
2010-02-12 19:02 ` Phillip Lougher
2010-02-12 19:32 ` Jean Delvare
2010-02-12 19:57 ` Phillip Lougher
2010-02-12 21:59 ` Jean Delvare
2010-02-12 23:30 ` Phillip Lougher
2010-02-12 23:39 ` Phillip Lougher
2010-02-13 7:31 ` Jean Delvare
2010-02-13 22:37 ` Phillip Lougher
2010-02-14 9:32 ` Jean Delvare
2010-02-14 9:53 ` Justin P. Mattock
[not found] ` <20100212223547.GN5186@tux>
2010-02-13 7:20 ` Jean Delvare
2010-02-12 19:03 ` H. Peter Anvin
2010-02-12 20:25 ` Matthew Wilcox
2010-02-12 21:54 ` Greg KH
2010-02-12 21:58 ` Steven Rostedt
2010-02-14 14:49 ` Harald Arnesen
2010-02-14 18:34 ` H. Peter Anvin
2010-02-12 20:31 ` [kernel.org mirrors] " Sleddens, J.P.G.
2010-02-12 22:11 ` H. Peter Anvin
2010-02-12 23:14 ` [kernel.org users] [kernel.org mirrors] " Willy Tarreau
2010-02-13 7:42 ` [kernel.org users] " Tony Luck
2010-02-13 8:14 ` H. Peter Anvin
2010-02-13 8:53 ` Jean Delvare
2010-02-14 5:43 ` H. Peter Anvin
[not found] ` <987664A83D2D224EAE907B061CE93D53123E0ED5@orsmsx505.amr.corp.intel.com>
2010-02-17 0:11 ` H. Peter Anvin
2010-02-14 18:03 ` Eric W. Biederman
2010-02-14 22:27 ` Stephen Hemminger
2010-02-15 16:15 ` Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100221192854.GA2217@ucw.cz \
--to=pavel@ucw.cz \
--cc=khali@linux-fr.org \
--cc=lasse.collin@tukaani.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome