diff options
author | Richard Hughes <richard@hughsie.com> | 2015-05-26 14:31:36 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2015-05-26 14:31:36 +0100 |
commit | 72af45734cbe36290dcffab1a20299f4d4e89113 (patch) | |
tree | ce9429670ec2336bd9ea6b0287e97b6b7207200c | |
parent | b396250c2fa09f976d075597ff3715c41efac0fb (diff) | |
download | appstream-glib-72af45734cbe36290dcffab1a20299f4d4e89113.tar.gz |
Do not use the cache location when using install-origin with a DESTDIR
-rw-r--r-- | client/as-util.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/client/as-util.c b/client/as-util.c index fbc977b..52ad5f9 100644 --- a/client/as-util.c +++ b/client/as-util.c @@ -1400,6 +1400,7 @@ static gboolean as_util_install_origin (AsUtilPrivate *priv, gchar **values, GError **error) { guint i; + const gchar *destdir; /* check args */ if (g_strv_length (values) < 2) { @@ -1413,10 +1414,12 @@ as_util_install_origin (AsUtilPrivate *priv, gchar **values, GError **error) /* for each item on the command line, install the xml files and * explode the icon files */ + destdir = g_getenv ("DESTDIR"); for (i = 1; values[i] != NULL; i++) { - if (!as_utils_install_filename (AS_UTILS_LOCATION_CACHE, + if (!as_utils_install_filename (destdir != NULL ? AS_UTILS_LOCATION_SHARED : + AS_UTILS_LOCATION_CACHE, values[i], values[0], - g_getenv ("DESTDIR"), + destdir, error)) return FALSE; } |