From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] Allow to override sync source Date: Sun, 17 May 2009 22:31:07 +0300 Message-ID: <4A1065FB.5090704@redhat.com> References: <4A0C8138.6000508@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm-devel To: Jan Kiszka Return-path: Received: from mx2.redhat.com ([66.187.237.31]:43988 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752724AbZEQTbE (ORCPT ); Sun, 17 May 2009 15:31:04 -0400 In-Reply-To: <4A0C8138.6000508@web.de> Sender: kvm-owner@vger.kernel.org List-ID: Jan Kiszka wrote: > In order to allow sync'ing the kmod dir against arbitrary kernels trees, > extend the sync script to accept alternative paths and adjust the > Makefile accordingly. > > @@ -17,6 +17,7 @@ ORIGMODDIR = $(patsubst %/build,%/kernel,$(KERNELDIR)) > > rpmrelease = devel > > +KVM_VERSION = kvm-devel > LINUX = ./linux-2.6 > You're overriding ./configure here. What was the motivation? > > -version = 'kvm-devel' > -if len(sys.argv) >= 2: > - version = sys.argv[1] > +parser = OptionParser(usage='usage: %prog [-v version][-l linuxkernel]') > +parser.add_option('-v', action='store', type='string', dest='version') > +parser.add_option('-l', action='store', type='string', dest='linux') > Please add help, and spaces around '='. > +(options, args) = parser.parse_args() > > +version = 'kvm-devel' > linux = 'linux-2.6' > > +if options.version: > + version = options.version > +if options.linux: > + linux = options.linux > + > Can replace this with set_defaults(). -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.