xbps-bin: don't initialize repolist data unless we want to update.

xbps_find_new_pkg: always initialize repolist data.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091016150435-wpjfd453hpwr5k89
This commit is contained in:
Juan RP 2009-10-16 17:04:35 +02:00
parent becfac0c08
commit cb1f10d415
2 changed files with 6 additions and 5 deletions

View File

@ -130,11 +130,6 @@ main(int argc, char **argv)
goto out;
}
}
if ((rv = xbps_prepare_repolist_data()) != 0) {
printf("Couldn't initialized repository pool data (%s)\n",
strerror(rv));
goto out;
}
if (strcasecmp(argv[0], "list") == 0) {
/* Lists packages currently registered in database. */

View File

@ -256,6 +256,12 @@ xbps_find_new_pkg(const char *pkgname, prop_dictionary_t instpkg)
assert(pkgname != NULL);
assert(instpkg != NULL);
/*
* Prepare dictionary with all registered repositories.
*/
if ((rv = xbps_prepare_repolist_data()) != 0)
return rv;
SIMPLEQ_FOREACH(rdata, &repodata_queue, chain) {
/*
* Get the package dictionary from current repository.