Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
alpine
apk-tools
Commits
0a17a648
Commit
0a17a648
authored
Nov 02, 2017
by
Ariadne Conill
🐰
Browse files
solver: only select a default if there is at least one provider with a declared provider_priority
parent
9165aa38
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/solver.c
View file @
0a17a648
...
...
@@ -668,6 +668,12 @@ static void select_package(struct apk_solver_state *ss, struct apk_name *name)
(
!
p
->
pkg
->
ss
.
iif_triggered
||
!
p
->
pkg
->
ss
.
tag_ok
))
continue
;
/* Virtual packages without provider_priority cannot be autoselected */
if
(
p
->
version
==
&
apk_null_blob
&&
p
->
pkg
->
name
->
auto_select_virtual
==
0
&&
p
->
pkg
->
name
->
ss
.
requirers
==
0
&&
p
->
pkg
->
provider_priority
==
0
)
continue
;
if
(
compare_providers
(
ss
,
p
,
&
chosen
)
>
0
)
chosen
=
*
p
;
}
...
...
test/provides.repo
View file @
0a17a648
...
...
@@ -38,6 +38,7 @@ V:1
S:1
I:1
p:mail-reader
k:1
C:Q1eVpkasfqZAukAXFYbgwt4xAEEEe=
P:mailreadplus
...
...
@@ -45,7 +46,7 @@ V:1
S:1
I:1
p:mail-reader
k:
1
k:
2
C:Q1EyN5AdpAOBJWKMR89pp/C77FFFF=
P:server-a
...
...
@@ -68,3 +69,17 @@ S:1
I:1
p:selfprovided=2
p:selfprovided=3
C:Q1EyN5AdpAOBJWKMR89ppC66aaaaj=
P:conflicted-provider-a
V:0.1
S:1
I:1
p:conflicted-provider
C:Q1EyN5AdpAOBJWKMR89ppC66bbbbj=
P:conflicted-provider-b
V:0.1
S:1
I:1
p:conflicted-provider
test/provides9.test
0 → 100644
View file @
0a17a648
@
ARGS
--
test
-
repo
provides
.
repo
add
conflicted
-
provider
@
EXPECT
ERROR
:
unsatisfiable
constraints
:
conflicted
-
provider
(
virtual
)
:
provided
by
:
conflicted
-
provider
-
a
conflicted
-
provider
-
b
required
by
:
world
[
conflicted
-
provider
]
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment