From: Ian Campbell Subject: Re: [PATCH 07/12 v4] tools/pygrub: store kernels in /var/run/xen/pygrub Date: Fri, 2 May 2014 12:48:46 +0100 Message-ID: <1399031326.32736.68.camel@kazak.uk.xensource.com> References: <1398328615-28461-8-git-send-email-olaf@aepfle.de> <1398341529-10585-1-git-send-email-olaf@aepfle.de> <1399027798.32736.31.camel@kazak.uk.xensource.com> <20140502110247.GC5612@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140502110247.GC5612@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Olaf Hering Cc: Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, 2014-05-02 at 13:02 +0200, Olaf Hering wrote: > On Fri, May 02, Ian Campbell wrote: > > > On Thu, 2014-04-24 at 14:12 +0200, Olaf Hering wrote: > > > Move location of temporary bootfiles from /var/run/xend/boot to > > > /var/run/xen/pygrub. Create the subdirectory if does not exist, unless > > > --output-directory= was specified. > > > > I'm not at all opposed to this change but why this last condition? Any > > reason not to always create the directory if it doesn't exist? > > > > Or should there be an existence check when you specify > > --output-directory? > > Without --output-directory the default should be created internally. > With --output-directory the specified dir should exist already. > Perhaps new code can be added to check if the given path is a directory. Probably. That would also lead to a potentially simplicifaction and keeping the default up at the top: initially: output_directory = "/var/path/todefault" then when handling --output: fi not os.path.isdir(argument): ARGH! output_directory = argument eventually: if not os.path.isdir(argument): # will never hit if --output-directory was given os.path.mkdir What do you think?