summaryrefslogtreecommitdiff
path: root/pcr/upower-pm-utils/upower-pm-utils-0.9.23-create-dir-runtime.patch
diff options
context:
space:
mode:
authorfreaj <freaj@riseup.net>2015-03-29 19:52:16 +0200
committerfreaj <freaj@riseup.net>2015-03-29 19:52:16 +0200
commit5b682c9ac487da900e2d493a0787e83be2f466f5 (patch)
tree1be310f097095f8674c9fd929390dfbbf1f5756a /pcr/upower-pm-utils/upower-pm-utils-0.9.23-create-dir-runtime.patch
parent896520ecb98b8c40777b8dc510a051d2b3908328 (diff)
upower-pm-utils: add new package to [pcr]
Diffstat (limited to 'pcr/upower-pm-utils/upower-pm-utils-0.9.23-create-dir-runtime.patch')
-rw-r--r--pcr/upower-pm-utils/upower-pm-utils-0.9.23-create-dir-runtime.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/pcr/upower-pm-utils/upower-pm-utils-0.9.23-create-dir-runtime.patch b/pcr/upower-pm-utils/upower-pm-utils-0.9.23-create-dir-runtime.patch
new file mode 100644
index 000000000..b73cbcb5d
--- /dev/null
+++ b/pcr/upower-pm-utils/upower-pm-utils-0.9.23-create-dir-runtime.patch
@@ -0,0 +1,34 @@
+From b9cff29978113aefe3ad18521f383f12ab099a34 Mon Sep 17 00:00:00 2001
+From: Cosimo Cecchi <cosimo@endlessm.com>
+Date: Tue, 25 Feb 2014 09:43:04 +0000
+Subject: Create the history directory at runtime
+
+In addition to build time - this increases compatibilty with OSTree,
+which starts out with an empty /var.
+
+Signed-off-by: Richard Hughes <richard@hughsie.com>
+---
+diff --git a/src/up-history.c b/src/up-history.c
+index f9d0fdf..795b093 100644
+--- a/src/up-history.c
++++ b/src/up-history.c
+@@ -414,6 +414,7 @@ up_history_set_directory (UpHistory *history, const gchar *dir)
+ {
+ g_free (history->priv->dir);
+ history->priv->dir = g_strdup (dir);
++ g_mkdir_with_parents (dir, 0755);
+ }
+
+ /**
+@@ -887,7 +888,8 @@ up_history_init (UpHistory *history)
+ history->priv->data_time_full = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
+ history->priv->data_time_empty = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
+ history->priv->max_data_age = UP_HISTORY_DEFAULT_MAX_DATA_AGE;
+- history->priv->dir = g_build_filename (HISTORY_DIR, NULL);
++
++ up_history_set_directory (history, HISTORY_DIR);
+ }
+
+ /**
+--
+cgit v0.9.0.2-2-gbebe