[Libguestfs] [PATCH 3/8] builder: add functions to read XDG_CONFIG_DIRS and XDG_CONFIG_PATH
Richard W.M. Jones
rjones at redhat.com
Sun Mar 2 12:43:25 UTC 2014
On Tue, Feb 25, 2014 at 05:29:08PM +0100, Pino Toscano wrote:
> +let xdg_config_dirs ~prog =
> + let dirs =
> + try Sys.getenv "XDG_CONFIG_DIRS"
> + with Not_found -> "/etc/xdg" in
This seems to put the virt-builder config files into
/etc/xdg/virt-builder which is kind of annoying. Can we move them to
a regular default location (/etc/virt-builder)?
I have patched this in the Fedora package for now.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
-------------- next part --------------
>From f108f373eacdc9436f8345d928b69c8f3035dc23 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Sun, 2 Mar 2014 12:42:34 +0000
Subject: [PATCH] builder: Move repos configuration to
/etc/virt-builder/repos.d/
---
builder/Makefile.am | 2 +-
builder/paths.ml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/builder/Makefile.am b/builder/Makefile.am
index a539e91..e3da2ca 100644
--- a/builder/Makefile.am
+++ b/builder/Makefile.am
@@ -243,7 +243,7 @@ DISTCLEANFILES = .depend
# virt-builder's default repository
-repoconfdir = $(sysconfdir)/xdg/virt-builder/repos.d
+repoconfdir = $(sysconfdir)/virt-builder/repos.d
repoconf_DATA = libguestfs.conf libguestfs.gpg
# Build a small C index validator program.
diff --git a/builder/paths.ml b/builder/paths.ml
index e4f0c7b..2eeebeb 100644
--- a/builder/paths.ml
+++ b/builder/paths.ml
@@ -35,7 +35,7 @@ let xdg_config_home ~prog =
let xdg_config_dirs ~prog =
let dirs =
try Sys.getenv "XDG_CONFIG_DIRS"
- with Not_found -> "/etc/xdg" in
+ with Not_found -> "/etc" in
let dirs = string_nsplit ":" dirs in
let dirs = List.filter (fun x -> x <> "") dirs in
List.map (fun x -> x // prog) dirs
--
1.8.5.3
More information about the Libguestfs
mailing list