Skip to content

Commit

Permalink
Ensure the mirror list is set before trying to download packages
Browse files Browse the repository at this point in the history
This works around a librepo behaviour change in the latest update.
  • Loading branch information
hughsie committed Feb 3, 2015
1 parent a6addd4 commit cc0f5aa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion libhif/hif-source.c
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,8 @@ hif_source_set_keyfile_data (HifSource *source, GError **error)
}

/* set location if currently unset */
if (!lr_handle_setopt (priv->repo_handle, error, LRO_LOCAL, FALSE))
return FALSE;
if (priv->location == NULL) {
_cleanup_free_ gchar *tmp = NULL;
tmp = g_build_filename (hif_context_get_cache_dir (priv->context),
Expand Down Expand Up @@ -1592,7 +1594,11 @@ hif_source_download_package (HifSource *source,
int checksum_type;
_cleanup_error_free_ GError *error_local = NULL;
_cleanup_free_ gchar *basename = NULL;
_cleanup_free_ gchar *directory_slash;
_cleanup_free_ gchar *directory_slash = NULL;

/* ensure we reset the values from the keyfile */
if (!hif_source_set_keyfile_data (source, error))
return NULL;

/* if nothing specified then use cachedir */
if (directory == NULL) {
Expand Down

0 comments on commit cc0f5aa

Please sign in to comment.