Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
apk-tools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
59
Issues
59
List
Boards
Labels
Service Desk
Milestones
Merge Requests
14
Merge Requests
14
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
apk-tools
Commits
bef1faf1
Commit
bef1faf1
authored
Jul 14, 2020
by
Ariadne Conill
Committed by
Timo Teräs
Jul 30, 2020
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upgrade: allow for specified package upgrades
Fixes
#10667
and
#10700
parent
ffcdd350
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
doc/apk-upgrade.8.scd
doc/apk-upgrade.8.scd
+1
-1
src/app_upgrade.c
src/app_upgrade.c
+22
-0
No files found.
doc/apk-upgrade.8.scd
View file @
bef1faf1
...
...
@@ -6,7 +6,7 @@ apk upgrade - upgrade installed packages
#
SYNOPSIS
*
apk
upgrade
*
[
<
_options_
>
...]
*
apk
upgrade
*
[
<
_options_
>
...]
[
<
_packages_
>
...]
#
DESCRIPTION
...
...
src/app_upgrade.c
View file @
bef1faf1
...
...
@@ -21,6 +21,7 @@ struct upgrade_ctx {
int
no_self_upgrade
:
1
;
int
self_upgrade_only
:
1
;
int
ignore
:
1
;
int
errors
;
};
enum
{
...
...
@@ -137,6 +138,17 @@ ret:
return
r
;
}
static
void
set_upgrade_for_name
(
struct
apk_database
*
db
,
const
char
*
match
,
struct
apk_name
*
name
,
void
*
pctx
)
{
struct
upgrade_ctx
*
uctx
=
(
struct
upgrade_ctx
*
)
pctx
;
if
(
!
name
)
{
apk_error
(
"Package '%s' not found"
,
match
);
uctx
->
errors
++
;
}
else
apk_solver_set_name_flags
(
name
,
APK_SOLVERF_UPGRADE
,
0
);
}
static
int
upgrade_main
(
void
*
ctx
,
struct
apk_database
*
db
,
struct
apk_string_array
*
args
)
{
struct
upgrade_ctx
*
uctx
=
(
struct
upgrade_ctx
*
)
ctx
;
...
...
@@ -181,6 +193,16 @@ static int upgrade_main(void *ctx, struct apk_database *db, struct apk_string_ar
world
=
db
->
world
;
}
if
(
args
->
num
>
0
)
{
/* if specific packages are listed, we don't want to upgrade world. */
solver_flags
&=
~
APK_SOLVERF_UPGRADE
;
apk_name_foreach_matching
(
db
,
args
,
apk_foreach_genid
(),
set_upgrade_for_name
,
&
uctx
);
if
(
uctx
->
errors
)
return
uctx
->
errors
;
}
r
=
apk_solver_commit
(
db
,
solver_flags
,
world
);
if
(
solver_flags
&
APK_SOLVERF_AVAILABLE
)
...
...
Timo Teräs
@fabled
mentioned in merge request
!35 (closed)
·
Jul 30, 2020
mentioned in merge request
!35 (closed)
mentioned in merge request !35
Toggle commit list
Write
Preview
Markdown
is supported
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