1
0
mirror of https://github.com/openSUSE/libsolv.git synced 2026-02-05 12:45:46 +01:00

Rename pool_dep_fulfilled_in_map to pool_satisfieddep_map

This is more similar to the other functions we already have.
This commit is contained in:
Michael Schroeder
2025-08-01 15:35:01 +02:00
parent 276d550835
commit 986388915b
6 changed files with 40 additions and 26 deletions

View File

@@ -2,12 +2,12 @@
.\" Title: Libsolv-Bindings
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\" Date: 07/29/2025
.\" Date: 08/01/2025
.\" Manual: LIBSOLV
.\" Source: libsolv
.\" Language: English
.\"
.TH "LIBSOLV\-BINDINGS" "3" "07/29/2025" "libsolv" "LIBSOLV"
.TH "LIBSOLV\-BINDINGS" "3" "08/01/2025" "libsolv" "LIBSOLV"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View File

@@ -2,12 +2,12 @@
.\" Title: Libsolv-Pool
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\" Date: 03/25/2024
.\" Date: 08/01/2025
.\" Manual: LIBSOLV
.\" Source: libsolv
.\" Language: English
.\"
.TH "LIBSOLV\-POOL" "3" "03/25/2024" "libsolv" "LIBSOLV"
.TH "LIBSOLV\-POOL" "3" "08/01/2025" "libsolv" "LIBSOLV"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -878,6 +878,18 @@ Returns \(lq1\(rq if the dependency \fId1\fR (the provider) is matched by the de
.\}
.sp
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\&.
.sp
.if n \{\
.RS 4
.\}
.nf
\fBint pool_satisfieddep_map(Pool *\fR\fIpool\fR\fB, const Map *\fR\fImap\fR\fB, Id\fR \fIdep\fR\fB)\fR;
.fi
.if n \{\
.RE
.\}
.sp
Returns \(lq1\(rq if the dependency \fIdep\fR is satisfied by the packages specified in \fImap\fR, otherwise \(lq0\(rq is returned\&.
.SH "WHATPROVIDES INDEX"
.sp
.if n \{\

View File

@@ -562,10 +562,10 @@ by the ``evr'' parts must overlap.
Like pool_match_dep, but the provider is the "self-provides" dependency
of the Solvable _s_, i.e. the dependency ``s->name = s->evr''.
int pool_dep_fulfilled_in_map(Pool *pool, const Map *map, Id dep);
int pool_satisfieddep_map(Pool *pool, const Map *map, Id dep);
Returns ``1'' if the dependency _dep_ is provided by at least one package
from _map_, otherwise ``0'' is returned.
Returns ``1'' if the dependency _dep_ is satisfied by the packages specified
in _map_, otherwise ``0'' is returned.
Whatprovides Index
------------------

View File

@@ -91,12 +91,12 @@ SOLV_1.0 {
pool_lookup_str;
pool_lookup_void;
pool_match_dep;
pool_dep_fulfilled_in_map;
pool_match_nevr_rel;
pool_prepend_rootdir;
pool_prepend_rootdir_tmp;
pool_queuetowhatprovides;
pool_rel2id;
pool_satisfieddep_map;
pool_search;
pool_selection2str;
pool_set_custom_vendorcheck;

View File

@@ -305,7 +305,8 @@ Id pool_id2langid(Pool *pool, Id id, const char *lang, int create);
int pool_intersect_evrs(Pool *pool, int pflags, Id pevr, int flags, Id evr);
int pool_match_dep(Pool *pool, Id d1, Id d2);
int pool_dep_fulfilled_in_map(Pool *pool, const Map *map, Id dep);
int pool_satisfieddep_map(Pool *pool, const Map *map, Id dep);
/* semi private, used in pool_match_nevr */
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)
void pool_whatmatchesdep(Pool *pool, Id keyname, Id dep, Queue *q, int marker);
void pool_whatcontainsdep(Pool *pool, Id keyname, Id dep, Queue *q, int marker);
void pool_whatmatchessolvable(Pool *pool, Id keyname, Id solvid, Queue *q, int marker);
void pool_set_whatprovides(Pool *pool, Id id, Id providers);
void pool_add_new_provider(Pool *pool, Id id, Id p);

View File

@@ -346,7 +346,7 @@ pool_whatmatchessolvable(Pool *pool, Id keyname, Id solvid, Queue *q, int marker
}
static int
pool_dep_fulfilled_in_map_cplx(Pool *pool, const Map *map, Reldep *rd)
pool_satisfieddep_map_cplx(Pool *pool, const Map *map, Reldep *rd)
{
if (rd->flags == REL_COND)
{
@@ -355,14 +355,14 @@ pool_dep_fulfilled_in_map_cplx(Pool *pool, const Map *map, Reldep *rd)
Reldep *rd2 = GETRELDEP(pool, rd->evr);
if (rd2->flags == REL_ELSE)
{
if (pool_dep_fulfilled_in_map(pool, map, rd2->name))
return pool_dep_fulfilled_in_map(pool, map, rd->name);
return pool_dep_fulfilled_in_map(pool, map, rd2->evr);
if (pool_satisfieddep_map(pool, map, rd2->name))
return pool_satisfieddep_map(pool, map, rd->name);
return pool_satisfieddep_map(pool, map, rd2->evr);
}
}
if (pool_dep_fulfilled_in_map(pool, map, rd->name))
if (pool_satisfieddep_map(pool, map, rd->name))
return 1;
return !pool_dep_fulfilled_in_map(pool, map, rd->evr);
return !pool_satisfieddep_map(pool, map, rd->evr);
}
if (rd->flags == REL_UNLESS)
{
@@ -371,32 +371,32 @@ pool_dep_fulfilled_in_map_cplx(Pool *pool, const Map *map, Reldep *rd)
Reldep *rd2 = GETRELDEP(pool, rd->evr);
if (rd2->flags == REL_ELSE)
{
if (!pool_dep_fulfilled_in_map(pool, map, rd2->name))
return pool_dep_fulfilled_in_map(pool, map, rd->name);
return pool_dep_fulfilled_in_map(pool, map, rd2->evr);
if (!pool_satisfieddep_map(pool, map, rd2->name))
return pool_satisfieddep_map(pool, map, rd->name);
return pool_satisfieddep_map(pool, map, rd2->evr);
}
}
if (!pool_dep_fulfilled_in_map(pool, map, rd->name))
if (!pool_satisfieddep_map(pool, map, rd->name))
return 0;
return !pool_dep_fulfilled_in_map(pool, map, rd->evr);
return !pool_satisfieddep_map(pool, map, rd->evr);
}
if (rd->flags == REL_AND)
{
if (!pool_dep_fulfilled_in_map(pool, map, rd->name))
if (!pool_satisfieddep_map(pool, map, rd->name))
return 0;
return pool_dep_fulfilled_in_map(pool, map, rd->evr);
return pool_satisfieddep_map(pool, map, rd->evr);
}
if (rd->flags == REL_OR)
{
if (pool_dep_fulfilled_in_map(pool, map, rd->name))
if (pool_satisfieddep_map(pool, map, rd->name))
return 1;
return pool_dep_fulfilled_in_map(pool, map, rd->evr);
return pool_satisfieddep_map(pool, map, rd->evr);
}
return 0;
}
int
pool_dep_fulfilled_in_map(Pool *pool, const Map *map, Id dep)
pool_satisfieddep_map(Pool *pool, const Map *map, Id dep)
{
Id p, pp;
@@ -404,7 +404,7 @@ pool_dep_fulfilled_in_map(Pool *pool, const Map *map, Id dep)
Reldep *rd = GETRELDEP(pool, dep);
if (rd->flags == REL_COND || rd->flags == REL_UNLESS ||
rd->flags == REL_AND || rd->flags == REL_OR)
return pool_dep_fulfilled_in_map_cplx(pool, map, rd);
return pool_satisfieddep_map_cplx(pool, map, rd);
if (rd->flags == REL_NAMESPACE && rd->name == NAMESPACE_SPLITPROVIDES)
return 0;
}