Commit 6f7719d3 authored by Timo Teräs's avatar Timo Teräs
Browse files

state: fix installation of package broken by autoclean patch

parent 55b7b89e
......@@ -364,7 +364,6 @@ static int for_each_broken_reverse_depency(struct apk_state *state,
static int delete_broken_package(struct apk_state *state,
struct apk_package *pkg)
{
return apk_state_lock_name(state, pkg->name, NULL);
}
......@@ -390,7 +389,9 @@ int apk_state_lock_name(struct apk_state *state,
if (name->id >= state->num_names)
return -1;
if ((name->flags & APK_NAME_TOPLEVEL) && !(apk_flags & APK_FORCE)) {
if (newpkg == NULL &&
(name->flags & APK_NAME_TOPLEVEL) &&
!(apk_flags & APK_FORCE)) {
apk_error("Not deleting top level dependency '%s'. "
"Use -f to override.", name->name);
return -1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment