Skip to content

Commit 7a62e67

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 5db7f64 commit 7a62e67

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
@@ -233,7 +233,7 @@ main(int argc, char **argv)
233233

234234
/* Sync remote repository data and import keys from remote repos */
235235
if (syncf && !drun) {
236-
if ((rv = xbps_rpool_sync(&xh, NULL)) != 0)
236+
if ((rv = xbps_rpool_sync(&xh)) != 0)
237237
exit(rv);
238238
rv = xbps_rpool_foreach(&xh, repo_import_key_cb, NULL);
239239
if (rv != 0)

include/xbps.h.in

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

14591459
/**
14601460
* Synchronizes repository data for all remote repositories
1461-
* as specified in the configuration file or if \a uri argument is
1462-
* set, just sync for that repository.
1461+
* as specified in the configuration file.
14631462
*
14641463
* @param[in] xhp Pointer to the xbps_handle struct.
1465-
* @param[in] uri Repository URI to match for sync (optional).
14661464
*
14671465
* @return 0 on success, ENOTSUP if no repositories were found in
14681466
* the configuration file.
14691467
*/
1470-
int xbps_rpool_sync(struct xbps_handle *xhp, const char *uri);
1468+
int xbps_rpool_sync(struct xbps_handle *xhp);
14711469

14721470
/**
14731471
* 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
@@ -58,16 +58,12 @@ static SIMPLEQ_HEAD(rpool_head, xbps_repo) rpool_queue =
5858
*/
5959

6060
int
61-
xbps_rpool_sync(struct xbps_handle *xhp, const char *uri)
61+
xbps_rpool_sync(struct xbps_handle *xhp)
6262
{
6363
const char *repouri = NULL;
6464

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

0 commit comments

Comments
 (0)