diff --git a/bin/xbps-bin/main.c b/bin/xbps-bin/main.c index 7245e9ab..c6047691 100644 --- a/bin/xbps-bin/main.c +++ b/bin/xbps-bin/main.c @@ -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. */ diff --git a/lib/findpkg.c b/lib/findpkg.c index 09c85249..f43bcc9b 100644 --- a/lib/findpkg.c +++ b/lib/findpkg.c @@ -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.