Skip to content

Commit

Permalink
considers metalink and mirrorlink during metadata download (still not…
Browse files Browse the repository at this point in the history
… working)
  • Loading branch information
Jan Silhan committed Nov 16, 2016
1 parent 3d714e2 commit dee396e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions client/repo.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ TDNFInitRepo(
BAIL_ON_TDNF_ERROR(dwError);
}

ppszRepoUrls[0] = pRepoData->pszBaseUrl;
ppszLocalUrls[0] = pszRepoCacheDir;

hLibRepo = lr_handle_init();
Expand Down Expand Up @@ -112,7 +111,16 @@ TDNFInitRepo(
}
}

lr_handle_setopt(hLibRepo, NULL, LRO_URLS, ppszRepoUrls);
if (pRepoData->pszMirrorList)
lr_handle_setopt(hLibRepo, NULL, LRO_MIRRORLIST, pRepoData->pszMirrorList);
if (pRepoData->pszMetaLink)
lr_handle_setopt(hLibRepo, NULL, LRO_METALINKURL, pRepoData->pszMetaLink);
if (pRepoData->pszBaseUrl)
{
ppszRepoUrls[0] = pRepoData->pszBaseUrl;
lr_handle_setopt(hLibRepo, NULL, LRO_URLS, ppszRepoUrls);
}

lr_handle_setopt(hLibRepo, NULL, LRO_SSLVERIFYPEER, 1);
lr_handle_setopt(hLibRepo, NULL, LRO_SSLVERIFYHOST, 2);
lr_handle_setopt(hLibRepo, NULL, LRO_DESTDIR, pszRepoCacheDir);
Expand Down

0 comments on commit dee396e

Please sign in to comment.