Skip to content

Commit 9863889

Browse files
committed
Rename pool_dep_fulfilled_in_map to pool_satisfieddep_map
This is more similar to the other functions we already have.
1 parent 276d550 commit 9863889

6 files changed

Lines changed: 40 additions & 26 deletions

File tree

doc/gen/libsolv-bindings.3

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.\" Title: Libsolv-Bindings
33
.\" Author: [see the "Author" section]
44
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5-
.\" Date: 07/29/2025
5+
.\" Date: 08/01/2025
66
.\" Manual: LIBSOLV
77
.\" Source: libsolv
88
.\" Language: English
99
.\"
10-
.TH "LIBSOLV\-BINDINGS" "3" "07/29/2025" "libsolv" "LIBSOLV"
10+
.TH "LIBSOLV\-BINDINGS" "3" "08/01/2025" "libsolv" "LIBSOLV"
1111
.\" -----------------------------------------------------------------
1212
.\" * Define some portability stuff
1313
.\" -----------------------------------------------------------------

doc/gen/libsolv-pool.3

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.\" Title: Libsolv-Pool
33
.\" Author: [see the "Author" section]
44
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5-
.\" Date: 03/25/2024
5+
.\" Date: 08/01/2025
66
.\" Manual: LIBSOLV
77
.\" Source: libsolv
88
.\" Language: English
99
.\"
10-
.TH "LIBSOLV\-POOL" "3" "03/25/2024" "libsolv" "LIBSOLV"
10+
.TH "LIBSOLV\-POOL" "3" "08/01/2025" "libsolv" "LIBSOLV"
1111
.\" -----------------------------------------------------------------
1212
.\" * Define some portability stuff
1313
.\" -----------------------------------------------------------------
@@ -878,6 +878,18 @@ Returns \(lq1\(rq if the dependency \fId1\fR (the provider) is matched by the de
878878
.\}
879879
.sp
880880
Like pool_match_dep, but the provider is the "self\-provides" dependency of the Solvable \fIs\fR, i\&.e\&. the dependency \(lqs→name = s→evr\(rq\&.
881+
.sp
882+
.if n \{\
883+
.RS 4
884+
.\}
885+
.nf
886+
\fBint pool_satisfieddep_map(Pool *\fR\fIpool\fR\fB, const Map *\fR\fImap\fR\fB, Id\fR \fIdep\fR\fB)\fR;
887+
.fi
888+
.if n \{\
889+
.RE
890+
.\}
891+
.sp
892+
Returns \(lq1\(rq if the dependency \fIdep\fR is satisfied by the packages specified in \fImap\fR, otherwise \(lq0\(rq is returned\&.
881893
.SH "WHATPROVIDES INDEX"
882894
.sp
883895
.if n \{\

doc/libsolv-pool.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -562,10 +562,10 @@ by the ``evr'' parts must overlap.
562562
Like pool_match_dep, but the provider is the "self-provides" dependency
563563
of the Solvable _s_, i.e. the dependency ``s->name = s->evr''.
564564
565-
int pool_dep_fulfilled_in_map(Pool *pool, const Map *map, Id dep);
565+
int pool_satisfieddep_map(Pool *pool, const Map *map, Id dep);
566566
567-
Returns ``1'' if the dependency _dep_ is provided by at least one package
568-
from _map_, otherwise ``0'' is returned.
567+
Returns ``1'' if the dependency _dep_ is satisfied by the packages specified
568+
in _map_, otherwise ``0'' is returned.
569569
570570
Whatprovides Index
571571
------------------

src/libsolv.ver

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ SOLV_1.0 {
9191
pool_lookup_str;
9292
pool_lookup_void;
9393
pool_match_dep;
94-
pool_dep_fulfilled_in_map;
9594
pool_match_nevr_rel;
9695
pool_prepend_rootdir;
9796
pool_prepend_rootdir_tmp;
9897
pool_queuetowhatprovides;
9998
pool_rel2id;
99+
pool_satisfieddep_map;
100100
pool_search;
101101
pool_selection2str;
102102
pool_set_custom_vendorcheck;

src/pool.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ Id pool_id2langid(Pool *pool, Id id, const char *lang, int create);
305305

306306
int pool_intersect_evrs(Pool *pool, int pflags, Id pevr, int flags, Id evr);
307307
int pool_match_dep(Pool *pool, Id d1, Id d2);
308-
int pool_dep_fulfilled_in_map(Pool *pool, const Map *map, Id dep);
308+
int pool_satisfieddep_map(Pool *pool, const Map *map, Id dep);
309+
309310

310311
/* semi private, used in pool_match_nevr */
311312
int pool_match_nevr_rel(Pool *pool, Solvable *s, Id d);
@@ -357,6 +358,7 @@ static inline Id *pool_whatprovides_ptr(Pool *pool, Id d)
357358
void pool_whatmatchesdep(Pool *pool, Id keyname, Id dep, Queue *q, int marker);
358359
void pool_whatcontainsdep(Pool *pool, Id keyname, Id dep, Queue *q, int marker);
359360
void pool_whatmatchessolvable(Pool *pool, Id keyname, Id solvid, Queue *q, int marker);
361+
360362
void pool_set_whatprovides(Pool *pool, Id id, Id providers);
361363
void pool_add_new_provider(Pool *pool, Id id, Id p);
362364

src/pooldep.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ pool_whatmatchessolvable(Pool *pool, Id keyname, Id solvid, Queue *q, int marker
346346
}
347347

348348
static int
349-
pool_dep_fulfilled_in_map_cplx(Pool *pool, const Map *map, Reldep *rd)
349+
pool_satisfieddep_map_cplx(Pool *pool, const Map *map, Reldep *rd)
350350
{
351351
if (rd->flags == REL_COND)
352352
{
@@ -355,14 +355,14 @@ pool_dep_fulfilled_in_map_cplx(Pool *pool, const Map *map, Reldep *rd)
355355
Reldep *rd2 = GETRELDEP(pool, rd->evr);
356356
if (rd2->flags == REL_ELSE)
357357
{
358-
if (pool_dep_fulfilled_in_map(pool, map, rd2->name))
359-
return pool_dep_fulfilled_in_map(pool, map, rd->name);
360-
return pool_dep_fulfilled_in_map(pool, map, rd2->evr);
358+
if (pool_satisfieddep_map(pool, map, rd2->name))
359+
return pool_satisfieddep_map(pool, map, rd->name);
360+
return pool_satisfieddep_map(pool, map, rd2->evr);
361361
}
362362
}
363-
if (pool_dep_fulfilled_in_map(pool, map, rd->name))
363+
if (pool_satisfieddep_map(pool, map, rd->name))
364364
return 1;
365-
return !pool_dep_fulfilled_in_map(pool, map, rd->evr);
365+
return !pool_satisfieddep_map(pool, map, rd->evr);
366366
}
367367
if (rd->flags == REL_UNLESS)
368368
{
@@ -371,40 +371,40 @@ pool_dep_fulfilled_in_map_cplx(Pool *pool, const Map *map, Reldep *rd)
371371
Reldep *rd2 = GETRELDEP(pool, rd->evr);
372372
if (rd2->flags == REL_ELSE)
373373
{
374-
if (!pool_dep_fulfilled_in_map(pool, map, rd2->name))
375-
return pool_dep_fulfilled_in_map(pool, map, rd->name);
376-
return pool_dep_fulfilled_in_map(pool, map, rd2->evr);
374+
if (!pool_satisfieddep_map(pool, map, rd2->name))
375+
return pool_satisfieddep_map(pool, map, rd->name);
376+
return pool_satisfieddep_map(pool, map, rd2->evr);
377377
}
378378
}
379-
if (!pool_dep_fulfilled_in_map(pool, map, rd->name))
379+
if (!pool_satisfieddep_map(pool, map, rd->name))
380380
return 0;
381-
return !pool_dep_fulfilled_in_map(pool, map, rd->evr);
381+
return !pool_satisfieddep_map(pool, map, rd->evr);
382382
}
383383
if (rd->flags == REL_AND)
384384
{
385-
if (!pool_dep_fulfilled_in_map(pool, map, rd->name))
385+
if (!pool_satisfieddep_map(pool, map, rd->name))
386386
return 0;
387-
return pool_dep_fulfilled_in_map(pool, map, rd->evr);
387+
return pool_satisfieddep_map(pool, map, rd->evr);
388388
}
389389
if (rd->flags == REL_OR)
390390
{
391-
if (pool_dep_fulfilled_in_map(pool, map, rd->name))
391+
if (pool_satisfieddep_map(pool, map, rd->name))
392392
return 1;
393-
return pool_dep_fulfilled_in_map(pool, map, rd->evr);
393+
return pool_satisfieddep_map(pool, map, rd->evr);
394394
}
395395
return 0;
396396
}
397397

398398
int
399-
pool_dep_fulfilled_in_map(Pool *pool, const Map *map, Id dep)
399+
pool_satisfieddep_map(Pool *pool, const Map *map, Id dep)
400400
{
401401
Id p, pp;
402402

403403
if (ISRELDEP(dep)) {
404404
Reldep *rd = GETRELDEP(pool, dep);
405405
if (rd->flags == REL_COND || rd->flags == REL_UNLESS ||
406406
rd->flags == REL_AND || rd->flags == REL_OR)
407-
return pool_dep_fulfilled_in_map_cplx(pool, map, rd);
407+
return pool_satisfieddep_map_cplx(pool, map, rd);
408408
if (rd->flags == REL_NAMESPACE && rd->name == NAMESPACE_SPLITPROVIDES)
409409
return 0;
410410
}

0 commit comments

Comments
 (0)