lkml.org 
[lkml]   [2010]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
SubjectRe: ketchup was Re: [kernel.org users] XZ Migration discussion
Add --only-dl option -- when you want to cache the needed patches but
not apply anything yet.

Signed-off-by: Pavel Machek <pavel@ucw.cz>

diff --git a/ketchup b/ketchup
index 0728aec..3249cbc 100755
--- a/ketchup
+++ b/ketchup
@@ -405,7 +405,7 @@ def apply_patch(ver, reverse = 0):
r = " -R"

qprint("Applying %s%s" % (os.path.basename(p), r))
- if options["dry-run"]:
+ if options["dry-run"] or options["only-dl"]:
return ver

def cmd(patch, reverse, dry):
@@ -484,7 +484,7 @@ def install_nearest(ver):
ver = list[0][2]

qprint("Unpacking %s" % os.path.basename(f))
- if options["dry-run"]: return ver
+ if options["dry-run"] or options["only-dl"]: return ver
untar(f)

return ver
@@ -658,6 +658,7 @@ opts = [
('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'),
+ ('o', 'only-dl', None, 'don\'t 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>'
@@ -750,7 +751,7 @@ if not a and os.listdir("."):
b = find_ver(args[0])
qprint("%s -> %s" % (a, b))
transform(a, b)
-if options["rename-directory"] and not options["dry-run"]:
+if options["rename-directory"] and not options["dry-run"] and not options["only-dl"] :
rename_dir(b)

if postcommand and os.system(postcommand):

diff --git a/ketchup.1 b/ketchup.1
index 0a313ee..9e5a385 100644
--- a/ketchup.1
+++ b/ketchup.1
@@ -1,5 +1,5 @@
.\" Hey, EMACS: -*- nroff -*-
-.TH KETCHUP 1 "April 12, 2006"
+.TH KETCHUP 1 "February 16, 2010"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@@ -74,6 +74,11 @@ output version in makefile <arg>
.IP
don't download or apply patches
.HP
+.B \-o
+.B \-\-only\-dl
+.IP
+don't apply patches
+.HP
.B \-p
.B \-\-show\-previous
.IP

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


\
 
 \ /
  Last update: 2010-02-16 17:31    [W:0.094 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site