From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Olaf Hering <olaf@aepfle.de>, xen-devel@lists.xen.org
Cc: Keir Fraser <keir@xen.org>,
David Scott <dave.scott@eu.citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
George Dunlap <george.dunlap@eu.citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
Jan Beulich <jbeulich@suse.com>,
Samuel Thibault <samuel.thibault@ens-lyon.org>,
Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [PATCH 06/46] tools/pygrub: store kernels in /var/run/xen/pygrub
Date: Mon, 22 Sep 2014 16:29:56 +0100 [thread overview]
Message-ID: <54204074.4080207@citrix.com> (raw)
In-Reply-To: <1411390835-7348-7-git-send-email-olaf@aepfle.de>
On 22/09/14 13:59, 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.
> The <dir> argument --output-directory must be an existing directory.
>
> The reason for this change is that all entrys below /var/run have to be
> created at runtime in case /var/run is cleared on every boot.
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> Acked-by: Ian Campbell <ian.campbell@citrix.com>
> ---
> tools/pygrub/src/pygrub | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub
> index 2618e11..e73a174 100644
> --- a/tools/pygrub/src/pygrub
> +++ b/tools/pygrub/src/pygrub
> @@ -778,7 +778,7 @@ if __name__ == "__main__":
> debug = False
> not_really = False
> output_format = "sxp"
> - output_directory = "/var/run/xend/boot"
> + output_directory = "/var/run/xen/pygrub"
>
> # what was passed in
> incfg = { "kernel": None, "ramdisk": None, "args": "" }
> @@ -829,11 +829,17 @@ if __name__ == "__main__":
> sys.exit(1)
> output_format = a
> elif o in ("--output-directory",):
> + if not os.path.isdir(a):
> + print "%s is not an existing directory" % a
> + sys.exit(1)
> output_directory = a
>
> if debug:
> logging.basicConfig(level=logging.DEBUG)
>
> + if not os.path.isdir(output_directory):
> + os.mkdir(output_directory, 0700)
This can fail if output_directory exists but is not a directory. It
needs wrapping to catch OSError and provide a more useful error to the user.
~Andrew
> +
> if output is None or output == "-":
> fd = sys.stdout.fileno()
> else:
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2014-09-22 15:29 UTC|newest]
Thread overview: 116+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-22 12:59 [PATCH 00/45 v3] tool changes to honor configure --prefix=DIR Olaf Hering
2014-09-22 12:59 ` [PATCH 01/46] stubdom: fix lwip compile Olaf Hering
2014-09-22 12:59 ` [PATCH 02/46] tools/xenpaging: create dumpdir with mode 0700 Olaf Hering
2014-09-22 15:52 ` Ian Campbell
2014-09-22 12:59 ` [PATCH 03/46] install.sh: Preserve permissions from make install Olaf Hering
2014-09-22 15:54 ` Ian Campbell
2014-09-23 12:14 ` Olaf Hering
2014-09-23 12:36 ` Ian Campbell
2014-09-22 12:59 ` [PATCH 04/46] tools/mkrpm: allow custom rpm package name Olaf Hering
2014-09-22 15:55 ` Ian Campbell
2014-09-22 12:59 ` [PATCH 05/46] tools: remove obsolete path.py from tools/python Olaf Hering
2014-09-22 15:55 ` Ian Campbell
2014-09-22 12:59 ` [PATCH 06/46] tools/pygrub: store kernels in /var/run/xen/pygrub Olaf Hering
2014-09-22 15:29 ` Andrew Cooper [this message]
2014-09-22 15:36 ` Ian Campbell
2014-09-22 12:59 ` [PATCH 07/46] tools/hotplug: create XEN_RUN_DIR at runtime Olaf Hering
2014-09-22 12:59 ` [PATCH 08/46] tools/hotplug: create XEN_LOCK_DIR " Olaf Hering
2014-09-22 12:59 ` [PATCH 09/46] tools/hotplug: use XEN_LOCK_DIR instead of hardcoded path Olaf Hering
2016-04-11 16:34 ` George Dunlap
2016-04-12 16:18 ` Olaf Hering
2014-09-22 12:59 ` [PATCH 10/46] tools/examples: remove obsolete install targets Olaf Hering
2014-09-22 13:00 ` [PATCH 11/46] remove obsolete SUBSYS_DIR variable Olaf Hering
2014-09-22 13:00 ` [PATCH 12/46] Config.mk: move directory list into BUILD_MAKE_VARS Olaf Hering
2014-09-22 13:00 ` [PATCH 13/46] Config.mk: replace dependency to genpath with actual target Olaf Hering
2014-09-22 15:59 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 14/46] Config.mk: add new macro buildmakevars2header Olaf Hering
2014-09-22 16:04 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 15/46] tools/libxl: use buildmakevars2header to create _paths.h Olaf Hering
2014-09-22 13:00 ` [PATCH 16/46] tools/libxc: provide variable paths to libxc Olaf Hering
2014-09-22 13:00 ` [PATCH 17/46] tools/libxc: use XEN_RUN_DIR for SUSPEND_LOCK_FILE Olaf Hering
2014-09-22 13:00 ` [PATCH 18/46] Use configure --sysconfdir=DIR to set CONFIG_DIR Olaf Hering
2014-09-22 16:13 ` Ian Campbell
2014-09-23 9:46 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 19/46] Add configure --with-initd-dir=DIR Olaf Hering
2014-09-22 16:22 ` Ian Campbell
2014-09-23 12:17 ` Olaf Hering
2014-09-24 12:11 ` Olaf Hering
2014-09-29 12:13 ` Ian Campbell
2014-09-30 12:05 ` Olaf Hering
2014-09-30 12:24 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 20/46] tools/hotplug: use XEN_SCRIPT_DIR instead of hardcoded path Olaf Hering
2014-09-22 16:27 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 21/46] tools/configure.ac: sort AC_CONFIG_FILES Olaf Hering
2014-09-22 16:38 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 22/46] tools: use INITD_DIR instead of CONFIG_DIR/init.d|rc.d Olaf Hering
2014-09-23 9:23 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 23/46] tools/hotplug: substitute XEN_SCRIPT_DIR on FreeBSD Olaf Hering
2014-09-23 9:24 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 24/46] remove duplicate variables from config Olaf Hering
2014-09-23 9:25 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 25/46] Use configure --mandir=DIR to set MANDIR Olaf Hering
2014-09-23 9:32 ` Ian Campbell
2014-09-23 9:36 ` Ian Campbell
2014-09-23 12:23 ` Olaf Hering
2014-09-23 12:36 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 26/46] Use configure --docdir=DIR to set DOCDIR Olaf Hering
2014-09-22 13:00 ` [PATCH 27/46] Use configure --includedir=DIR to set INCLUDEDIR Olaf Hering
2014-09-22 13:00 ` [PATCH 28/46] Use configure --libexecdir=BASEDIR to set LIBEXEC Olaf Hering
2014-09-23 9:45 ` Ian Campbell
2014-09-23 12:34 ` Olaf Hering
2014-09-23 12:38 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 29/46] Use configure --prefix=DIR to set PREFIX Olaf Hering
2014-09-23 10:14 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 30/46] Use configure --localstatedir=BASEDIR to set path to /var Olaf Hering
2014-09-23 10:18 ` Ian Campbell
2014-09-23 12:37 ` Olaf Hering
2014-09-23 12:39 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 31/46] Add configure --enable-rpath Olaf Hering
2014-09-23 10:23 ` Ian Campbell
2014-09-23 10:37 ` Olaf Hering
2014-09-22 13:00 ` [PATCH 32/46] Add configure --with-linux-backend-modules="mod1 mod2" Olaf Hering
2014-09-23 10:28 ` Ian Campbell
2014-09-23 10:36 ` Olaf Hering
2014-09-23 10:50 ` Ian Campbell
2014-09-23 12:41 ` Olaf Hering
2014-09-23 12:44 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 33/46] Add configure --with-bash_completion-dir=DIR Olaf Hering
2014-09-23 10:32 ` Ian Campbell
2014-09-23 12:49 ` Olaf Hering
2014-09-22 13:00 ` [PATCH 34/46] Make XENFIRMWAREDIR a subdir of libexecdir Olaf Hering
2014-09-23 10:33 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 35/46] Use just PREFIX to reference the path in Paths.mk Olaf Hering
2014-09-23 10:33 ` Ian Campbell
2014-09-23 12:52 ` Olaf Hering
2014-09-23 12:59 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 36/46] tools: remove private copies of includedir and libdir from libxenstat Olaf Hering
2014-09-23 10:34 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 37/46] Use Paths.mk for docs, stubdom and tools build Olaf Hering
2014-09-23 10:37 ` Ian Campbell
2014-09-23 12:55 ` Olaf Hering
2014-09-22 13:00 ` [PATCH 38/46] Move xenconsoled to libexec Olaf Hering
2014-09-23 10:40 ` Ian Campbell
2014-09-23 12:56 ` Olaf Hering
2014-09-23 13:01 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 39/46] Move xenstored " Olaf Hering
2014-09-23 10:41 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 40/46] Move xenwatchdogd " Olaf Hering
2014-09-22 13:00 ` [PATCH 41/46] tools: use XEN_LIB_STORED instead of /var/lib/xenstored Olaf Hering
2014-09-23 10:41 ` Ian Campbell
2014-09-23 12:58 ` Olaf Hering
2014-09-23 13:01 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 42/46] Use XEN_RUN_DIR instead of /var/run/xen Olaf Hering
2014-09-23 10:44 ` Ian Campbell
2014-09-23 13:01 ` Olaf Hering
2014-09-23 13:06 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 43/46] Move systemd paths to Paths.mk Olaf Hering
2014-09-23 10:44 ` Ian Campbell
2014-09-23 13:03 ` Olaf Hering
2014-09-23 13:06 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 44/46] Include Paths.mk in toplevel Makefile to fix uninstall Olaf Hering
2014-09-23 10:47 ` Ian Campbell
2014-09-23 13:05 ` Olaf Hering
2014-09-22 13:00 ` [PATCH 45/46] Move MAN1DIR and MAN8DIR to Paths.mk Olaf Hering
2014-09-23 10:47 ` Ian Campbell
2014-09-22 13:00 ` [PATCH 46/46] rerun autogen.sh Olaf Hering
2014-09-23 10:48 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54204074.4080207@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=dave.scott@eu.citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=olaf@aepfle.de \
--cc=samuel.thibault@ens-lyon.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).