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
60
Issues
60
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
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
944eae4b
Commit
944eae4b
authored
Apr 07, 2015
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: return failure if any mirror update failed
fixes #4040
parent
7e3f4c3d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
src/apk_database.h
src/apk_database.h
+1
-0
src/database.c
src/database.c
+3
-1
src/update.c
src/update.c
+6
-2
No files found.
src/apk_database.h
View file @
944eae4b
...
...
@@ -148,6 +148,7 @@ struct apk_database {
char
*
cache_remount_dir
;
apk_blob_t
*
arch
;
unsigned
int
local_repos
,
available_repos
;
int
repo_update_errors
;
unsigned
int
pending_triggers
;
int
performing_self_update
:
1
;
int
permanent
:
1
;
...
...
src/database.c
View file @
944eae4b
...
...
@@ -2017,8 +2017,10 @@ static int apk_repository_update(struct apk_database *db, struct apk_repository
int
r
,
verify
=
(
apk_flags
&
APK_ALLOW_UNTRUSTED
)
?
APK_SIGN_NONE
:
APK_SIGN_VERIFY
;
r
=
apk_cache_download
(
db
,
repo
,
NULL
,
verify
,
NULL
,
NULL
);
if
(
r
!=
0
)
if
(
r
!=
0
)
{
apk_error
(
"%s: %s"
,
repo
->
url
,
apk_error_str
(
r
));
db
->
repo_update_errors
++
;
}
return
r
;
}
...
...
src/update.c
View file @
944eae4b
...
...
@@ -20,6 +20,7 @@ static int update_main(void *ctx, struct apk_database *db, struct apk_string_arr
{
struct
apk_repository
*
repo
;
int
i
;
char
buf
[
32
]
=
"OK:"
;
if
(
apk_verbosity
<
1
)
return
0
;
...
...
@@ -35,10 +36,13 @@ static int update_main(void *ctx, struct apk_database *db, struct apk_string_arr
db
->
repos
[
i
].
url
);
}
apk_message
(
"OK: %d distinct packages available"
,
if
(
db
->
repo_update_errors
!=
0
)
snprintf
(
buf
,
sizeof
(
buf
),
"%d errors;"
,
db
->
repo_update_errors
);
apk_message
(
"%s %d distinct packages available"
,
buf
,
db
->
available
.
packages
.
num_items
);
return
0
;
return
db
->
repo_update_errors
;
}
static
struct
apk_applet
apk_update
=
{
...
...
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