xbps-repo: if fetching info from remote repo for the 'show' and 'show-files'

targets and the binary package exists in cachedir, use it.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091128022129-y6y2tr0vtvy2w745
This commit is contained in:
Juan RP
2009-11-28 03:21:29 +01:00
parent 21bea723f4
commit f3d2481c31
6 changed files with 35 additions and 13 deletions

View File

@ -39,7 +39,7 @@ static void set_extract_flags(int *);
int SYMEXPORT
xbps_unpack_binary_pkg(prop_dictionary_t pkg, bool essential)
{
const char *pkgname;
const char *pkgname, *repoloc;
struct archive *ar = NULL;
char *binfile = NULL;
int pkg_fd, rv = 0;
@ -48,8 +48,9 @@ xbps_unpack_binary_pkg(prop_dictionary_t pkg, bool essential)
if (!prop_dictionary_get_cstring_nocopy(pkg, "pkgname", &pkgname))
return errno;
binfile = xbps_get_binpkg_local_path(pkg);
if (!prop_dictionary_get_cstring_nocopy(pkg, "repository", &repoloc))
return errno;
binfile = xbps_get_binpkg_local_path(pkg, repoloc);
if (binfile == NULL)
return EINVAL;