[ketchup] patch to alt urls for local trees

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Matt,

Here's another patch.  This one allows for local alternative url paths.
As you know, I use ketchup for Thomas Gleixner's ktimers.  He also
stores his archives differently than everyone else.  So I have as
my .ketchuprc the following.

local_trees = {
	'2.6-kt': (latest_dir,
		"http://www.tglx.de/projects/ktimers/patch-%(full)s.patch",
		r'patch-(2.6.*?)',
		0, "Thomas Gleixner's ktimers."),
	'2.6-kthrt': (latest_dir,
		"http://www.tglx.de/projects/ktimers/patch-%(full)s.patch",
		r'patch-(2.6.*?)',
		0, "Thomas Gleixner's ktimers and HRT patches.")
}

local_alturls = {
	'/ktimers/' : "/ktimers/archive/"
}



With the below patch to grab the older ktimer patches.

Now, I would like to let you know that I've only written one program in
python for all my life.  So I am not very comfortable writing code for
it. So if you can clean this up, I wouldn't mind.  For now, this works
for me.

-- Steve

Index: Ketchup-d9503020b3c1/ketchup
===================================================================
--- Ketchup-d9503020b3c1.orig/ketchup	2005-10-28 08:48:37.000000000 -0400
+++ Ketchup-d9503020b3c1/ketchup	2005-10-28 09:27:31.000000000 -0400
@@ -89,6 +89,7 @@
 precommand = postcommand = None
 default_tree = None
 local_trees = {}
+local_alturls = {}
 
 def qprint(*args):
     if not options["quiet"]:
@@ -355,6 +356,9 @@
     # the jgarzik memorial hack
     url2 = re.sub("/snapshots/", "/snapshots/old/", url)
     url2 = re.sub("/realtime-preempt/", "/realtime-preempt/older/", url2)
+    for exp,rep in local_alturls.items():
+        if url2 != url: break
+        url2 = re.sub(exp, rep, url2)
     if url2 != url:
         if download(url2, file): return file
         if url2[-4:] == ".bz2":


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux