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
61
Issues
61
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
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
f1de353b
Commit
f1de353b
authored
Jan 12, 2012
by
Timo Teräs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
db, solver: refuse committing changes if there is missing tags
parent
23726926
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
src/apk_database.h
src/apk_database.h
+1
-0
src/database.c
src/database.c
+9
-1
src/solver.c
src/solver.c
+10
-0
No files found.
src/apk_database.h
View file @
f1de353b
...
...
@@ -130,6 +130,7 @@ struct apk_database {
unsigned
int
local_repos
;
int
performing_self_update
:
1
;
int
permanent
:
1
;
int
missing_tags
:
1
;
int
compat_newfeatures
:
1
;
int
compat_notinstallable
:
1
;
...
...
src/database.c
View file @
f1de353b
...
...
@@ -1135,7 +1135,7 @@ int apk_db_open(struct apk_database *db, struct apk_db_options *dbopts)
struct
apk_bstream
*
bs
;
struct
statfs
stfs
;
apk_blob_t
blob
;
int
r
,
fd
,
rr
=
0
;
int
i
,
r
,
fd
,
rr
=
0
;
memset
(
db
,
0
,
sizeof
(
*
db
));
if
(
apk_flags
&
APK_SIMULATE
)
{
...
...
@@ -1312,6 +1312,14 @@ int apk_db_open(struct apk_database *db, struct apk_db_options *dbopts)
goto
ret_r
;
}
for
(
i
=
0
;
i
<
db
->
num_repo_tags
;
i
++
)
{
if
(
!
db
->
repo_tags
[
i
].
allowed_repos
)
{
apk_warning
(
"Repository tag '"
BLOB_FMT
"' used in world is no longer available"
,
BLOB_PRINTF
(
*
db
->
repo_tags
[
i
].
name
));
db
->
missing_tags
=
1
;
}
}
if
(
db
->
compat_newfeatures
)
{
apk_warning
(
"This apk-tools is OLD! Some packages %s."
,
db
->
compat_notinstallable
?
...
...
src/solver.c
View file @
f1de353b
...
...
@@ -1261,6 +1261,11 @@ int apk_solver_commit_changeset(struct apk_database *db,
struct
apk_change
*
change
;
int
i
,
r
=
0
,
size_diff
=
0
;
if
(
db
->
missing_tags
&&
!
(
apk_flags
&
APK_FORCE
))
{
apk_error
(
"Not committing changes due to missing repository tags. Use --force to override."
);
return
-
1
;
}
if
(
changeset
->
changes
==
NULL
)
goto
all_done
;
...
...
@@ -1406,6 +1411,11 @@ int apk_solver_commit(struct apk_database *db,
struct
apk_package_array
*
solution
=
NULL
;
int
r
;
if
(
db
->
missing_tags
&&
!
(
apk_flags
&
APK_FORCE
))
{
apk_error
(
"Not committing changes due to missing repository tags. Use --force to override."
);
return
-
1
;
}
r
=
apk_solver_solve
(
db
,
solver_flags
,
world
,
&
solution
,
&
changeset
);
if
(
r
<
0
)
...
...
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