tags 407512 patch
stop

The attached patch seems to fix the problem with ignored kernel_url
override.

/ Anders
--- /usr/bin/ketchup.orig       2007-07-08 07:44:28.000000000 +0200
+++ /usr/bin/ketchup    2008-08-26 17:09:44.000000000 +0200
@@ -540,6 +540,49 @@
     qprint('Current directory renamed to %s' % newdir)
 
 
+# Override defaults with ~/.ketchuprc which is just a Python script
+rcpath = os.path.expanduser('~/.ketchuprc')
+if os.path.isfile(rcpath):
+    try:
+        execfile(rcpath)
+    except Exception, e:
+        sys.exit('Failed parsing %s\nError was: %s' % (rcpath, e))
+
+# Environment variables override defaults and ketchuprc
+kernel_url = os.environ.get("KETCHUP_URL", kernel_url)
+archive = os.environ.get("KETCHUP_ARCH", archive)
+
+# And finally command line overrides everything
+if not os.path.exists(wget): wget = ""
+if not os.path.exists(gpg): gpg = ""
+
+options = {}
+opts = [
+    ('a', 'archive', archive, 'cache directory'),
+    ('d', 'directory', '.', 'directory to update'),
+    ('f', 'full-tarball', None, 'if unpacking a tarball, download the latest'),
+    ('g', 'gpg-path', gpg, 'path for GnuPG'),
+    ('G', 'no-gpg', None, 'disable GPG signature verification'),
+    ('k', 'kernel-url', kernel_url, 'base url for kernel.org mirror'),
+    ('l', 'list-trees', None, 'list supported trees'),
+    ('m', 'show-makefile', None, 'output version in makefile <arg>'),
+    ('n', 'dry-run', None, 'don\'t download or apply patches'),
+    ('p', 'show-previous', None, 'output version previous to <arg>'),
+    ('q', 'quiet', None, 'reduce output'),
+    ('r', 'rename-directory', None, 'rename updated directory to %s<v>'
+     % rename_prefix),
+    ('s', 'show-latest', None, 'output the latest version of <arg>'),
+    ('u', 'show-url', None, 'output URL for <arg>'),
+    ('w', 'wget', wget, 'command to use for wget'),
+    ]
+
+args = fancyopts(sys.argv[1:], opts, options,
+                 'ketchup [options] [ver]')
+
+archive = options["archive"]
+kernel_url = options["kernel-url"]
+if options["no-gpg"]: options["gpg-path"] = ''
+
 # latest lookup function, canonical urls, pattern for lookup function,
 #  signature flag, description
 version_info = {
@@ -605,53 +648,10 @@
                 "Con Kolivas' patches for system responsiveness (server)")
     }
 
-# Override defaults with ~/.ketchuprc which is just a Python script
-rcpath = os.path.expanduser('~/.ketchuprc')
-if os.path.isfile(rcpath):
-    try:
-        execfile(rcpath)
-    except Exception, e:
-        sys.exit('Failed parsing %s\nError was: %s' % (rcpath, e))
-
 # Add local trees
 for k,v in local_trees.items():
     version_info[k] = v
 
-# Environment variables override defaults and ketchuprc
-kernel_url = os.environ.get("KETCHUP_URL", kernel_url)
-archive = os.environ.get("KETCHUP_ARCH", archive)
-
-# And finally command line overrides everything
-if not os.path.exists(wget): wget = ""
-if not os.path.exists(gpg): gpg = ""
-
-options = {}
-opts = [
-    ('a', 'archive', archive, 'cache directory'),
-    ('d', 'directory', '.', 'directory to update'),
-    ('f', 'full-tarball', None, 'if unpacking a tarball, download the latest'),
-    ('g', 'gpg-path', gpg, 'path for GnuPG'),
-    ('G', 'no-gpg', None, 'disable GPG signature verification'),
-    ('k', 'kernel-url', kernel_url, 'base url for kernel.org mirror'),
-    ('l', 'list-trees', None, 'list supported trees'),
-    ('m', 'show-makefile', None, 'output version in makefile <arg>'),
-    ('n', 'dry-run', None, 'don\'t download or apply patches'),
-    ('p', 'show-previous', None, 'output version previous to <arg>'),
-    ('q', 'quiet', None, 'reduce output'),
-    ('r', 'rename-directory', None, 'rename updated directory to %s<v>'
-     % rename_prefix),
-    ('s', 'show-latest', None, 'output the latest version of <arg>'),
-    ('u', 'show-url', None, 'output URL for <arg>'),
-    ('w', 'wget', wget, 'command to use for wget'),
-    ]
-
-args = fancyopts(sys.argv[1:], opts, options,
-                 'ketchup [options] [ver]')
-
-archive = options["archive"]
-kernel_url = options["kernel-url"]
-if options["no-gpg"]: options["gpg-path"] = ''
-
 # Process args
 
 if not os.path.exists(options["directory"]):

Reply via email to