Skip to content

Commit fbc5777

Browse files
committed
lib/rpool.c: remove uri parameter from xbps_rpool_sync
This parameter is unused and does not really belong belong in the repository pool synchronization function, if there needs to be a way to sync only specific repositories, a new function should be created for that purposed.
1 parent 9e3cca0 commit fbc5777

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

bin/xbps-install/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ main(int argc, char **argv)
238238

239239
/* Sync remote repository data and import keys from remote repos */
240240
if (syncf && !drun) {
241-
if ((rv = xbps_rpool_sync(&xh, NULL)) != 0)
241+
if ((rv = xbps_rpool_sync(&xh)) != 0)
242242
exit(rv);
243243
rv = xbps_rpool_foreach(&xh, repo_import_key_cb, NULL);
244244
if (rv != 0)

include/xbps.h.in

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,16 +1482,14 @@ void xbps_rpool_release(struct xbps_handle *xhp);
14821482

14831483
/**
14841484
* Synchronizes repository data for all remote repositories
1485-
* as specified in the configuration file or if \a uri argument is
1486-
* set, just sync for that repository.
1485+
* as specified in the configuration file.
14871486
*
14881487
* @param[in] xhp Pointer to the xbps_handle struct.
1489-
* @param[in] uri Repository URI to match for sync (optional).
14901488
*
14911489
* @return 0 on success, ENOTSUP if no repositories were found in
14921490
* the configuration file.
14931491
*/
1494-
int xbps_rpool_sync(struct xbps_handle *xhp, const char *uri);
1492+
int xbps_rpool_sync(struct xbps_handle *xhp);
14951493

14961494
/**
14971495
* Iterates over the repository pool and executes the \a fn function

lib/rpool.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,12 @@ static SIMPLEQ_HEAD(rpool_head, xbps_repo) rpool_queue =
5959
*/
6060

6161
int
62-
xbps_rpool_sync(struct xbps_handle *xhp, const char *uri)
62+
xbps_rpool_sync(struct xbps_handle *xhp)
6363
{
6464
const char *repouri = NULL;
6565

6666
for (unsigned int i = 0; i < xbps_array_count(xhp->repositories); i++) {
6767
xbps_array_get_cstring_nocopy(xhp->repositories, i, &repouri);
68-
/* If argument was set just process that repository */
69-
if (uri && strcmp(repouri, uri))
70-
continue;
71-
7268
if (xbps_repo_sync(xhp, repouri) == -1) {
7369
xbps_dbg_printf(
7470
"[rpool] `%s' failed to fetch repository data: %s\n",

0 commit comments

Comments
 (0)